From 43dcdd936d6eb951ebeb9e457328ae5ed07c37f6 Mon Sep 17 00:00:00 2001 From: ffalor <35144141+ffalor@users.noreply.github.com> Date: Mon, 15 Jun 2026 12:43:36 -0500 Subject: [PATCH 1/2] chore: regenerate SDK from updated swagger spec Regenerate models and clients from the latest specs/swagger.json. --- .../access_scopes/access_scopes_client.go | 119 +++ .../list_access_scopes_external_parameters.go | 172 ++++ .../list_access_scopes_external_responses.go | 858 ++++++++++++++++++ ...query_access_scopes_external_parameters.go | 262 ++++++ .../query_access_scopes_external_responses.go | 858 ++++++++++++++++++ .../client/api_clients/api_clients_client.go | 319 +++++++ .../create_api_client_parameters.go | 150 +++ .../create_api_client_responses.go | 742 +++++++++++++++ .../delete_api_clients_parameters.go | 175 ++++ .../delete_api_clients_responses.go | 626 +++++++++++++ .../get_accessible_scopes_parameters.go | 128 +++ .../get_accessible_scopes_responses.go | 626 +++++++++++++ ..._api_client_ids_for_customer_parameters.go | 253 ++++++ ...l_api_client_ids_for_customer_responses.go | 626 +++++++++++++ .../api_clients/get_api_clients_parameters.go | 175 ++++ .../api_clients/get_api_clients_responses.go | 626 +++++++++++++ .../reset_api_client_secret_parameters.go | 202 +++++ .../reset_api_client_secret_responses.go | 626 +++++++++++++ .../update_api_client_parameters.go | 177 ++++ .../update_api_client_responses.go | 729 +++++++++++++++ .../cloud_azure_registration_client.go | 320 +++++++ ...on_azure_create_suppressions_parameters.go | 150 +++ ...ion_azure_create_suppressions_responses.go | 626 +++++++++++++ ...on_azure_delete_suppressions_parameters.go | 150 +++ ...ion_azure_delete_suppressions_responses.go | 613 +++++++++++++ ..._suppression_values_by_field_parameters.go | 183 ++++ ...e_suppression_values_by_field_responses.go | 626 +++++++++++++ ...re_get_issue_values_by_field_parameters.go | 217 +++++ ...ure_get_issue_values_by_field_responses.go | 626 +++++++++++++ ...egistration_azure_get_issues_parameters.go | 343 +++++++ ...registration_azure_get_issues_responses.go | 626 +++++++++++++ ...ation_azure_get_registration_parameters.go | 59 +- ...on_azure_get_script_versions_parameters.go | 275 ++++++ ...ion_azure_get_script_versions_responses.go | 626 +++++++++++++ ...ation_azure_get_suppressions_parameters.go | 309 +++++++ ...ration_azure_get_suppressions_responses.go | 626 +++++++++++++ ...on_azure_update_suppressions_parameters.go | 150 +++ ...ion_azure_update_suppressions_responses.go | 626 +++++++++++++ ...egistration_gcp_get_entities_parameters.go | 2 +- ...registration_oci_get_account_parameters.go | 4 +- .../combined_cloud_risks_parameters.go | 4 + ...st_cloud_group_i_ds_external_parameters.go | 1 + .../list_cloud_groups_external_parameters.go | 1 + .../cloud_security_assets_client.go | 40 + ...ecurity_assets_entities_post_parameters.go | 153 ++++ ...security_assets_entities_post_responses.go | 858 ++++++++++++++++++ ...loud_security_assets_queries_parameters.go | 2 + ...uations_combined_iom_by_rule_parameters.go | 1 + ...cspm_evaluations_iom_queries_parameters.go | 2 + ...vider_get_account_aggregates_parameters.go | 153 ++++ ...ovider_get_account_aggregates_responses.go | 626 +++++++++++++ ...d_security_registration_combined_client.go | 79 ++ .../cloud_security_risks_client.go | 79 ++ ...rity_timeline_risks_enriched_parameters.go | 156 ++++ ...urity_timeline_risks_enriched_responses.go | 626 +++++++++++++ ...ggregate_cluster_assessments_parameters.go | 8 +- ...led_containers_by_rules_path_parameters.go | 18 +- ...containers_count_by_severity_parameters.go | 20 +- ..._failed_images_by_rules_path_parameters.go | 18 +- ...led_images_count_by_severity_parameters.go | 20 +- ...ate_failed_rules_by_clusters_parameters.go | 20 +- ...egate_failed_rules_by_images_parameters.go | 22 +- ...iled_rules_count_by_severity_parameters.go | 20 +- ..._aggregate_image_assessments_parameters.go | 18 +- ..._aggregate_rules_assessments_parameters.go | 20 +- ...xt_aggregate_rules_by_status_parameters.go | 20 +- .../crowd_strike_api_specification_client.go | 45 +- .../data_protection_configuration_client.go | 2 +- ...ities_web_location_delete_v2_parameters.go | 4 +- ...ueries_classification_get_v2_parameters.go | 4 +- .../queries_policy_get_v2_parameters.go | 4 +- .../combined_applications_parameters.go | 2 +- ...third_party_passkey_registry_parameters.go | 175 ++++ ..._third_party_passkey_registry_responses.go | 742 +++++++++++++++ falcon/client/falcon_id/falcon_id_client.go | 199 ++++ ...third_party_passkey_registry_parameters.go | 175 ++++ ..._third_party_passkey_registry_responses.go | 742 +++++++++++++++ ...third_party_passkey_registry_parameters.go | 266 ++++++ ..._third_party_passkey_registry_responses.go | 742 +++++++++++++++ ...third_party_passkey_registry_parameters.go | 150 +++ ..._third_party_passkey_registry_responses.go | 742 +++++++++++++++ .../falconx_sandbox/submit_parameters.go | 9 +- ...federated_connections_config_parameters.go | 156 ++++ ..._federated_connections_config_responses.go | 729 +++++++++++++++ .../federated_connections_client.go | 159 ++++ ...federated_connections_config_parameters.go | 177 ++++ ..._federated_connections_config_responses.go | 742 +++++++++++++++ ...federated_connections_config_parameters.go | 150 +++ ..._federated_connections_config_responses.go | 626 +++++++++++++ .../foundry_logscale_client.go | 4 +- .../create_file_v1_parameters.go | 2 +- .../create_file_v1_responses.go | 2 +- .../foundry_lookup_files_client.go} | 10 +- .../update_file_v1_parameters.go | 2 +- .../update_file_v1_responses.go | 2 +- .../get_host_migration_i_ds_v1_parameters.go | 2 +- .../get_migration_i_ds_v1_parameters.go | 2 +- .../devices_actions_delete_v1_parameters.go | 157 ++++ .../devices_actions_delete_v1_responses.go | 626 +++++++++++++ falcon/client/hosts/hosts_client.go | 42 +- .../cao_incidents_queries_v1_parameters.go | 2 +- .../get_intel_actor_entities_responses.go | 6 +- falcon/client/intel/intel_client.go | 2 +- .../query_intel_actor_entities_parameters.go | 2 +- .../query_intel_actor_entities_responses.go | 6 +- .../intel/query_intel_actor_ids_parameters.go | 2 +- .../query_intel_report_entities_parameters.go | 2 +- .../query_intel_report_ids_parameters.go | 2 +- .../lookup_indicators_responses.go | 17 +- .../search_indicators_responses.go | 17 +- ...omation_update_scheduled_task_responses.go | 6 +- ...nowledge_base_files_create_v1_responses.go | 116 +++ ...nowledge_base_files_update_v1_responses.go | 116 +++ .../combined_knowledge_bases_v1_parameters.go | 316 +++++++ .../combined_knowledge_bases_v1_responses.go | 626 +++++++++++++ .../knowledge_bases/knowledge_bases_client.go | 40 + ...ate_dashboards_from_template_parameters.go | 150 +++ ...eate_dashboards_from_template_responses.go | 858 ++++++++++++++++++ .../bulk_create_lookup_files_parameters.go | 150 +++ .../bulk_create_lookup_files_responses.go | 858 ++++++++++++++++++ ..._saved_queries_from_template_parameters.go | 153 ++++ ...e_saved_queries_from_template_responses.go | 858 ++++++++++++++++++ .../bulk_get_lookup_files_parameters.go | 209 +++++ .../ngsiem/bulk_get_lookup_files_responses.go | 858 ++++++++++++++++++ ...ate_dashboards_from_template_parameters.go | 150 +++ ...date_dashboards_from_template_responses.go | 858 ++++++++++++++++++ .../bulk_update_lookup_files_parameters.go | 150 +++ .../bulk_update_lookup_files_responses.go | 858 ++++++++++++++++++ ..._saved_queries_from_template_parameters.go | 153 ++++ ...e_saved_queries_from_template_responses.go | 858 ++++++++++++++++++ .../create_parser_extension_parameters.go | 153 ++++ .../create_parser_extension_responses.go | 858 ++++++++++++++++++ .../ngsiem/delete_dashboard_parameters.go | 42 +- .../ngsiem/delete_lookup_file_parameters.go | 42 +- .../ngsiem/delete_saved_query_parameters.go | 42 +- .../get_dashboard_template_parameters.go | 42 +- .../get_saved_query_template_parameters.go | 42 +- falcon/client/ngsiem/ngsiem_client.go | 330 ++++++- .../test_parser_from_template_parameters.go | 27 + .../ods/query_scheduled_scans_parameters.go | 2 +- falcon/client/operations/empty_parameters.go | 128 --- falcon/client/operations/empty_responses.go | 103 --- falcon/client/operations/operations_client.go | 80 -- .../post_graphql_query_mixin0_parameters.go | 128 --- .../post_graphql_query_mixin0_responses.go | 390 -------- .../create_group_v1_mixin0_parameters.go | 150 +++ .../create_group_v1_mixin0_responses.go | 626 +++++++++++++ .../delete_groups_v1_parameters.go | 175 ++++ .../delete_groups_v1_responses.go | 626 +++++++++++++ .../get_group_users_v1_parameters.go | 150 +++ .../get_group_users_v1_responses.go | 626 +++++++++++++ .../get_groups_v1_mixin0_parameters.go | 150 +++ .../get_groups_v1_mixin0_responses.go | 626 +++++++++++++ .../get_user_groups_v1_parameters.go | 150 +++ .../get_user_groups_v1_responses.go | 626 +++++++++++++ .../group_actions_v1_mixin0_parameters.go | 177 ++++ .../group_actions_v1_mixin0_responses.go | 626 +++++++++++++ ...roup_users_actions_v1_mixin0_parameters.go | 177 ++++ ...group_users_actions_v1_mixin0_responses.go | 626 +++++++++++++ .../profile_groups/profile_groups_client.go | 476 ++++++++++ .../query_groups_v1_mixin0_parameters.go | 287 ++++++ .../query_groups_v1_mixin0_responses.go | 626 +++++++++++++ .../update_group_v1_mixin0_parameters.go | 177 ++++ .../update_group_v1_mixin0_responses.go | 626 +++++++++++++ .../query_scan_results_parameters.go | 8 +- .../query_notifications_v1_parameters.go | 2 +- ...workflow_activities_combined_parameters.go | 47 +- .../accessscopemanager_v1_access_scope.go | 106 +++ falcon/models/accessscopemanager_v1_error.go | 56 ++ ...v1_list_access_scopes_response_external.go | 223 +++++ .../accessscopemanager_v1_m_s_a_response.go | 175 ++++ falcon/models/accessscopemanager_v1_meta.go | 118 +++ .../accessscopemanager_v1_pagination.go | 56 ++ ...1_query_access_scopes_response_external.go | 163 ++++ .../models/actor_actor_paginated_response.go | 237 +++++ ...rs_response.go => actor_actor_response.go} | 34 +- .../models/actor_msa_meta_info_with_paging.go | 162 ++++ .../models/api_accessible_scopes_response.go | 235 +++++ falcon/models/api_agent_tools_metadata.go | 71 ++ falcon/models/api_array_gap.go | 88 ++ falcon/models/api_array_with_gap.go | 141 +++ .../models/api_bulk_create_dashboard_item.go | 88 ++ ...ate_dashboards_from_template_request_v1.go | 141 +++ ...te_dashboards_from_template_response_v1.go | 235 +++++ ...api_bulk_create_lookup_files_request_v1.go | 141 +++ ...pi_bulk_create_lookup_files_response_v1.go | 235 +++++ ..._saved_queries_from_template_request_v1.go | 141 +++ ...saved_queries_from_template_response_v1.go | 235 +++++ .../api_bulk_create_saved_query_item.go | 71 ++ .../api_bulk_get_lookup_files_response_v1.go | 235 +++++ .../models/api_bulk_update_dashboard_item.go | 88 ++ ...ate_dashboards_from_template_request_v1.go | 141 +++ ...te_dashboards_from_template_response_v1.go | 235 +++++ ...api_bulk_update_lookup_files_request_v1.go | 141 +++ ...pi_bulk_update_lookup_files_response_v1.go | 235 +++++ ..._saved_queries_from_template_request_v1.go | 141 +++ ...saved_queries_from_template_response_v1.go | 235 +++++ .../api_bulk_update_saved_query_item.go | 88 ++ falcon/models/api_client_request.go | 105 +++ ...api_cloud_application_update_request_v1.go | 39 +- falcon/models/api_collection_metadata.go | 51 ++ .../api_content_pattern_update_request_v1.go | 101 +-- .../api_create_parser_extension_request_v1.go | 165 ++++ .../api_create_web_location_request_v2.go | 3 + .../api_dashboard_bulk_create_result.go | 91 ++ .../api_dashboard_bulk_update_result.go | 91 ++ ...pi_enterprise_account_update_request_v1.go | 53 +- .../api_lookup_file_bulk_create_result.go | 91 ++ .../api_lookup_file_bulk_update_result.go | 91 ++ falcon/models/api_lookup_file_info.go | 74 ++ falcon/models/api_lookup_file_to_create.go | 88 ++ falcon/models/api_lookup_file_to_update.go | 88 ++ .../api_parser_test_case_output_failures.go | 127 +++ .../models/api_post_enrollment_details_v4.go | 3 + .../api_saved_query_bulk_create_result.go | 91 ++ .../api_saved_query_bulk_update_result.go | 91 ++ falcon/models/api_schema_violation.go | 88 ++ .../api_update_web_location_request_v2.go | 3 + falcon/models/api_web_location_v2.go | 17 + .../models/apimodels_rule_selection_filter.go | 6 + ...tgroupmanager_v1_cloud_resource_filters.go | 3 + ...groupmanager_v1_cloud_resource_selector.go | 7 +- falcon/models/assets_get_resources_request.go | 71 ++ ...ing_region_custom_network_configuration.go | 53 ++ .../azure_azure_registration_create_input.go | 121 +++ .../azure_azure_registration_update_input.go | 121 +++ ...p_m_region_custom_network_configuration.go | 53 -- ...settings_dspm_custom_vnet_configuration.go | 2 +- falcon/models/azure_event_hub_settings.go | 3 + falcon/models/azure_impacted_entities.go | 88 ++ falcon/models/azure_issue.go | 253 ++++++ falcon/models/azure_issue_field_value.go | 88 ++ falcon/models/azure_issue_response_ext_v1.go | 235 +++++ ...ue_suppression_values_by_field_response.go | 235 +++++ .../azure_issue_values_by_field_response.go | 235 +++++ falcon/models/azure_script_version.go | 127 +++ .../azure_script_version_response_ext_v1.go | 235 +++++ falcon/models/azure_suppression.go | 233 +++++ .../models/azure_suppression_create_input.go | 145 +++ .../azure_suppression_create_request.go | 124 +++ .../azure_suppression_delete_request.go | 71 ++ .../azure_suppression_response_ext_v1.go | 235 +++++ falcon/models/azure_suppression_target.go | 56 ++ .../models/azure_suppression_update_input.go | 74 ++ .../azure_suppression_update_request.go | 124 +++ falcon/models/azure_tenant_registration.go | 127 +++ ...lity_scanning_custom_vnet_configuration.go | 67 ++ .../models/client_data_ingest_response_v1.go | 18 + ...ated_connection_config_patch_request_v1.go | 88 ++ ..._federated_connection_config_request_v1.go | 105 +++ ...nt_federated_connection_config_resource.go | 88 ++ ...federated_connection_config_response_v1.go | 235 +++++ falcon/models/client_job_status.go | 15 + falcon/models/content_activity_metadata.go | 365 -------- .../correlationrulesapi_anomaly_scopes.go | 74 ++ .../models/correlationrulesapi_anomaly_v1.go | 78 +- ...ulesapi_create_rule_notification_config.go | 6 + .../correlationrulesapi_patch_anomaly_v1.go | 80 +- ...esapi_patch_rule_notification_config_v1.go | 6 + ...ionrulesapi_rule_notification_config_v1.go | 6 + .../correlationrulesapi_rule_search_v1.go | 16 +- ...nagement_create_data_connection_request.go | 32 +- ...nagement_update_data_connection_request.go | 6 + .../models/definitions_activity_metadata.go | 144 +++ falcon/models/definitions_definition_ext.go | 51 ++ ...tions_definition_import_response_entity.go | 2 +- falcon/models/detects_alert.go | 56 ++ falcon/models/domain_agent_v1.go | 22 + falcon/models/domain_asset.go | 173 ++++ falcon/models/domain_attribute_change.go | 105 +++ .../models/domain_cloud_a_w_s_account_v1.go | 3 + falcon/models/domain_cloud_risk_event.go | 96 ++ falcon/models/domain_config_data.go | 3 + falcon/models/domain_configuration_change.go | 260 ++++++ .../domain_credentialed_asset_summary.go | 105 +++ falcon/models/domain_device.go | 3 + .../models/domain_discover_api_device_slot.go | 6 + falcon/models/domain_discover_api_host.go | 21 + .../models/domain_discover_api_io_t_host.go | 15 + falcon/models/domain_discover_params.go | 17 - falcon/models/domain_enriched_resolution.go | 156 ++++ falcon/models/domain_enriched_risk_factor.go | 198 ++++ .../domain_enriched_risk_factor_reason.go | 94 ++ .../domain_enriched_risk_factor_value.go | 11 + .../models/domain_enriched_risk_instance.go | 425 +++++++++ falcon/models/domain_enriched_risks.go | 121 +++ falcon/models/domain_enriched_timeline.go | 173 ++++ .../domain_enriched_timeline_resource.go | 157 ++++ ...n_kestrel_data_export_execution_context.go | 50 + ...n_kestrel_data_export_header_mapping_v2.go | 17 + .../domain_kestrel_data_export_params.go | 54 ++ ...estrel_data_export_params_store_headers.go | 11 + falcon/models/domain_mitre_attack.go | 139 +++ falcon/models/domain_news_document.go | 62 ++ falcon/models/domain_notification_v1.go | 79 ++ .../domain_o_c_i_tenancy_create_ext_v1.go | 6 + .../domain_o_c_i_tenancy_update_ext_v1.go | 6 + falcon/models/domain_o_c_i_tenancy_v1.go | 51 ++ falcon/models/domain_resource_event.go | 99 ++ ...n_risk_score_matching_criteria_response.go | 88 ++ falcon/models/domain_save_config_request.go | 17 - falcon/models/domain_scan_profile.go | 6 + falcon/models/domain_scan_run.go | 51 ++ falcon/models/domain_scan_run_config.go | 57 ++ falcon/models/domain_scan_schedule_data_v1.go | 20 + falcon/models/domain_template.go | 72 +- .../models/domain_template_create_request.go | 72 +- .../models/domain_template_update_request.go | 72 +- .../domain_third_party_passkey_registry.go | 208 +++++ ...party_passkey_registry_device_integrity.go | 225 +++++ falcon/models/domain_user.go | 3 + .../dto_create_g_c_p_registration_request.go | 105 +++ falcon/models/dto_g_c_p_registration.go | 190 ++++ .../models/dto_service_account_properties.go | 86 ++ .../dto_update_g_c_p_registration_request.go | 105 +++ ...rty_passkey_registry_delete_response_v1.go | 188 ++++ ..._party_passkey_registry_get_response_v1.go | 235 +++++ ...party_passkey_registry_patch_request_v1.go | 88 ++ ...arty_passkey_registry_patch_response_v1.go | 235 +++++ ...arty_passkey_registry_query_response_v1.go | 188 ++++ falcon/models/figapi_indicator.go | 62 ++ falcon/models/figapi_lookup_indicator.go | 62 ++ falcon/models/figapi_software_package.go | 56 ++ ...trolapi_combined_user_roles_resource_v2.go | 3 + ...lightcontrolapi_create_group_request_v1.go | 91 ++ .../flightcontrolapi_group_assignment.go | 56 ++ ...flightcontrolapi_group_users_request_v1.go | 71 ++ ...lightcontrolapi_group_users_response_v1.go | 235 +++++ .../models/flightcontrolapi_group_users_v1.go | 88 ++ ...ightcontrolapi_profile_group_request_v1.go | 71 ++ ...ghtcontrolapi_profile_group_response_v1.go | 235 +++++ .../flightcontrolapi_profile_group_v1.go | 342 +++++++ ...lightcontrolapi_update_group_request_v1.go | 53 ++ ...flightcontrolapi_user_groups_request_v1.go | 71 ++ ...lightcontrolapi_user_groups_response_v1.go | 235 +++++ .../models/flightcontrolapi_user_groups_v1.go | 88 ++ falcon/models/gcp_agentless_scanning_infra.go | 142 +++ .../models/gcp_agentless_scanning_settings.go | 166 ++++ .../gcp_agentless_scanning_user_inputs.go | 150 +++ falcon/models/gcp_folder_details.go | 118 ++- falcon/models/gcp_network_config.go | 88 ++ falcon/models/gcp_organization_details.go | 118 ++- falcon/models/gcp_project_details.go | 118 ++- .../models/itautomation_concurrency_config.go | 8 +- ...automation_rerun_task_execution_request.go | 51 +- falcon/models/jsonschema_sub_schema.go | 6 + falcon/models/models_o_s_info_type.go | 9 + falcon/models/models_package_info_type.go | 3 + falcon/models/msa_aggregate_query_request.go | 66 ++ falcon/models/msa_aggregation_result.go | 51 ++ falcon/models/msa_api_filters_spec.go | 105 +++ falcon/models/msa_hit.go | 105 +++ falcon/models/msa_hits.go | 141 +++ falcon/models/msaspec_scope.go | 105 +++ falcon/models/mwtypes_m_w_info.go | 127 +++ falcon/models/nswip_scan_flags.go | 89 ++ .../models/operations_case_field_changes.go | 6 + .../models/operations_create_case_request.go | 6 + ...ager_external_classification_properties.go | 8 +- .../policymanager_external_policy_patch.go | 2 +- falcon/models/policymanager_external_rule.go | 21 +- .../models/policymanager_policy_properties.go | 177 ++-- falcon/models/quickscanpro_artifact_node.go | 3 + falcon/models/quickscanpro_artifacts_tree.go | 35 +- falcon/models/quickscanpro_malware_family.go | 50 + falcon/models/quickscanpro_scan_result.go | 127 +++ falcon/models/quickscanpro_yara_rule.go | 65 ++ ...unt_counts_by_status_aggregate_response.go | 235 +++++ ...gistration_accounts_by_status_aggregate.go | 141 +++ .../registration_accounts_by_status_bucket.go | 88 ++ ...registration_accounts_by_status_buckets.go | 158 ++++ ...ration_accounts_by_status_sub_aggregate.go | 141 +++ ...ant_default_subscription_id_response_v1.go | 38 +- falcon/models/releases_release_response_v1.go | 3 + falcon/models/resources.go | 96 +- .../models/rest_a_w_s_account_patch_ext_v1.go | 6 + .../rest_get_enriched_timeline_response.go | 233 +++++ falcon/models/risk_suppression.go | 3 + falcon/models/risks_graph.go | 189 ++++ falcon/models/risks_union_cloud_risk.go | 54 ++ falcon/models/risks_vertex.go | 17 - falcon/models/sdk_case_vm.go | 6 + falcon/models/sdk_evidence_vm.go | 49 + falcon/models/sdk_user_evidence_record_vm.go | 142 +++ falcon/models/sdk_user_evidence_selector.go | 71 ++ falcon/models/sdk_user_evidence_vm.go | 124 +++ .../suppressionrules_rule_selection_filter.go | 6 + falcon/models/v2_budget.go | 56 ++ falcon/models/v2_definition.go | 51 ++ ...abilitymetadataapi_risk_factor_category.go | 122 +++ .../vulnerabilitymetadataapi_risk_metadata.go | 63 ++ falcon/version.go | 2 +- 392 files changed, 64809 insertions(+), 2076 deletions(-) create mode 100644 falcon/client/access_scopes/access_scopes_client.go create mode 100644 falcon/client/access_scopes/list_access_scopes_external_parameters.go create mode 100644 falcon/client/access_scopes/list_access_scopes_external_responses.go create mode 100644 falcon/client/access_scopes/query_access_scopes_external_parameters.go create mode 100644 falcon/client/access_scopes/query_access_scopes_external_responses.go create mode 100644 falcon/client/api_clients/api_clients_client.go create mode 100644 falcon/client/api_clients/create_api_client_parameters.go create mode 100644 falcon/client/api_clients/create_api_client_responses.go create mode 100644 falcon/client/api_clients/delete_api_clients_parameters.go create mode 100644 falcon/client/api_clients/delete_api_clients_responses.go create mode 100644 falcon/client/api_clients/get_accessible_scopes_parameters.go create mode 100644 falcon/client/api_clients/get_accessible_scopes_responses.go create mode 100644 falcon/client/api_clients/get_all_api_client_ids_for_customer_parameters.go create mode 100644 falcon/client/api_clients/get_all_api_client_ids_for_customer_responses.go create mode 100644 falcon/client/api_clients/get_api_clients_parameters.go create mode 100644 falcon/client/api_clients/get_api_clients_responses.go create mode 100644 falcon/client/api_clients/reset_api_client_secret_parameters.go create mode 100644 falcon/client/api_clients/reset_api_client_secret_responses.go create mode 100644 falcon/client/api_clients/update_api_client_parameters.go create mode 100644 falcon/client/api_clients/update_api_client_responses.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_create_suppressions_parameters.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_create_suppressions_responses.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_delete_suppressions_parameters.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_delete_suppressions_responses.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_suppression_values_by_field_parameters.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_suppression_values_by_field_responses.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_values_by_field_parameters.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_values_by_field_responses.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_get_issues_parameters.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_get_issues_responses.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_get_script_versions_parameters.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_get_script_versions_responses.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_get_suppressions_parameters.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_get_suppressions_responses.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_update_suppressions_parameters.go create mode 100644 falcon/client/cloud_azure_registration/cloud_registration_azure_update_suppressions_responses.go create mode 100644 falcon/client/cloud_security_assets/cloud_security_assets_entities_post_parameters.go create mode 100644 falcon/client/cloud_security_assets/cloud_security_assets_entities_post_responses.go create mode 100644 falcon/client/cloud_security_registration_combined/cloud_registration_cross_provider_get_account_aggregates_parameters.go create mode 100644 falcon/client/cloud_security_registration_combined/cloud_registration_cross_provider_get_account_aggregates_responses.go create mode 100644 falcon/client/cloud_security_registration_combined/cloud_security_registration_combined_client.go create mode 100644 falcon/client/cloud_security_risks/cloud_security_risks_client.go create mode 100644 falcon/client/cloud_security_risks/cloud_security_timeline_risks_enriched_parameters.go create mode 100644 falcon/client/cloud_security_risks/cloud_security_timeline_risks_enriched_responses.go create mode 100644 falcon/client/falcon_id/delete_third_party_passkey_registry_parameters.go create mode 100644 falcon/client/falcon_id/delete_third_party_passkey_registry_responses.go create mode 100644 falcon/client/falcon_id/falcon_id_client.go create mode 100644 falcon/client/falcon_id/get_third_party_passkey_registry_parameters.go create mode 100644 falcon/client/falcon_id/get_third_party_passkey_registry_responses.go create mode 100644 falcon/client/falcon_id/query_third_party_passkey_registry_parameters.go create mode 100644 falcon/client/falcon_id/query_third_party_passkey_registry_responses.go create mode 100644 falcon/client/falcon_id/update_third_party_passkey_registry_parameters.go create mode 100644 falcon/client/falcon_id/update_third_party_passkey_registry_responses.go create mode 100644 falcon/client/federated_connections/delete_federated_connections_config_parameters.go create mode 100644 falcon/client/federated_connections/delete_federated_connections_config_responses.go create mode 100644 falcon/client/federated_connections/federated_connections_client.go create mode 100644 falcon/client/federated_connections/patch_federated_connections_config_parameters.go create mode 100644 falcon/client/federated_connections/patch_federated_connections_config_responses.go create mode 100644 falcon/client/federated_connections/post_federated_connections_config_parameters.go create mode 100644 falcon/client/federated_connections/post_federated_connections_config_responses.go rename falcon/client/{lookup_files => foundry_lookup_files}/create_file_v1_parameters.go (99%) rename falcon/client/{lookup_files => foundry_lookup_files}/create_file_v1_responses.go (99%) rename falcon/client/{lookup_files/lookup_files_client.go => foundry_lookup_files/foundry_lookup_files_client.go} (93%) rename falcon/client/{lookup_files => foundry_lookup_files}/update_file_v1_parameters.go (99%) rename falcon/client/{lookup_files => foundry_lookup_files}/update_file_v1_responses.go (99%) create mode 100644 falcon/client/hosts/devices_actions_delete_v1_parameters.go create mode 100644 falcon/client/hosts/devices_actions_delete_v1_responses.go create mode 100644 falcon/client/knowledge_bases/combined_knowledge_bases_v1_parameters.go create mode 100644 falcon/client/knowledge_bases/combined_knowledge_bases_v1_responses.go create mode 100644 falcon/client/ngsiem/bulk_create_dashboards_from_template_parameters.go create mode 100644 falcon/client/ngsiem/bulk_create_dashboards_from_template_responses.go create mode 100644 falcon/client/ngsiem/bulk_create_lookup_files_parameters.go create mode 100644 falcon/client/ngsiem/bulk_create_lookup_files_responses.go create mode 100644 falcon/client/ngsiem/bulk_create_saved_queries_from_template_parameters.go create mode 100644 falcon/client/ngsiem/bulk_create_saved_queries_from_template_responses.go create mode 100644 falcon/client/ngsiem/bulk_get_lookup_files_parameters.go create mode 100644 falcon/client/ngsiem/bulk_get_lookup_files_responses.go create mode 100644 falcon/client/ngsiem/bulk_update_dashboards_from_template_parameters.go create mode 100644 falcon/client/ngsiem/bulk_update_dashboards_from_template_responses.go create mode 100644 falcon/client/ngsiem/bulk_update_lookup_files_parameters.go create mode 100644 falcon/client/ngsiem/bulk_update_lookup_files_responses.go create mode 100644 falcon/client/ngsiem/bulk_update_saved_queries_from_template_parameters.go create mode 100644 falcon/client/ngsiem/bulk_update_saved_queries_from_template_responses.go create mode 100644 falcon/client/ngsiem/create_parser_extension_parameters.go create mode 100644 falcon/client/ngsiem/create_parser_extension_responses.go delete mode 100644 falcon/client/operations/empty_parameters.go delete mode 100644 falcon/client/operations/empty_responses.go delete mode 100644 falcon/client/operations/post_graphql_query_mixin0_parameters.go delete mode 100644 falcon/client/operations/post_graphql_query_mixin0_responses.go create mode 100644 falcon/client/profile_groups/create_group_v1_mixin0_parameters.go create mode 100644 falcon/client/profile_groups/create_group_v1_mixin0_responses.go create mode 100644 falcon/client/profile_groups/delete_groups_v1_parameters.go create mode 100644 falcon/client/profile_groups/delete_groups_v1_responses.go create mode 100644 falcon/client/profile_groups/get_group_users_v1_parameters.go create mode 100644 falcon/client/profile_groups/get_group_users_v1_responses.go create mode 100644 falcon/client/profile_groups/get_groups_v1_mixin0_parameters.go create mode 100644 falcon/client/profile_groups/get_groups_v1_mixin0_responses.go create mode 100644 falcon/client/profile_groups/get_user_groups_v1_parameters.go create mode 100644 falcon/client/profile_groups/get_user_groups_v1_responses.go create mode 100644 falcon/client/profile_groups/group_actions_v1_mixin0_parameters.go create mode 100644 falcon/client/profile_groups/group_actions_v1_mixin0_responses.go create mode 100644 falcon/client/profile_groups/group_users_actions_v1_mixin0_parameters.go create mode 100644 falcon/client/profile_groups/group_users_actions_v1_mixin0_responses.go create mode 100644 falcon/client/profile_groups/profile_groups_client.go create mode 100644 falcon/client/profile_groups/query_groups_v1_mixin0_parameters.go create mode 100644 falcon/client/profile_groups/query_groups_v1_mixin0_responses.go create mode 100644 falcon/client/profile_groups/update_group_v1_mixin0_parameters.go create mode 100644 falcon/client/profile_groups/update_group_v1_mixin0_responses.go create mode 100644 falcon/models/accessscopemanager_v1_access_scope.go create mode 100644 falcon/models/accessscopemanager_v1_error.go create mode 100644 falcon/models/accessscopemanager_v1_list_access_scopes_response_external.go create mode 100644 falcon/models/accessscopemanager_v1_m_s_a_response.go create mode 100644 falcon/models/accessscopemanager_v1_meta.go create mode 100644 falcon/models/accessscopemanager_v1_pagination.go create mode 100644 falcon/models/accessscopemanager_v1_query_access_scopes_response_external.go create mode 100644 falcon/models/actor_actor_paginated_response.go rename falcon/models/{domain_actors_response.go => actor_actor_response.go} (79%) create mode 100644 falcon/models/actor_msa_meta_info_with_paging.go create mode 100644 falcon/models/api_accessible_scopes_response.go create mode 100644 falcon/models/api_agent_tools_metadata.go create mode 100644 falcon/models/api_array_gap.go create mode 100644 falcon/models/api_array_with_gap.go create mode 100644 falcon/models/api_bulk_create_dashboard_item.go create mode 100644 falcon/models/api_bulk_create_dashboards_from_template_request_v1.go create mode 100644 falcon/models/api_bulk_create_dashboards_from_template_response_v1.go create mode 100644 falcon/models/api_bulk_create_lookup_files_request_v1.go create mode 100644 falcon/models/api_bulk_create_lookup_files_response_v1.go create mode 100644 falcon/models/api_bulk_create_saved_queries_from_template_request_v1.go create mode 100644 falcon/models/api_bulk_create_saved_queries_from_template_response_v1.go create mode 100644 falcon/models/api_bulk_create_saved_query_item.go create mode 100644 falcon/models/api_bulk_get_lookup_files_response_v1.go create mode 100644 falcon/models/api_bulk_update_dashboard_item.go create mode 100644 falcon/models/api_bulk_update_dashboards_from_template_request_v1.go create mode 100644 falcon/models/api_bulk_update_dashboards_from_template_response_v1.go create mode 100644 falcon/models/api_bulk_update_lookup_files_request_v1.go create mode 100644 falcon/models/api_bulk_update_lookup_files_response_v1.go create mode 100644 falcon/models/api_bulk_update_saved_queries_from_template_request_v1.go create mode 100644 falcon/models/api_bulk_update_saved_queries_from_template_response_v1.go create mode 100644 falcon/models/api_bulk_update_saved_query_item.go create mode 100644 falcon/models/api_client_request.go create mode 100644 falcon/models/api_create_parser_extension_request_v1.go create mode 100644 falcon/models/api_dashboard_bulk_create_result.go create mode 100644 falcon/models/api_dashboard_bulk_update_result.go create mode 100644 falcon/models/api_lookup_file_bulk_create_result.go create mode 100644 falcon/models/api_lookup_file_bulk_update_result.go create mode 100644 falcon/models/api_lookup_file_info.go create mode 100644 falcon/models/api_lookup_file_to_create.go create mode 100644 falcon/models/api_lookup_file_to_update.go create mode 100644 falcon/models/api_saved_query_bulk_create_result.go create mode 100644 falcon/models/api_saved_query_bulk_update_result.go create mode 100644 falcon/models/api_schema_violation.go create mode 100644 falcon/models/assets_get_resources_request.go create mode 100644 falcon/models/azure_agentless_scanning_region_custom_network_configuration.go delete mode 100644 falcon/models/azure_d_s_p_m_region_custom_network_configuration.go create mode 100644 falcon/models/azure_impacted_entities.go create mode 100644 falcon/models/azure_issue.go create mode 100644 falcon/models/azure_issue_field_value.go create mode 100644 falcon/models/azure_issue_response_ext_v1.go create mode 100644 falcon/models/azure_issue_suppression_values_by_field_response.go create mode 100644 falcon/models/azure_issue_values_by_field_response.go create mode 100644 falcon/models/azure_script_version.go create mode 100644 falcon/models/azure_script_version_response_ext_v1.go create mode 100644 falcon/models/azure_suppression.go create mode 100644 falcon/models/azure_suppression_create_input.go create mode 100644 falcon/models/azure_suppression_create_request.go create mode 100644 falcon/models/azure_suppression_delete_request.go create mode 100644 falcon/models/azure_suppression_response_ext_v1.go create mode 100644 falcon/models/azure_suppression_target.go create mode 100644 falcon/models/azure_suppression_update_input.go create mode 100644 falcon/models/azure_suppression_update_request.go create mode 100644 falcon/models/azure_vulnerability_scanning_settings_vulnerability_scanning_custom_vnet_configuration.go create mode 100644 falcon/models/client_federated_connection_config_patch_request_v1.go create mode 100644 falcon/models/client_federated_connection_config_request_v1.go create mode 100644 falcon/models/client_federated_connection_config_resource.go create mode 100644 falcon/models/client_federated_connection_config_response_v1.go delete mode 100644 falcon/models/content_activity_metadata.go create mode 100644 falcon/models/correlationrulesapi_anomaly_scopes.go create mode 100644 falcon/models/definitions_activity_metadata.go create mode 100644 falcon/models/domain_asset.go create mode 100644 falcon/models/domain_attribute_change.go create mode 100644 falcon/models/domain_cloud_risk_event.go create mode 100644 falcon/models/domain_configuration_change.go create mode 100644 falcon/models/domain_credentialed_asset_summary.go create mode 100644 falcon/models/domain_enriched_resolution.go create mode 100644 falcon/models/domain_enriched_risk_factor.go create mode 100644 falcon/models/domain_enriched_risk_factor_reason.go create mode 100644 falcon/models/domain_enriched_risk_factor_value.go create mode 100644 falcon/models/domain_enriched_risk_instance.go create mode 100644 falcon/models/domain_enriched_risks.go create mode 100644 falcon/models/domain_enriched_timeline.go create mode 100644 falcon/models/domain_enriched_timeline_resource.go create mode 100644 falcon/models/domain_kestrel_data_export_execution_context.go create mode 100644 falcon/models/domain_kestrel_data_export_params_store_headers.go create mode 100644 falcon/models/domain_mitre_attack.go create mode 100644 falcon/models/domain_resource_event.go create mode 100644 falcon/models/domain_risk_score_matching_criteria_response.go create mode 100644 falcon/models/domain_third_party_passkey_registry.go create mode 100644 falcon/models/domain_third_party_passkey_registry_device_integrity.go create mode 100644 falcon/models/dto_service_account_properties.go create mode 100644 falcon/models/falconidapi_third_party_passkey_registry_delete_response_v1.go create mode 100644 falcon/models/falconidapi_third_party_passkey_registry_get_response_v1.go create mode 100644 falcon/models/falconidapi_third_party_passkey_registry_patch_request_v1.go create mode 100644 falcon/models/falconidapi_third_party_passkey_registry_patch_response_v1.go create mode 100644 falcon/models/falconidapi_third_party_passkey_registry_query_response_v1.go create mode 100644 falcon/models/figapi_software_package.go create mode 100644 falcon/models/flightcontrolapi_create_group_request_v1.go create mode 100644 falcon/models/flightcontrolapi_group_assignment.go create mode 100644 falcon/models/flightcontrolapi_group_users_request_v1.go create mode 100644 falcon/models/flightcontrolapi_group_users_response_v1.go create mode 100644 falcon/models/flightcontrolapi_group_users_v1.go create mode 100644 falcon/models/flightcontrolapi_profile_group_request_v1.go create mode 100644 falcon/models/flightcontrolapi_profile_group_response_v1.go create mode 100644 falcon/models/flightcontrolapi_profile_group_v1.go create mode 100644 falcon/models/flightcontrolapi_update_group_request_v1.go create mode 100644 falcon/models/flightcontrolapi_user_groups_request_v1.go create mode 100644 falcon/models/flightcontrolapi_user_groups_response_v1.go create mode 100644 falcon/models/flightcontrolapi_user_groups_v1.go create mode 100644 falcon/models/gcp_agentless_scanning_infra.go create mode 100644 falcon/models/gcp_agentless_scanning_settings.go create mode 100644 falcon/models/gcp_agentless_scanning_user_inputs.go create mode 100644 falcon/models/gcp_network_config.go create mode 100644 falcon/models/msa_api_filters_spec.go create mode 100644 falcon/models/msa_hit.go create mode 100644 falcon/models/msa_hits.go create mode 100644 falcon/models/msaspec_scope.go create mode 100644 falcon/models/mwtypes_m_w_info.go create mode 100644 falcon/models/nswip_scan_flags.go create mode 100644 falcon/models/quickscanpro_malware_family.go create mode 100644 falcon/models/quickscanpro_yara_rule.go create mode 100644 falcon/models/registration_account_counts_by_status_aggregate_response.go create mode 100644 falcon/models/registration_accounts_by_status_aggregate.go create mode 100644 falcon/models/registration_accounts_by_status_bucket.go create mode 100644 falcon/models/registration_accounts_by_status_buckets.go create mode 100644 falcon/models/registration_accounts_by_status_sub_aggregate.go create mode 100644 falcon/models/rest_get_enriched_timeline_response.go create mode 100644 falcon/models/risks_graph.go create mode 100644 falcon/models/sdk_user_evidence_record_vm.go create mode 100644 falcon/models/sdk_user_evidence_selector.go create mode 100644 falcon/models/sdk_user_evidence_vm.go create mode 100644 falcon/models/v2_budget.go create mode 100644 falcon/models/vulnerabilitymetadataapi_risk_factor_category.go diff --git a/falcon/client/access_scopes/access_scopes_client.go b/falcon/client/access_scopes/access_scopes_client.go new file mode 100644 index 000000000..c3458bea9 --- /dev/null +++ b/falcon/client/access_scopes/access_scopes_client.go @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package access_scopes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new access scopes API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for access scopes API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + ListAccessScopesExternal(params *ListAccessScopesExternalParams, opts ...ClientOption) (*ListAccessScopesExternalOK, error) + + QueryAccessScopesExternal(params *QueryAccessScopesExternalParams, opts ...ClientOption) (*QueryAccessScopesExternalOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +ListAccessScopesExternal lists access scopes by ID +*/ +func (a *Client) ListAccessScopesExternal(params *ListAccessScopesExternalParams, opts ...ClientOption) (*ListAccessScopesExternalOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewListAccessScopesExternalParams() + } + op := &runtime.ClientOperation{ + ID: "ListAccessScopesExternal", + Method: "GET", + PathPattern: "/access-scope-management/entities/access-scopes/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &ListAccessScopesExternalReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ListAccessScopesExternalOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ListAccessScopesExternal: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +QueryAccessScopesExternal queries access scopes and returns i ds +*/ +func (a *Client) QueryAccessScopesExternal(params *QueryAccessScopesExternalParams, opts ...ClientOption) (*QueryAccessScopesExternalOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewQueryAccessScopesExternalParams() + } + op := &runtime.ClientOperation{ + ID: "QueryAccessScopesExternal", + Method: "GET", + PathPattern: "/access-scope-management/queries/access-scopes/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &QueryAccessScopesExternalReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*QueryAccessScopesExternalOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for QueryAccessScopesExternal: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/falcon/client/access_scopes/list_access_scopes_external_parameters.go b/falcon/client/access_scopes/list_access_scopes_external_parameters.go new file mode 100644 index 000000000..9be1e3cec --- /dev/null +++ b/falcon/client/access_scopes/list_access_scopes_external_parameters.go @@ -0,0 +1,172 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package access_scopes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewListAccessScopesExternalParams creates a new ListAccessScopesExternalParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewListAccessScopesExternalParams() *ListAccessScopesExternalParams { + return &ListAccessScopesExternalParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewListAccessScopesExternalParamsWithTimeout creates a new ListAccessScopesExternalParams object +// with the ability to set a timeout on a request. +func NewListAccessScopesExternalParamsWithTimeout(timeout time.Duration) *ListAccessScopesExternalParams { + return &ListAccessScopesExternalParams{ + timeout: timeout, + } +} + +// NewListAccessScopesExternalParamsWithContext creates a new ListAccessScopesExternalParams object +// with the ability to set a context for a request. +func NewListAccessScopesExternalParamsWithContext(ctx context.Context) *ListAccessScopesExternalParams { + return &ListAccessScopesExternalParams{ + Context: ctx, + } +} + +// NewListAccessScopesExternalParamsWithHTTPClient creates a new ListAccessScopesExternalParams object +// with the ability to set a custom HTTPClient for a request. +func NewListAccessScopesExternalParamsWithHTTPClient(client *http.Client) *ListAccessScopesExternalParams { + return &ListAccessScopesExternalParams{ + HTTPClient: client, + } +} + +/* +ListAccessScopesExternalParams contains all the parameters to send to the API endpoint + + for the list access scopes external operation. + + Typically these are written to a http.Request. +*/ +type ListAccessScopesExternalParams struct { + + // Ids. + Ids []string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the list access scopes external params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ListAccessScopesExternalParams) WithDefaults() *ListAccessScopesExternalParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the list access scopes external params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ListAccessScopesExternalParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the list access scopes external params +func (o *ListAccessScopesExternalParams) WithTimeout(timeout time.Duration) *ListAccessScopesExternalParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the list access scopes external params +func (o *ListAccessScopesExternalParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the list access scopes external params +func (o *ListAccessScopesExternalParams) WithContext(ctx context.Context) *ListAccessScopesExternalParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the list access scopes external params +func (o *ListAccessScopesExternalParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the list access scopes external params +func (o *ListAccessScopesExternalParams) WithHTTPClient(client *http.Client) *ListAccessScopesExternalParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the list access scopes external params +func (o *ListAccessScopesExternalParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIds adds the ids to the list access scopes external params +func (o *ListAccessScopesExternalParams) WithIds(ids []string) *ListAccessScopesExternalParams { + o.SetIds(ids) + return o +} + +// SetIds adds the ids to the list access scopes external params +func (o *ListAccessScopesExternalParams) SetIds(ids []string) { + o.Ids = ids +} + +// WriteToRequest writes these params to a swagger request +func (o *ListAccessScopesExternalParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Ids != nil { + + // binding items for ids + joinedIds := o.bindParamIds(reg) + + // query array param ids + if err := r.SetQueryParam("ids", joinedIds...); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamListAccessScopesExternal binds the parameter ids +func (o *ListAccessScopesExternalParams) bindParamIds(formats strfmt.Registry) []string { + idsIR := o.Ids + + var idsIC []string + for _, idsIIR := range idsIR { // explode []string + + idsIIV := idsIIR // string as string + idsIC = append(idsIC, idsIIV) + } + + // items.CollectionFormat: "multi" + idsIS := swag.JoinByFormat(idsIC, "multi") + + return idsIS +} diff --git a/falcon/client/access_scopes/list_access_scopes_external_responses.go b/falcon/client/access_scopes/list_access_scopes_external_responses.go new file mode 100644 index 000000000..e3f11d369 --- /dev/null +++ b/falcon/client/access_scopes/list_access_scopes_external_responses.go @@ -0,0 +1,858 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package access_scopes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// ListAccessScopesExternalReader is a Reader for the ListAccessScopesExternal structure. +type ListAccessScopesExternalReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ListAccessScopesExternalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewListAccessScopesExternalOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewListAccessScopesExternalBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewListAccessScopesExternalUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewListAccessScopesExternalForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewListAccessScopesExternalNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewListAccessScopesExternalTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewListAccessScopesExternalInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /access-scope-management/entities/access-scopes/v1] ListAccessScopesExternal", response, response.Code()) + } +} + +// NewListAccessScopesExternalOK creates a ListAccessScopesExternalOK with default headers values +func NewListAccessScopesExternalOK() *ListAccessScopesExternalOK { + return &ListAccessScopesExternalOK{} +} + +/* +ListAccessScopesExternalOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ListAccessScopesExternalOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AccessscopemanagerV1ListAccessScopesResponseExternal +} + +// IsSuccess returns true when this list access scopes external o k response has a 2xx status code +func (o *ListAccessScopesExternalOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this list access scopes external o k response has a 3xx status code +func (o *ListAccessScopesExternalOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list access scopes external o k response has a 4xx status code +func (o *ListAccessScopesExternalOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this list access scopes external o k response has a 5xx status code +func (o *ListAccessScopesExternalOK) IsServerError() bool { + return false +} + +// IsCode returns true when this list access scopes external o k response a status code equal to that given +func (o *ListAccessScopesExternalOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the list access scopes external o k response +func (o *ListAccessScopesExternalOK) Code() int { + return 200 +} + +func (o *ListAccessScopesExternalOK) Error() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalOK %+v", 200, o.Payload) +} + +func (o *ListAccessScopesExternalOK) String() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalOK %+v", 200, o.Payload) +} + +func (o *ListAccessScopesExternalOK) GetPayload() *models.AccessscopemanagerV1ListAccessScopesResponseExternal { + return o.Payload +} + +func (o *ListAccessScopesExternalOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AccessscopemanagerV1ListAccessScopesResponseExternal) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewListAccessScopesExternalBadRequest creates a ListAccessScopesExternalBadRequest with default headers values +func NewListAccessScopesExternalBadRequest() *ListAccessScopesExternalBadRequest { + return &ListAccessScopesExternalBadRequest{} +} + +/* +ListAccessScopesExternalBadRequest describes a response with status code 400, with default header values. + +Returned when the request is malformed. +*/ +type ListAccessScopesExternalBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AccessscopemanagerV1MSAResponse +} + +// IsSuccess returns true when this list access scopes external bad request response has a 2xx status code +func (o *ListAccessScopesExternalBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list access scopes external bad request response has a 3xx status code +func (o *ListAccessScopesExternalBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list access scopes external bad request response has a 4xx status code +func (o *ListAccessScopesExternalBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this list access scopes external bad request response has a 5xx status code +func (o *ListAccessScopesExternalBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this list access scopes external bad request response a status code equal to that given +func (o *ListAccessScopesExternalBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the list access scopes external bad request response +func (o *ListAccessScopesExternalBadRequest) Code() int { + return 400 +} + +func (o *ListAccessScopesExternalBadRequest) Error() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalBadRequest %+v", 400, o.Payload) +} + +func (o *ListAccessScopesExternalBadRequest) String() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalBadRequest %+v", 400, o.Payload) +} + +func (o *ListAccessScopesExternalBadRequest) GetPayload() *models.AccessscopemanagerV1MSAResponse { + return o.Payload +} + +func (o *ListAccessScopesExternalBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AccessscopemanagerV1MSAResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewListAccessScopesExternalUnauthorized creates a ListAccessScopesExternalUnauthorized with default headers values +func NewListAccessScopesExternalUnauthorized() *ListAccessScopesExternalUnauthorized { + return &ListAccessScopesExternalUnauthorized{} +} + +/* +ListAccessScopesExternalUnauthorized describes a response with status code 401, with default header values. + +Returned when the request is unauthorized. +*/ +type ListAccessScopesExternalUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AccessscopemanagerV1MSAResponse +} + +// IsSuccess returns true when this list access scopes external unauthorized response has a 2xx status code +func (o *ListAccessScopesExternalUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list access scopes external unauthorized response has a 3xx status code +func (o *ListAccessScopesExternalUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list access scopes external unauthorized response has a 4xx status code +func (o *ListAccessScopesExternalUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this list access scopes external unauthorized response has a 5xx status code +func (o *ListAccessScopesExternalUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this list access scopes external unauthorized response a status code equal to that given +func (o *ListAccessScopesExternalUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the list access scopes external unauthorized response +func (o *ListAccessScopesExternalUnauthorized) Code() int { + return 401 +} + +func (o *ListAccessScopesExternalUnauthorized) Error() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalUnauthorized %+v", 401, o.Payload) +} + +func (o *ListAccessScopesExternalUnauthorized) String() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalUnauthorized %+v", 401, o.Payload) +} + +func (o *ListAccessScopesExternalUnauthorized) GetPayload() *models.AccessscopemanagerV1MSAResponse { + return o.Payload +} + +func (o *ListAccessScopesExternalUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AccessscopemanagerV1MSAResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewListAccessScopesExternalForbidden creates a ListAccessScopesExternalForbidden with default headers values +func NewListAccessScopesExternalForbidden() *ListAccessScopesExternalForbidden { + return &ListAccessScopesExternalForbidden{} +} + +/* +ListAccessScopesExternalForbidden describes a response with status code 403, with default header values. + +Returned when the subject does not have permission to access the resource. +*/ +type ListAccessScopesExternalForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AccessscopemanagerV1MSAResponse +} + +// IsSuccess returns true when this list access scopes external forbidden response has a 2xx status code +func (o *ListAccessScopesExternalForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list access scopes external forbidden response has a 3xx status code +func (o *ListAccessScopesExternalForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list access scopes external forbidden response has a 4xx status code +func (o *ListAccessScopesExternalForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this list access scopes external forbidden response has a 5xx status code +func (o *ListAccessScopesExternalForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this list access scopes external forbidden response a status code equal to that given +func (o *ListAccessScopesExternalForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the list access scopes external forbidden response +func (o *ListAccessScopesExternalForbidden) Code() int { + return 403 +} + +func (o *ListAccessScopesExternalForbidden) Error() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalForbidden %+v", 403, o.Payload) +} + +func (o *ListAccessScopesExternalForbidden) String() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalForbidden %+v", 403, o.Payload) +} + +func (o *ListAccessScopesExternalForbidden) GetPayload() *models.AccessscopemanagerV1MSAResponse { + return o.Payload +} + +func (o *ListAccessScopesExternalForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AccessscopemanagerV1MSAResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewListAccessScopesExternalNotFound creates a ListAccessScopesExternalNotFound with default headers values +func NewListAccessScopesExternalNotFound() *ListAccessScopesExternalNotFound { + return &ListAccessScopesExternalNotFound{} +} + +/* +ListAccessScopesExternalNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type ListAccessScopesExternalNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AccessscopemanagerV1MSAResponse +} + +// IsSuccess returns true when this list access scopes external not found response has a 2xx status code +func (o *ListAccessScopesExternalNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list access scopes external not found response has a 3xx status code +func (o *ListAccessScopesExternalNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list access scopes external not found response has a 4xx status code +func (o *ListAccessScopesExternalNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this list access scopes external not found response has a 5xx status code +func (o *ListAccessScopesExternalNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this list access scopes external not found response a status code equal to that given +func (o *ListAccessScopesExternalNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the list access scopes external not found response +func (o *ListAccessScopesExternalNotFound) Code() int { + return 404 +} + +func (o *ListAccessScopesExternalNotFound) Error() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalNotFound %+v", 404, o.Payload) +} + +func (o *ListAccessScopesExternalNotFound) String() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalNotFound %+v", 404, o.Payload) +} + +func (o *ListAccessScopesExternalNotFound) GetPayload() *models.AccessscopemanagerV1MSAResponse { + return o.Payload +} + +func (o *ListAccessScopesExternalNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AccessscopemanagerV1MSAResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewListAccessScopesExternalTooManyRequests creates a ListAccessScopesExternalTooManyRequests with default headers values +func NewListAccessScopesExternalTooManyRequests() *ListAccessScopesExternalTooManyRequests { + return &ListAccessScopesExternalTooManyRequests{} +} + +/* +ListAccessScopesExternalTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type ListAccessScopesExternalTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this list access scopes external too many requests response has a 2xx status code +func (o *ListAccessScopesExternalTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list access scopes external too many requests response has a 3xx status code +func (o *ListAccessScopesExternalTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list access scopes external too many requests response has a 4xx status code +func (o *ListAccessScopesExternalTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this list access scopes external too many requests response has a 5xx status code +func (o *ListAccessScopesExternalTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this list access scopes external too many requests response a status code equal to that given +func (o *ListAccessScopesExternalTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the list access scopes external too many requests response +func (o *ListAccessScopesExternalTooManyRequests) Code() int { + return 429 +} + +func (o *ListAccessScopesExternalTooManyRequests) Error() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalTooManyRequests %+v", 429, o.Payload) +} + +func (o *ListAccessScopesExternalTooManyRequests) String() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalTooManyRequests %+v", 429, o.Payload) +} + +func (o *ListAccessScopesExternalTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *ListAccessScopesExternalTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewListAccessScopesExternalInternalServerError creates a ListAccessScopesExternalInternalServerError with default headers values +func NewListAccessScopesExternalInternalServerError() *ListAccessScopesExternalInternalServerError { + return &ListAccessScopesExternalInternalServerError{} +} + +/* +ListAccessScopesExternalInternalServerError describes a response with status code 500, with default header values. + +Server error +*/ +type ListAccessScopesExternalInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AccessscopemanagerV1MSAResponse +} + +// IsSuccess returns true when this list access scopes external internal server error response has a 2xx status code +func (o *ListAccessScopesExternalInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list access scopes external internal server error response has a 3xx status code +func (o *ListAccessScopesExternalInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list access scopes external internal server error response has a 4xx status code +func (o *ListAccessScopesExternalInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this list access scopes external internal server error response has a 5xx status code +func (o *ListAccessScopesExternalInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this list access scopes external internal server error response a status code equal to that given +func (o *ListAccessScopesExternalInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the list access scopes external internal server error response +func (o *ListAccessScopesExternalInternalServerError) Code() int { + return 500 +} + +func (o *ListAccessScopesExternalInternalServerError) Error() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalInternalServerError %+v", 500, o.Payload) +} + +func (o *ListAccessScopesExternalInternalServerError) String() string { + return fmt.Sprintf("[GET /access-scope-management/entities/access-scopes/v1][%d] listAccessScopesExternalInternalServerError %+v", 500, o.Payload) +} + +func (o *ListAccessScopesExternalInternalServerError) GetPayload() *models.AccessscopemanagerV1MSAResponse { + return o.Payload +} + +func (o *ListAccessScopesExternalInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AccessscopemanagerV1MSAResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/access_scopes/query_access_scopes_external_parameters.go b/falcon/client/access_scopes/query_access_scopes_external_parameters.go new file mode 100644 index 000000000..ab4baebc8 --- /dev/null +++ b/falcon/client/access_scopes/query_access_scopes_external_parameters.go @@ -0,0 +1,262 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package access_scopes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewQueryAccessScopesExternalParams creates a new QueryAccessScopesExternalParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewQueryAccessScopesExternalParams() *QueryAccessScopesExternalParams { + return &QueryAccessScopesExternalParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewQueryAccessScopesExternalParamsWithTimeout creates a new QueryAccessScopesExternalParams object +// with the ability to set a timeout on a request. +func NewQueryAccessScopesExternalParamsWithTimeout(timeout time.Duration) *QueryAccessScopesExternalParams { + return &QueryAccessScopesExternalParams{ + timeout: timeout, + } +} + +// NewQueryAccessScopesExternalParamsWithContext creates a new QueryAccessScopesExternalParams object +// with the ability to set a context for a request. +func NewQueryAccessScopesExternalParamsWithContext(ctx context.Context) *QueryAccessScopesExternalParams { + return &QueryAccessScopesExternalParams{ + Context: ctx, + } +} + +// NewQueryAccessScopesExternalParamsWithHTTPClient creates a new QueryAccessScopesExternalParams object +// with the ability to set a custom HTTPClient for a request. +func NewQueryAccessScopesExternalParamsWithHTTPClient(client *http.Client) *QueryAccessScopesExternalParams { + return &QueryAccessScopesExternalParams{ + HTTPClient: client, + } +} + +/* +QueryAccessScopesExternalParams contains all the parameters to send to the API endpoint + + for the query access scopes external operation. + + Typically these are written to a http.Request. +*/ +type QueryAccessScopesExternalParams struct { + + /* Filter. + + A valid FQL filter. + Access Scope fields: name, created_by, created_at. + */ + Filter *string + + // Limit. + // + // Format: int64 + Limit *int64 + + // Offset. + // + // Format: int64 + Offset *int64 + + // Sort. + Sort *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the query access scopes external params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *QueryAccessScopesExternalParams) WithDefaults() *QueryAccessScopesExternalParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the query access scopes external params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *QueryAccessScopesExternalParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the query access scopes external params +func (o *QueryAccessScopesExternalParams) WithTimeout(timeout time.Duration) *QueryAccessScopesExternalParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the query access scopes external params +func (o *QueryAccessScopesExternalParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the query access scopes external params +func (o *QueryAccessScopesExternalParams) WithContext(ctx context.Context) *QueryAccessScopesExternalParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the query access scopes external params +func (o *QueryAccessScopesExternalParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the query access scopes external params +func (o *QueryAccessScopesExternalParams) WithHTTPClient(client *http.Client) *QueryAccessScopesExternalParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the query access scopes external params +func (o *QueryAccessScopesExternalParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilter adds the filter to the query access scopes external params +func (o *QueryAccessScopesExternalParams) WithFilter(filter *string) *QueryAccessScopesExternalParams { + o.SetFilter(filter) + return o +} + +// SetFilter adds the filter to the query access scopes external params +func (o *QueryAccessScopesExternalParams) SetFilter(filter *string) { + o.Filter = filter +} + +// WithLimit adds the limit to the query access scopes external params +func (o *QueryAccessScopesExternalParams) WithLimit(limit *int64) *QueryAccessScopesExternalParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the query access scopes external params +func (o *QueryAccessScopesExternalParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the query access scopes external params +func (o *QueryAccessScopesExternalParams) WithOffset(offset *int64) *QueryAccessScopesExternalParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the query access scopes external params +func (o *QueryAccessScopesExternalParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithSort adds the sort to the query access scopes external params +func (o *QueryAccessScopesExternalParams) WithSort(sort *string) *QueryAccessScopesExternalParams { + o.SetSort(sort) + return o +} + +// SetSort adds the sort to the query access scopes external params +func (o *QueryAccessScopesExternalParams) SetSort(sort *string) { + o.Sort = sort +} + +// WriteToRequest writes these params to a swagger request +func (o *QueryAccessScopesExternalParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filter != nil { + + // query param filter + var qrFilter string + + if o.Filter != nil { + qrFilter = *o.Filter + } + qFilter := qrFilter + if qFilter != "" { + + if err := r.SetQueryParam("filter", qFilter); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Sort != nil { + + // query param sort + var qrSort string + + if o.Sort != nil { + qrSort = *o.Sort + } + qSort := qrSort + if qSort != "" { + + if err := r.SetQueryParam("sort", qSort); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/access_scopes/query_access_scopes_external_responses.go b/falcon/client/access_scopes/query_access_scopes_external_responses.go new file mode 100644 index 000000000..f45862dca --- /dev/null +++ b/falcon/client/access_scopes/query_access_scopes_external_responses.go @@ -0,0 +1,858 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package access_scopes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// QueryAccessScopesExternalReader is a Reader for the QueryAccessScopesExternal structure. +type QueryAccessScopesExternalReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *QueryAccessScopesExternalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewQueryAccessScopesExternalOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewQueryAccessScopesExternalBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewQueryAccessScopesExternalUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewQueryAccessScopesExternalForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewQueryAccessScopesExternalNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewQueryAccessScopesExternalTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewQueryAccessScopesExternalInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /access-scope-management/queries/access-scopes/v1] QueryAccessScopesExternal", response, response.Code()) + } +} + +// NewQueryAccessScopesExternalOK creates a QueryAccessScopesExternalOK with default headers values +func NewQueryAccessScopesExternalOK() *QueryAccessScopesExternalOK { + return &QueryAccessScopesExternalOK{} +} + +/* +QueryAccessScopesExternalOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type QueryAccessScopesExternalOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AccessscopemanagerV1QueryAccessScopesResponseExternal +} + +// IsSuccess returns true when this query access scopes external o k response has a 2xx status code +func (o *QueryAccessScopesExternalOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this query access scopes external o k response has a 3xx status code +func (o *QueryAccessScopesExternalOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query access scopes external o k response has a 4xx status code +func (o *QueryAccessScopesExternalOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this query access scopes external o k response has a 5xx status code +func (o *QueryAccessScopesExternalOK) IsServerError() bool { + return false +} + +// IsCode returns true when this query access scopes external o k response a status code equal to that given +func (o *QueryAccessScopesExternalOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the query access scopes external o k response +func (o *QueryAccessScopesExternalOK) Code() int { + return 200 +} + +func (o *QueryAccessScopesExternalOK) Error() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalOK %+v", 200, o.Payload) +} + +func (o *QueryAccessScopesExternalOK) String() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalOK %+v", 200, o.Payload) +} + +func (o *QueryAccessScopesExternalOK) GetPayload() *models.AccessscopemanagerV1QueryAccessScopesResponseExternal { + return o.Payload +} + +func (o *QueryAccessScopesExternalOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AccessscopemanagerV1QueryAccessScopesResponseExternal) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryAccessScopesExternalBadRequest creates a QueryAccessScopesExternalBadRequest with default headers values +func NewQueryAccessScopesExternalBadRequest() *QueryAccessScopesExternalBadRequest { + return &QueryAccessScopesExternalBadRequest{} +} + +/* +QueryAccessScopesExternalBadRequest describes a response with status code 400, with default header values. + +Returned when the request is malformed. +*/ +type QueryAccessScopesExternalBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AccessscopemanagerV1MSAResponse +} + +// IsSuccess returns true when this query access scopes external bad request response has a 2xx status code +func (o *QueryAccessScopesExternalBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query access scopes external bad request response has a 3xx status code +func (o *QueryAccessScopesExternalBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query access scopes external bad request response has a 4xx status code +func (o *QueryAccessScopesExternalBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this query access scopes external bad request response has a 5xx status code +func (o *QueryAccessScopesExternalBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this query access scopes external bad request response a status code equal to that given +func (o *QueryAccessScopesExternalBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the query access scopes external bad request response +func (o *QueryAccessScopesExternalBadRequest) Code() int { + return 400 +} + +func (o *QueryAccessScopesExternalBadRequest) Error() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalBadRequest %+v", 400, o.Payload) +} + +func (o *QueryAccessScopesExternalBadRequest) String() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalBadRequest %+v", 400, o.Payload) +} + +func (o *QueryAccessScopesExternalBadRequest) GetPayload() *models.AccessscopemanagerV1MSAResponse { + return o.Payload +} + +func (o *QueryAccessScopesExternalBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AccessscopemanagerV1MSAResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryAccessScopesExternalUnauthorized creates a QueryAccessScopesExternalUnauthorized with default headers values +func NewQueryAccessScopesExternalUnauthorized() *QueryAccessScopesExternalUnauthorized { + return &QueryAccessScopesExternalUnauthorized{} +} + +/* +QueryAccessScopesExternalUnauthorized describes a response with status code 401, with default header values. + +Returned when the request is unauthorized. +*/ +type QueryAccessScopesExternalUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AccessscopemanagerV1MSAResponse +} + +// IsSuccess returns true when this query access scopes external unauthorized response has a 2xx status code +func (o *QueryAccessScopesExternalUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query access scopes external unauthorized response has a 3xx status code +func (o *QueryAccessScopesExternalUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query access scopes external unauthorized response has a 4xx status code +func (o *QueryAccessScopesExternalUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this query access scopes external unauthorized response has a 5xx status code +func (o *QueryAccessScopesExternalUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this query access scopes external unauthorized response a status code equal to that given +func (o *QueryAccessScopesExternalUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the query access scopes external unauthorized response +func (o *QueryAccessScopesExternalUnauthorized) Code() int { + return 401 +} + +func (o *QueryAccessScopesExternalUnauthorized) Error() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalUnauthorized %+v", 401, o.Payload) +} + +func (o *QueryAccessScopesExternalUnauthorized) String() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalUnauthorized %+v", 401, o.Payload) +} + +func (o *QueryAccessScopesExternalUnauthorized) GetPayload() *models.AccessscopemanagerV1MSAResponse { + return o.Payload +} + +func (o *QueryAccessScopesExternalUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AccessscopemanagerV1MSAResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryAccessScopesExternalForbidden creates a QueryAccessScopesExternalForbidden with default headers values +func NewQueryAccessScopesExternalForbidden() *QueryAccessScopesExternalForbidden { + return &QueryAccessScopesExternalForbidden{} +} + +/* +QueryAccessScopesExternalForbidden describes a response with status code 403, with default header values. + +Returned when the subject does not have permission to access the resource. +*/ +type QueryAccessScopesExternalForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AccessscopemanagerV1MSAResponse +} + +// IsSuccess returns true when this query access scopes external forbidden response has a 2xx status code +func (o *QueryAccessScopesExternalForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query access scopes external forbidden response has a 3xx status code +func (o *QueryAccessScopesExternalForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query access scopes external forbidden response has a 4xx status code +func (o *QueryAccessScopesExternalForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this query access scopes external forbidden response has a 5xx status code +func (o *QueryAccessScopesExternalForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this query access scopes external forbidden response a status code equal to that given +func (o *QueryAccessScopesExternalForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the query access scopes external forbidden response +func (o *QueryAccessScopesExternalForbidden) Code() int { + return 403 +} + +func (o *QueryAccessScopesExternalForbidden) Error() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalForbidden %+v", 403, o.Payload) +} + +func (o *QueryAccessScopesExternalForbidden) String() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalForbidden %+v", 403, o.Payload) +} + +func (o *QueryAccessScopesExternalForbidden) GetPayload() *models.AccessscopemanagerV1MSAResponse { + return o.Payload +} + +func (o *QueryAccessScopesExternalForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AccessscopemanagerV1MSAResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryAccessScopesExternalNotFound creates a QueryAccessScopesExternalNotFound with default headers values +func NewQueryAccessScopesExternalNotFound() *QueryAccessScopesExternalNotFound { + return &QueryAccessScopesExternalNotFound{} +} + +/* +QueryAccessScopesExternalNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type QueryAccessScopesExternalNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AccessscopemanagerV1MSAResponse +} + +// IsSuccess returns true when this query access scopes external not found response has a 2xx status code +func (o *QueryAccessScopesExternalNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query access scopes external not found response has a 3xx status code +func (o *QueryAccessScopesExternalNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query access scopes external not found response has a 4xx status code +func (o *QueryAccessScopesExternalNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this query access scopes external not found response has a 5xx status code +func (o *QueryAccessScopesExternalNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this query access scopes external not found response a status code equal to that given +func (o *QueryAccessScopesExternalNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the query access scopes external not found response +func (o *QueryAccessScopesExternalNotFound) Code() int { + return 404 +} + +func (o *QueryAccessScopesExternalNotFound) Error() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalNotFound %+v", 404, o.Payload) +} + +func (o *QueryAccessScopesExternalNotFound) String() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalNotFound %+v", 404, o.Payload) +} + +func (o *QueryAccessScopesExternalNotFound) GetPayload() *models.AccessscopemanagerV1MSAResponse { + return o.Payload +} + +func (o *QueryAccessScopesExternalNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AccessscopemanagerV1MSAResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryAccessScopesExternalTooManyRequests creates a QueryAccessScopesExternalTooManyRequests with default headers values +func NewQueryAccessScopesExternalTooManyRequests() *QueryAccessScopesExternalTooManyRequests { + return &QueryAccessScopesExternalTooManyRequests{} +} + +/* +QueryAccessScopesExternalTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type QueryAccessScopesExternalTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this query access scopes external too many requests response has a 2xx status code +func (o *QueryAccessScopesExternalTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query access scopes external too many requests response has a 3xx status code +func (o *QueryAccessScopesExternalTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query access scopes external too many requests response has a 4xx status code +func (o *QueryAccessScopesExternalTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this query access scopes external too many requests response has a 5xx status code +func (o *QueryAccessScopesExternalTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this query access scopes external too many requests response a status code equal to that given +func (o *QueryAccessScopesExternalTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the query access scopes external too many requests response +func (o *QueryAccessScopesExternalTooManyRequests) Code() int { + return 429 +} + +func (o *QueryAccessScopesExternalTooManyRequests) Error() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalTooManyRequests %+v", 429, o.Payload) +} + +func (o *QueryAccessScopesExternalTooManyRequests) String() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalTooManyRequests %+v", 429, o.Payload) +} + +func (o *QueryAccessScopesExternalTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *QueryAccessScopesExternalTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryAccessScopesExternalInternalServerError creates a QueryAccessScopesExternalInternalServerError with default headers values +func NewQueryAccessScopesExternalInternalServerError() *QueryAccessScopesExternalInternalServerError { + return &QueryAccessScopesExternalInternalServerError{} +} + +/* +QueryAccessScopesExternalInternalServerError describes a response with status code 500, with default header values. + +Server error +*/ +type QueryAccessScopesExternalInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AccessscopemanagerV1MSAResponse +} + +// IsSuccess returns true when this query access scopes external internal server error response has a 2xx status code +func (o *QueryAccessScopesExternalInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query access scopes external internal server error response has a 3xx status code +func (o *QueryAccessScopesExternalInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query access scopes external internal server error response has a 4xx status code +func (o *QueryAccessScopesExternalInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this query access scopes external internal server error response has a 5xx status code +func (o *QueryAccessScopesExternalInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this query access scopes external internal server error response a status code equal to that given +func (o *QueryAccessScopesExternalInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the query access scopes external internal server error response +func (o *QueryAccessScopesExternalInternalServerError) Code() int { + return 500 +} + +func (o *QueryAccessScopesExternalInternalServerError) Error() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalInternalServerError %+v", 500, o.Payload) +} + +func (o *QueryAccessScopesExternalInternalServerError) String() string { + return fmt.Sprintf("[GET /access-scope-management/queries/access-scopes/v1][%d] queryAccessScopesExternalInternalServerError %+v", 500, o.Payload) +} + +func (o *QueryAccessScopesExternalInternalServerError) GetPayload() *models.AccessscopemanagerV1MSAResponse { + return o.Payload +} + +func (o *QueryAccessScopesExternalInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AccessscopemanagerV1MSAResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/api_clients/api_clients_client.go b/falcon/client/api_clients/api_clients_client.go new file mode 100644 index 000000000..8c811adf5 --- /dev/null +++ b/falcon/client/api_clients/api_clients_client.go @@ -0,0 +1,319 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new api clients API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for api clients API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + CreateAPIClient(params *CreateAPIClientParams, opts ...ClientOption) (*CreateAPIClientCreated, error) + + DeleteAPIClients(params *DeleteAPIClientsParams, opts ...ClientOption) (*DeleteAPIClientsAccepted, error) + + GetAPIClients(params *GetAPIClientsParams, opts ...ClientOption) (*GetAPIClientsOK, error) + + GetAccessibleScopes(params *GetAccessibleScopesParams, opts ...ClientOption) (*GetAccessibleScopesOK, error) + + GetAllAPIClientIdsForCustomer(params *GetAllAPIClientIdsForCustomerParams, opts ...ClientOption) (*GetAllAPIClientIdsForCustomerOK, error) + + ResetAPIClientSecret(params *ResetAPIClientSecretParams, opts ...ClientOption) (*ResetAPIClientSecretCreated, error) + + UpdateAPIClient(params *UpdateAPIClientParams, opts ...ClientOption) (*UpdateAPIClientNoContent, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +CreateAPIClient creates new API client +*/ +func (a *Client) CreateAPIClient(params *CreateAPIClientParams, opts ...ClientOption) (*CreateAPIClientCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCreateAPIClientParams() + } + op := &runtime.ClientOperation{ + ID: "CreateAPIClient", + Method: "POST", + PathPattern: "/api-clients/entities/api-clients/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CreateAPIClientReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CreateAPIClientCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for CreateAPIClient: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +DeleteAPIClients deletes existing API client s based on API client ID s provided as request parameter s ids +*/ +func (a *Client) DeleteAPIClients(params *DeleteAPIClientsParams, opts ...ClientOption) (*DeleteAPIClientsAccepted, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteAPIClientsParams() + } + op := &runtime.ClientOperation{ + ID: "DeleteAPIClients", + Method: "DELETE", + PathPattern: "/api-clients/entities/api-clients/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &DeleteAPIClientsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteAPIClientsAccepted) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for DeleteAPIClients: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +GetAPIClients gets API client s based on API client ID s provided as request parameter s ids +*/ +func (a *Client) GetAPIClients(params *GetAPIClientsParams, opts ...ClientOption) (*GetAPIClientsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAPIClientsParams() + } + op := &runtime.ClientOperation{ + ID: "GetAPIClients", + Method: "GET", + PathPattern: "/api-clients/entities/api-clients/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &GetAPIClientsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetAPIClientsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for GetAPIClients: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +GetAccessibleScopes gets all available scopes for customer +*/ +func (a *Client) GetAccessibleScopes(params *GetAccessibleScopesParams, opts ...ClientOption) (*GetAccessibleScopesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAccessibleScopesParams() + } + op := &runtime.ClientOperation{ + ID: "GetAccessibleScopes", + Method: "GET", + PathPattern: "/api-clients/entities/accessible-scopes/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &GetAccessibleScopesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetAccessibleScopesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for GetAccessibleScopes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +GetAllAPIClientIdsForCustomer gets all API client ID s for customer +*/ +func (a *Client) GetAllAPIClientIdsForCustomer(params *GetAllAPIClientIdsForCustomerParams, opts ...ClientOption) (*GetAllAPIClientIdsForCustomerOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAllAPIClientIdsForCustomerParams() + } + op := &runtime.ClientOperation{ + ID: "GetAllAPIClientIdsForCustomer", + Method: "GET", + PathPattern: "/api-clients/queries/api-clients/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &GetAllAPIClientIdsForCustomerReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetAllAPIClientIdsForCustomerOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for GetAllAPIClientIdsForCustomer: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +ResetAPIClientSecret resets existing API client s s secret based on API client ID s provided as request parameter s ids API client secret can be reset by specifying appropriate action in request parameter action name +*/ +func (a *Client) ResetAPIClientSecret(params *ResetAPIClientSecretParams, opts ...ClientOption) (*ResetAPIClientSecretCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewResetAPIClientSecretParams() + } + op := &runtime.ClientOperation{ + ID: "ResetAPIClientSecret", + Method: "POST", + PathPattern: "/api-clients/entities/api-clients-actions/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &ResetAPIClientSecretReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ResetAPIClientSecretCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ResetAPIClientSecret: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +UpdateAPIClient updates existing API client based on API client ID provided as request parameter ids client secret remains unaffected +*/ +func (a *Client) UpdateAPIClient(params *UpdateAPIClientParams, opts ...ClientOption) (*UpdateAPIClientNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdateAPIClientParams() + } + op := &runtime.ClientOperation{ + ID: "UpdateAPIClient", + Method: "PATCH", + PathPattern: "/api-clients/entities/api-clients/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &UpdateAPIClientReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UpdateAPIClientNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for UpdateAPIClient: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/falcon/client/api_clients/create_api_client_parameters.go b/falcon/client/api_clients/create_api_client_parameters.go new file mode 100644 index 000000000..32fa44f57 --- /dev/null +++ b/falcon/client/api_clients/create_api_client_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewCreateAPIClientParams creates a new CreateAPIClientParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCreateAPIClientParams() *CreateAPIClientParams { + return &CreateAPIClientParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCreateAPIClientParamsWithTimeout creates a new CreateAPIClientParams object +// with the ability to set a timeout on a request. +func NewCreateAPIClientParamsWithTimeout(timeout time.Duration) *CreateAPIClientParams { + return &CreateAPIClientParams{ + timeout: timeout, + } +} + +// NewCreateAPIClientParamsWithContext creates a new CreateAPIClientParams object +// with the ability to set a context for a request. +func NewCreateAPIClientParamsWithContext(ctx context.Context) *CreateAPIClientParams { + return &CreateAPIClientParams{ + Context: ctx, + } +} + +// NewCreateAPIClientParamsWithHTTPClient creates a new CreateAPIClientParams object +// with the ability to set a custom HTTPClient for a request. +func NewCreateAPIClientParamsWithHTTPClient(client *http.Client) *CreateAPIClientParams { + return &CreateAPIClientParams{ + HTTPClient: client, + } +} + +/* +CreateAPIClientParams contains all the parameters to send to the API endpoint + + for the create API client operation. + + Typically these are written to a http.Request. +*/ +type CreateAPIClientParams struct { + + // Body. + Body *models.APIClientRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the create API client params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateAPIClientParams) WithDefaults() *CreateAPIClientParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the create API client params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateAPIClientParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the create API client params +func (o *CreateAPIClientParams) WithTimeout(timeout time.Duration) *CreateAPIClientParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the create API client params +func (o *CreateAPIClientParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the create API client params +func (o *CreateAPIClientParams) WithContext(ctx context.Context) *CreateAPIClientParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the create API client params +func (o *CreateAPIClientParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the create API client params +func (o *CreateAPIClientParams) WithHTTPClient(client *http.Client) *CreateAPIClientParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the create API client params +func (o *CreateAPIClientParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the create API client params +func (o *CreateAPIClientParams) WithBody(body *models.APIClientRequest) *CreateAPIClientParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the create API client params +func (o *CreateAPIClientParams) SetBody(body *models.APIClientRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *CreateAPIClientParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/api_clients/create_api_client_responses.go b/falcon/client/api_clients/create_api_client_responses.go new file mode 100644 index 000000000..dbedb3811 --- /dev/null +++ b/falcon/client/api_clients/create_api_client_responses.go @@ -0,0 +1,742 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CreateAPIClientReader is a Reader for the CreateAPIClient structure. +type CreateAPIClientReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CreateAPIClientReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewCreateAPIClientCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCreateAPIClientBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCreateAPIClientForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewCreateAPIClientConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCreateAPIClientTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCreateAPIClientInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /api-clients/entities/api-clients/v1] CreateAPIClient", response, response.Code()) + } +} + +// NewCreateAPIClientCreated creates a CreateAPIClientCreated with default headers values +func NewCreateAPIClientCreated() *CreateAPIClientCreated { + return &CreateAPIClientCreated{} +} + +/* +CreateAPIClientCreated describes a response with status code 201, with default header values. + +Created +*/ +type CreateAPIClientCreated struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaEntitiesResponse +} + +// IsSuccess returns true when this create Api client created response has a 2xx status code +func (o *CreateAPIClientCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this create Api client created response has a 3xx status code +func (o *CreateAPIClientCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create Api client created response has a 4xx status code +func (o *CreateAPIClientCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this create Api client created response has a 5xx status code +func (o *CreateAPIClientCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this create Api client created response a status code equal to that given +func (o *CreateAPIClientCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the create Api client created response +func (o *CreateAPIClientCreated) Code() int { + return 201 +} + +func (o *CreateAPIClientCreated) Error() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients/v1][%d] createApiClientCreated %+v", 201, o.Payload) +} + +func (o *CreateAPIClientCreated) String() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients/v1][%d] createApiClientCreated %+v", 201, o.Payload) +} + +func (o *CreateAPIClientCreated) GetPayload() *models.MsaEntitiesResponse { + return o.Payload +} + +func (o *CreateAPIClientCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaEntitiesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateAPIClientBadRequest creates a CreateAPIClientBadRequest with default headers values +func NewCreateAPIClientBadRequest() *CreateAPIClientBadRequest { + return &CreateAPIClientBadRequest{} +} + +/* +CreateAPIClientBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CreateAPIClientBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this create Api client bad request response has a 2xx status code +func (o *CreateAPIClientBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create Api client bad request response has a 3xx status code +func (o *CreateAPIClientBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create Api client bad request response has a 4xx status code +func (o *CreateAPIClientBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this create Api client bad request response has a 5xx status code +func (o *CreateAPIClientBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this create Api client bad request response a status code equal to that given +func (o *CreateAPIClientBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the create Api client bad request response +func (o *CreateAPIClientBadRequest) Code() int { + return 400 +} + +func (o *CreateAPIClientBadRequest) Error() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients/v1][%d] createApiClientBadRequest %+v", 400, o.Payload) +} + +func (o *CreateAPIClientBadRequest) String() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients/v1][%d] createApiClientBadRequest %+v", 400, o.Payload) +} + +func (o *CreateAPIClientBadRequest) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CreateAPIClientBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateAPIClientForbidden creates a CreateAPIClientForbidden with default headers values +func NewCreateAPIClientForbidden() *CreateAPIClientForbidden { + return &CreateAPIClientForbidden{} +} + +/* +CreateAPIClientForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CreateAPIClientForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this create Api client forbidden response has a 2xx status code +func (o *CreateAPIClientForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create Api client forbidden response has a 3xx status code +func (o *CreateAPIClientForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create Api client forbidden response has a 4xx status code +func (o *CreateAPIClientForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this create Api client forbidden response has a 5xx status code +func (o *CreateAPIClientForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this create Api client forbidden response a status code equal to that given +func (o *CreateAPIClientForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the create Api client forbidden response +func (o *CreateAPIClientForbidden) Code() int { + return 403 +} + +func (o *CreateAPIClientForbidden) Error() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients/v1][%d] createApiClientForbidden %+v", 403, o.Payload) +} + +func (o *CreateAPIClientForbidden) String() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients/v1][%d] createApiClientForbidden %+v", 403, o.Payload) +} + +func (o *CreateAPIClientForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CreateAPIClientForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateAPIClientConflict creates a CreateAPIClientConflict with default headers values +func NewCreateAPIClientConflict() *CreateAPIClientConflict { + return &CreateAPIClientConflict{} +} + +/* +CreateAPIClientConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type CreateAPIClientConflict struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this create Api client conflict response has a 2xx status code +func (o *CreateAPIClientConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create Api client conflict response has a 3xx status code +func (o *CreateAPIClientConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create Api client conflict response has a 4xx status code +func (o *CreateAPIClientConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this create Api client conflict response has a 5xx status code +func (o *CreateAPIClientConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this create Api client conflict response a status code equal to that given +func (o *CreateAPIClientConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the create Api client conflict response +func (o *CreateAPIClientConflict) Code() int { + return 409 +} + +func (o *CreateAPIClientConflict) Error() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients/v1][%d] createApiClientConflict %+v", 409, o.Payload) +} + +func (o *CreateAPIClientConflict) String() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients/v1][%d] createApiClientConflict %+v", 409, o.Payload) +} + +func (o *CreateAPIClientConflict) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CreateAPIClientConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateAPIClientTooManyRequests creates a CreateAPIClientTooManyRequests with default headers values +func NewCreateAPIClientTooManyRequests() *CreateAPIClientTooManyRequests { + return &CreateAPIClientTooManyRequests{} +} + +/* +CreateAPIClientTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CreateAPIClientTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this create Api client too many requests response has a 2xx status code +func (o *CreateAPIClientTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create Api client too many requests response has a 3xx status code +func (o *CreateAPIClientTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create Api client too many requests response has a 4xx status code +func (o *CreateAPIClientTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this create Api client too many requests response has a 5xx status code +func (o *CreateAPIClientTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this create Api client too many requests response a status code equal to that given +func (o *CreateAPIClientTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the create Api client too many requests response +func (o *CreateAPIClientTooManyRequests) Code() int { + return 429 +} + +func (o *CreateAPIClientTooManyRequests) Error() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients/v1][%d] createApiClientTooManyRequests %+v", 429, o.Payload) +} + +func (o *CreateAPIClientTooManyRequests) String() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients/v1][%d] createApiClientTooManyRequests %+v", 429, o.Payload) +} + +func (o *CreateAPIClientTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CreateAPIClientTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateAPIClientInternalServerError creates a CreateAPIClientInternalServerError with default headers values +func NewCreateAPIClientInternalServerError() *CreateAPIClientInternalServerError { + return &CreateAPIClientInternalServerError{} +} + +/* +CreateAPIClientInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CreateAPIClientInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this create Api client internal server error response has a 2xx status code +func (o *CreateAPIClientInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create Api client internal server error response has a 3xx status code +func (o *CreateAPIClientInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create Api client internal server error response has a 4xx status code +func (o *CreateAPIClientInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this create Api client internal server error response has a 5xx status code +func (o *CreateAPIClientInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this create Api client internal server error response a status code equal to that given +func (o *CreateAPIClientInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the create Api client internal server error response +func (o *CreateAPIClientInternalServerError) Code() int { + return 500 +} + +func (o *CreateAPIClientInternalServerError) Error() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients/v1][%d] createApiClientInternalServerError %+v", 500, o.Payload) +} + +func (o *CreateAPIClientInternalServerError) String() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients/v1][%d] createApiClientInternalServerError %+v", 500, o.Payload) +} + +func (o *CreateAPIClientInternalServerError) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CreateAPIClientInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/api_clients/delete_api_clients_parameters.go b/falcon/client/api_clients/delete_api_clients_parameters.go new file mode 100644 index 000000000..f6718122b --- /dev/null +++ b/falcon/client/api_clients/delete_api_clients_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewDeleteAPIClientsParams creates a new DeleteAPIClientsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDeleteAPIClientsParams() *DeleteAPIClientsParams { + return &DeleteAPIClientsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteAPIClientsParamsWithTimeout creates a new DeleteAPIClientsParams object +// with the ability to set a timeout on a request. +func NewDeleteAPIClientsParamsWithTimeout(timeout time.Duration) *DeleteAPIClientsParams { + return &DeleteAPIClientsParams{ + timeout: timeout, + } +} + +// NewDeleteAPIClientsParamsWithContext creates a new DeleteAPIClientsParams object +// with the ability to set a context for a request. +func NewDeleteAPIClientsParamsWithContext(ctx context.Context) *DeleteAPIClientsParams { + return &DeleteAPIClientsParams{ + Context: ctx, + } +} + +// NewDeleteAPIClientsParamsWithHTTPClient creates a new DeleteAPIClientsParams object +// with the ability to set a custom HTTPClient for a request. +func NewDeleteAPIClientsParamsWithHTTPClient(client *http.Client) *DeleteAPIClientsParams { + return &DeleteAPIClientsParams{ + HTTPClient: client, + } +} + +/* +DeleteAPIClientsParams contains all the parameters to send to the API endpoint + + for the delete API clients operation. + + Typically these are written to a http.Request. +*/ +type DeleteAPIClientsParams struct { + + /* Ids. + + The API Client ID(s) for which API Client(s) have to be deleted. + */ + Ids []string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the delete API clients params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteAPIClientsParams) WithDefaults() *DeleteAPIClientsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the delete API clients params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteAPIClientsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the delete API clients params +func (o *DeleteAPIClientsParams) WithTimeout(timeout time.Duration) *DeleteAPIClientsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete API clients params +func (o *DeleteAPIClientsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete API clients params +func (o *DeleteAPIClientsParams) WithContext(ctx context.Context) *DeleteAPIClientsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete API clients params +func (o *DeleteAPIClientsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete API clients params +func (o *DeleteAPIClientsParams) WithHTTPClient(client *http.Client) *DeleteAPIClientsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete API clients params +func (o *DeleteAPIClientsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIds adds the ids to the delete API clients params +func (o *DeleteAPIClientsParams) WithIds(ids []string) *DeleteAPIClientsParams { + o.SetIds(ids) + return o +} + +// SetIds adds the ids to the delete API clients params +func (o *DeleteAPIClientsParams) SetIds(ids []string) { + o.Ids = ids +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteAPIClientsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Ids != nil { + + // binding items for ids + joinedIds := o.bindParamIds(reg) + + // query array param ids + if err := r.SetQueryParam("ids", joinedIds...); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamDeleteAPIClients binds the parameter ids +func (o *DeleteAPIClientsParams) bindParamIds(formats strfmt.Registry) []string { + idsIR := o.Ids + + var idsIC []string + for _, idsIIR := range idsIR { // explode []string + + idsIIV := idsIIR // string as string + idsIC = append(idsIC, idsIIV) + } + + // items.CollectionFormat: "multi" + idsIS := swag.JoinByFormat(idsIC, "multi") + + return idsIS +} diff --git a/falcon/client/api_clients/delete_api_clients_responses.go b/falcon/client/api_clients/delete_api_clients_responses.go new file mode 100644 index 000000000..2e1480817 --- /dev/null +++ b/falcon/client/api_clients/delete_api_clients_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// DeleteAPIClientsReader is a Reader for the DeleteAPIClients structure. +type DeleteAPIClientsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteAPIClientsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 202: + result := NewDeleteAPIClientsAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewDeleteAPIClientsBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteAPIClientsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewDeleteAPIClientsTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteAPIClientsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[DELETE /api-clients/entities/api-clients/v1] DeleteAPIClients", response, response.Code()) + } +} + +// NewDeleteAPIClientsAccepted creates a DeleteAPIClientsAccepted with default headers values +func NewDeleteAPIClientsAccepted() *DeleteAPIClientsAccepted { + return &DeleteAPIClientsAccepted{} +} + +/* +DeleteAPIClientsAccepted describes a response with status code 202, with default header values. + +Accepted +*/ +type DeleteAPIClientsAccepted struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaEntitiesResponse +} + +// IsSuccess returns true when this delete Api clients accepted response has a 2xx status code +func (o *DeleteAPIClientsAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete Api clients accepted response has a 3xx status code +func (o *DeleteAPIClientsAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete Api clients accepted response has a 4xx status code +func (o *DeleteAPIClientsAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete Api clients accepted response has a 5xx status code +func (o *DeleteAPIClientsAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this delete Api clients accepted response a status code equal to that given +func (o *DeleteAPIClientsAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the delete Api clients accepted response +func (o *DeleteAPIClientsAccepted) Code() int { + return 202 +} + +func (o *DeleteAPIClientsAccepted) Error() string { + return fmt.Sprintf("[DELETE /api-clients/entities/api-clients/v1][%d] deleteApiClientsAccepted %+v", 202, o.Payload) +} + +func (o *DeleteAPIClientsAccepted) String() string { + return fmt.Sprintf("[DELETE /api-clients/entities/api-clients/v1][%d] deleteApiClientsAccepted %+v", 202, o.Payload) +} + +func (o *DeleteAPIClientsAccepted) GetPayload() *models.MsaEntitiesResponse { + return o.Payload +} + +func (o *DeleteAPIClientsAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaEntitiesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteAPIClientsBadRequest creates a DeleteAPIClientsBadRequest with default headers values +func NewDeleteAPIClientsBadRequest() *DeleteAPIClientsBadRequest { + return &DeleteAPIClientsBadRequest{} +} + +/* +DeleteAPIClientsBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type DeleteAPIClientsBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this delete Api clients bad request response has a 2xx status code +func (o *DeleteAPIClientsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete Api clients bad request response has a 3xx status code +func (o *DeleteAPIClientsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete Api clients bad request response has a 4xx status code +func (o *DeleteAPIClientsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete Api clients bad request response has a 5xx status code +func (o *DeleteAPIClientsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this delete Api clients bad request response a status code equal to that given +func (o *DeleteAPIClientsBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the delete Api clients bad request response +func (o *DeleteAPIClientsBadRequest) Code() int { + return 400 +} + +func (o *DeleteAPIClientsBadRequest) Error() string { + return fmt.Sprintf("[DELETE /api-clients/entities/api-clients/v1][%d] deleteApiClientsBadRequest %+v", 400, o.Payload) +} + +func (o *DeleteAPIClientsBadRequest) String() string { + return fmt.Sprintf("[DELETE /api-clients/entities/api-clients/v1][%d] deleteApiClientsBadRequest %+v", 400, o.Payload) +} + +func (o *DeleteAPIClientsBadRequest) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *DeleteAPIClientsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteAPIClientsForbidden creates a DeleteAPIClientsForbidden with default headers values +func NewDeleteAPIClientsForbidden() *DeleteAPIClientsForbidden { + return &DeleteAPIClientsForbidden{} +} + +/* +DeleteAPIClientsForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type DeleteAPIClientsForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this delete Api clients forbidden response has a 2xx status code +func (o *DeleteAPIClientsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete Api clients forbidden response has a 3xx status code +func (o *DeleteAPIClientsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete Api clients forbidden response has a 4xx status code +func (o *DeleteAPIClientsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete Api clients forbidden response has a 5xx status code +func (o *DeleteAPIClientsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this delete Api clients forbidden response a status code equal to that given +func (o *DeleteAPIClientsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the delete Api clients forbidden response +func (o *DeleteAPIClientsForbidden) Code() int { + return 403 +} + +func (o *DeleteAPIClientsForbidden) Error() string { + return fmt.Sprintf("[DELETE /api-clients/entities/api-clients/v1][%d] deleteApiClientsForbidden %+v", 403, o.Payload) +} + +func (o *DeleteAPIClientsForbidden) String() string { + return fmt.Sprintf("[DELETE /api-clients/entities/api-clients/v1][%d] deleteApiClientsForbidden %+v", 403, o.Payload) +} + +func (o *DeleteAPIClientsForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *DeleteAPIClientsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteAPIClientsTooManyRequests creates a DeleteAPIClientsTooManyRequests with default headers values +func NewDeleteAPIClientsTooManyRequests() *DeleteAPIClientsTooManyRequests { + return &DeleteAPIClientsTooManyRequests{} +} + +/* +DeleteAPIClientsTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type DeleteAPIClientsTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this delete Api clients too many requests response has a 2xx status code +func (o *DeleteAPIClientsTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete Api clients too many requests response has a 3xx status code +func (o *DeleteAPIClientsTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete Api clients too many requests response has a 4xx status code +func (o *DeleteAPIClientsTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete Api clients too many requests response has a 5xx status code +func (o *DeleteAPIClientsTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this delete Api clients too many requests response a status code equal to that given +func (o *DeleteAPIClientsTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the delete Api clients too many requests response +func (o *DeleteAPIClientsTooManyRequests) Code() int { + return 429 +} + +func (o *DeleteAPIClientsTooManyRequests) Error() string { + return fmt.Sprintf("[DELETE /api-clients/entities/api-clients/v1][%d] deleteApiClientsTooManyRequests %+v", 429, o.Payload) +} + +func (o *DeleteAPIClientsTooManyRequests) String() string { + return fmt.Sprintf("[DELETE /api-clients/entities/api-clients/v1][%d] deleteApiClientsTooManyRequests %+v", 429, o.Payload) +} + +func (o *DeleteAPIClientsTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *DeleteAPIClientsTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteAPIClientsInternalServerError creates a DeleteAPIClientsInternalServerError with default headers values +func NewDeleteAPIClientsInternalServerError() *DeleteAPIClientsInternalServerError { + return &DeleteAPIClientsInternalServerError{} +} + +/* +DeleteAPIClientsInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type DeleteAPIClientsInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this delete Api clients internal server error response has a 2xx status code +func (o *DeleteAPIClientsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete Api clients internal server error response has a 3xx status code +func (o *DeleteAPIClientsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete Api clients internal server error response has a 4xx status code +func (o *DeleteAPIClientsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete Api clients internal server error response has a 5xx status code +func (o *DeleteAPIClientsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this delete Api clients internal server error response a status code equal to that given +func (o *DeleteAPIClientsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the delete Api clients internal server error response +func (o *DeleteAPIClientsInternalServerError) Code() int { + return 500 +} + +func (o *DeleteAPIClientsInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /api-clients/entities/api-clients/v1][%d] deleteApiClientsInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteAPIClientsInternalServerError) String() string { + return fmt.Sprintf("[DELETE /api-clients/entities/api-clients/v1][%d] deleteApiClientsInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteAPIClientsInternalServerError) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *DeleteAPIClientsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/api_clients/get_accessible_scopes_parameters.go b/falcon/client/api_clients/get_accessible_scopes_parameters.go new file mode 100644 index 000000000..38c0f46b0 --- /dev/null +++ b/falcon/client/api_clients/get_accessible_scopes_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetAccessibleScopesParams creates a new GetAccessibleScopesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetAccessibleScopesParams() *GetAccessibleScopesParams { + return &GetAccessibleScopesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetAccessibleScopesParamsWithTimeout creates a new GetAccessibleScopesParams object +// with the ability to set a timeout on a request. +func NewGetAccessibleScopesParamsWithTimeout(timeout time.Duration) *GetAccessibleScopesParams { + return &GetAccessibleScopesParams{ + timeout: timeout, + } +} + +// NewGetAccessibleScopesParamsWithContext creates a new GetAccessibleScopesParams object +// with the ability to set a context for a request. +func NewGetAccessibleScopesParamsWithContext(ctx context.Context) *GetAccessibleScopesParams { + return &GetAccessibleScopesParams{ + Context: ctx, + } +} + +// NewGetAccessibleScopesParamsWithHTTPClient creates a new GetAccessibleScopesParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetAccessibleScopesParamsWithHTTPClient(client *http.Client) *GetAccessibleScopesParams { + return &GetAccessibleScopesParams{ + HTTPClient: client, + } +} + +/* +GetAccessibleScopesParams contains all the parameters to send to the API endpoint + + for the get accessible scopes operation. + + Typically these are written to a http.Request. +*/ +type GetAccessibleScopesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get accessible scopes params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAccessibleScopesParams) WithDefaults() *GetAccessibleScopesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get accessible scopes params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAccessibleScopesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get accessible scopes params +func (o *GetAccessibleScopesParams) WithTimeout(timeout time.Duration) *GetAccessibleScopesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get accessible scopes params +func (o *GetAccessibleScopesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get accessible scopes params +func (o *GetAccessibleScopesParams) WithContext(ctx context.Context) *GetAccessibleScopesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get accessible scopes params +func (o *GetAccessibleScopesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get accessible scopes params +func (o *GetAccessibleScopesParams) WithHTTPClient(client *http.Client) *GetAccessibleScopesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get accessible scopes params +func (o *GetAccessibleScopesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetAccessibleScopesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/api_clients/get_accessible_scopes_responses.go b/falcon/client/api_clients/get_accessible_scopes_responses.go new file mode 100644 index 000000000..757cb0d41 --- /dev/null +++ b/falcon/client/api_clients/get_accessible_scopes_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// GetAccessibleScopesReader is a Reader for the GetAccessibleScopes structure. +type GetAccessibleScopesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetAccessibleScopesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetAccessibleScopesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGetAccessibleScopesBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetAccessibleScopesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewGetAccessibleScopesTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetAccessibleScopesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /api-clients/entities/accessible-scopes/v1] GetAccessibleScopes", response, response.Code()) + } +} + +// NewGetAccessibleScopesOK creates a GetAccessibleScopesOK with default headers values +func NewGetAccessibleScopesOK() *GetAccessibleScopesOK { + return &GetAccessibleScopesOK{} +} + +/* +GetAccessibleScopesOK describes a response with status code 200, with default header values. + +OK +*/ +type GetAccessibleScopesOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APIAccessibleScopesResponse +} + +// IsSuccess returns true when this get accessible scopes o k response has a 2xx status code +func (o *GetAccessibleScopesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get accessible scopes o k response has a 3xx status code +func (o *GetAccessibleScopesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get accessible scopes o k response has a 4xx status code +func (o *GetAccessibleScopesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get accessible scopes o k response has a 5xx status code +func (o *GetAccessibleScopesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get accessible scopes o k response a status code equal to that given +func (o *GetAccessibleScopesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get accessible scopes o k response +func (o *GetAccessibleScopesOK) Code() int { + return 200 +} + +func (o *GetAccessibleScopesOK) Error() string { + return fmt.Sprintf("[GET /api-clients/entities/accessible-scopes/v1][%d] getAccessibleScopesOK %+v", 200, o.Payload) +} + +func (o *GetAccessibleScopesOK) String() string { + return fmt.Sprintf("[GET /api-clients/entities/accessible-scopes/v1][%d] getAccessibleScopesOK %+v", 200, o.Payload) +} + +func (o *GetAccessibleScopesOK) GetPayload() *models.APIAccessibleScopesResponse { + return o.Payload +} + +func (o *GetAccessibleScopesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APIAccessibleScopesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccessibleScopesBadRequest creates a GetAccessibleScopesBadRequest with default headers values +func NewGetAccessibleScopesBadRequest() *GetAccessibleScopesBadRequest { + return &GetAccessibleScopesBadRequest{} +} + +/* +GetAccessibleScopesBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GetAccessibleScopesBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this get accessible scopes bad request response has a 2xx status code +func (o *GetAccessibleScopesBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get accessible scopes bad request response has a 3xx status code +func (o *GetAccessibleScopesBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get accessible scopes bad request response has a 4xx status code +func (o *GetAccessibleScopesBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this get accessible scopes bad request response has a 5xx status code +func (o *GetAccessibleScopesBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this get accessible scopes bad request response a status code equal to that given +func (o *GetAccessibleScopesBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the get accessible scopes bad request response +func (o *GetAccessibleScopesBadRequest) Code() int { + return 400 +} + +func (o *GetAccessibleScopesBadRequest) Error() string { + return fmt.Sprintf("[GET /api-clients/entities/accessible-scopes/v1][%d] getAccessibleScopesBadRequest %+v", 400, o.Payload) +} + +func (o *GetAccessibleScopesBadRequest) String() string { + return fmt.Sprintf("[GET /api-clients/entities/accessible-scopes/v1][%d] getAccessibleScopesBadRequest %+v", 400, o.Payload) +} + +func (o *GetAccessibleScopesBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *GetAccessibleScopesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccessibleScopesForbidden creates a GetAccessibleScopesForbidden with default headers values +func NewGetAccessibleScopesForbidden() *GetAccessibleScopesForbidden { + return &GetAccessibleScopesForbidden{} +} + +/* +GetAccessibleScopesForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GetAccessibleScopesForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this get accessible scopes forbidden response has a 2xx status code +func (o *GetAccessibleScopesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get accessible scopes forbidden response has a 3xx status code +func (o *GetAccessibleScopesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get accessible scopes forbidden response has a 4xx status code +func (o *GetAccessibleScopesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get accessible scopes forbidden response has a 5xx status code +func (o *GetAccessibleScopesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get accessible scopes forbidden response a status code equal to that given +func (o *GetAccessibleScopesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get accessible scopes forbidden response +func (o *GetAccessibleScopesForbidden) Code() int { + return 403 +} + +func (o *GetAccessibleScopesForbidden) Error() string { + return fmt.Sprintf("[GET /api-clients/entities/accessible-scopes/v1][%d] getAccessibleScopesForbidden %+v", 403, o.Payload) +} + +func (o *GetAccessibleScopesForbidden) String() string { + return fmt.Sprintf("[GET /api-clients/entities/accessible-scopes/v1][%d] getAccessibleScopesForbidden %+v", 403, o.Payload) +} + +func (o *GetAccessibleScopesForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *GetAccessibleScopesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccessibleScopesTooManyRequests creates a GetAccessibleScopesTooManyRequests with default headers values +func NewGetAccessibleScopesTooManyRequests() *GetAccessibleScopesTooManyRequests { + return &GetAccessibleScopesTooManyRequests{} +} + +/* +GetAccessibleScopesTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type GetAccessibleScopesTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get accessible scopes too many requests response has a 2xx status code +func (o *GetAccessibleScopesTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get accessible scopes too many requests response has a 3xx status code +func (o *GetAccessibleScopesTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get accessible scopes too many requests response has a 4xx status code +func (o *GetAccessibleScopesTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this get accessible scopes too many requests response has a 5xx status code +func (o *GetAccessibleScopesTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this get accessible scopes too many requests response a status code equal to that given +func (o *GetAccessibleScopesTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the get accessible scopes too many requests response +func (o *GetAccessibleScopesTooManyRequests) Code() int { + return 429 +} + +func (o *GetAccessibleScopesTooManyRequests) Error() string { + return fmt.Sprintf("[GET /api-clients/entities/accessible-scopes/v1][%d] getAccessibleScopesTooManyRequests %+v", 429, o.Payload) +} + +func (o *GetAccessibleScopesTooManyRequests) String() string { + return fmt.Sprintf("[GET /api-clients/entities/accessible-scopes/v1][%d] getAccessibleScopesTooManyRequests %+v", 429, o.Payload) +} + +func (o *GetAccessibleScopesTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetAccessibleScopesTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccessibleScopesInternalServerError creates a GetAccessibleScopesInternalServerError with default headers values +func NewGetAccessibleScopesInternalServerError() *GetAccessibleScopesInternalServerError { + return &GetAccessibleScopesInternalServerError{} +} + +/* +GetAccessibleScopesInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GetAccessibleScopesInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this get accessible scopes internal server error response has a 2xx status code +func (o *GetAccessibleScopesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get accessible scopes internal server error response has a 3xx status code +func (o *GetAccessibleScopesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get accessible scopes internal server error response has a 4xx status code +func (o *GetAccessibleScopesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get accessible scopes internal server error response has a 5xx status code +func (o *GetAccessibleScopesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get accessible scopes internal server error response a status code equal to that given +func (o *GetAccessibleScopesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get accessible scopes internal server error response +func (o *GetAccessibleScopesInternalServerError) Code() int { + return 500 +} + +func (o *GetAccessibleScopesInternalServerError) Error() string { + return fmt.Sprintf("[GET /api-clients/entities/accessible-scopes/v1][%d] getAccessibleScopesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetAccessibleScopesInternalServerError) String() string { + return fmt.Sprintf("[GET /api-clients/entities/accessible-scopes/v1][%d] getAccessibleScopesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetAccessibleScopesInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *GetAccessibleScopesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/api_clients/get_all_api_client_ids_for_customer_parameters.go b/falcon/client/api_clients/get_all_api_client_ids_for_customer_parameters.go new file mode 100644 index 000000000..963295a75 --- /dev/null +++ b/falcon/client/api_clients/get_all_api_client_ids_for_customer_parameters.go @@ -0,0 +1,253 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetAllAPIClientIdsForCustomerParams creates a new GetAllAPIClientIdsForCustomerParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetAllAPIClientIdsForCustomerParams() *GetAllAPIClientIdsForCustomerParams { + return &GetAllAPIClientIdsForCustomerParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetAllAPIClientIdsForCustomerParamsWithTimeout creates a new GetAllAPIClientIdsForCustomerParams object +// with the ability to set a timeout on a request. +func NewGetAllAPIClientIdsForCustomerParamsWithTimeout(timeout time.Duration) *GetAllAPIClientIdsForCustomerParams { + return &GetAllAPIClientIdsForCustomerParams{ + timeout: timeout, + } +} + +// NewGetAllAPIClientIdsForCustomerParamsWithContext creates a new GetAllAPIClientIdsForCustomerParams object +// with the ability to set a context for a request. +func NewGetAllAPIClientIdsForCustomerParamsWithContext(ctx context.Context) *GetAllAPIClientIdsForCustomerParams { + return &GetAllAPIClientIdsForCustomerParams{ + Context: ctx, + } +} + +// NewGetAllAPIClientIdsForCustomerParamsWithHTTPClient creates a new GetAllAPIClientIdsForCustomerParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetAllAPIClientIdsForCustomerParamsWithHTTPClient(client *http.Client) *GetAllAPIClientIdsForCustomerParams { + return &GetAllAPIClientIdsForCustomerParams{ + HTTPClient: client, + } +} + +/* +GetAllAPIClientIdsForCustomerParams contains all the parameters to send to the API endpoint + + for the get all API client ids for customer operation. + + Typically these are written to a http.Request. +*/ +type GetAllAPIClientIdsForCustomerParams struct { + + /* Limit. + + Number of ids to return. + + Default: 10 + */ + Limit *int64 + + /* Offset. + + Starting index of overall result set from which to return ids. + */ + Offset *int64 + + /* Sort. + + Possible values for sort by field includes id, name, created_by, updated_by, created_timestamp, last_modified. Ex: 'name|asc', 'name|desc', etc. + + Default: "created_timestamp" + */ + Sort *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get all API client ids for customer params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAllAPIClientIdsForCustomerParams) WithDefaults() *GetAllAPIClientIdsForCustomerParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get all API client ids for customer params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAllAPIClientIdsForCustomerParams) SetDefaults() { + var ( + limitDefault = int64(10) + + offsetDefault = int64(0) + + sortDefault = string("created_timestamp") + ) + + val := GetAllAPIClientIdsForCustomerParams{ + Limit: &limitDefault, + Offset: &offsetDefault, + Sort: &sortDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the get all API client ids for customer params +func (o *GetAllAPIClientIdsForCustomerParams) WithTimeout(timeout time.Duration) *GetAllAPIClientIdsForCustomerParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get all API client ids for customer params +func (o *GetAllAPIClientIdsForCustomerParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get all API client ids for customer params +func (o *GetAllAPIClientIdsForCustomerParams) WithContext(ctx context.Context) *GetAllAPIClientIdsForCustomerParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get all API client ids for customer params +func (o *GetAllAPIClientIdsForCustomerParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get all API client ids for customer params +func (o *GetAllAPIClientIdsForCustomerParams) WithHTTPClient(client *http.Client) *GetAllAPIClientIdsForCustomerParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get all API client ids for customer params +func (o *GetAllAPIClientIdsForCustomerParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the get all API client ids for customer params +func (o *GetAllAPIClientIdsForCustomerParams) WithLimit(limit *int64) *GetAllAPIClientIdsForCustomerParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get all API client ids for customer params +func (o *GetAllAPIClientIdsForCustomerParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get all API client ids for customer params +func (o *GetAllAPIClientIdsForCustomerParams) WithOffset(offset *int64) *GetAllAPIClientIdsForCustomerParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get all API client ids for customer params +func (o *GetAllAPIClientIdsForCustomerParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithSort adds the sort to the get all API client ids for customer params +func (o *GetAllAPIClientIdsForCustomerParams) WithSort(sort *string) *GetAllAPIClientIdsForCustomerParams { + o.SetSort(sort) + return o +} + +// SetSort adds the sort to the get all API client ids for customer params +func (o *GetAllAPIClientIdsForCustomerParams) SetSort(sort *string) { + o.Sort = sort +} + +// WriteToRequest writes these params to a swagger request +func (o *GetAllAPIClientIdsForCustomerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Sort != nil { + + // query param sort + var qrSort string + + if o.Sort != nil { + qrSort = *o.Sort + } + qSort := qrSort + if qSort != "" { + + if err := r.SetQueryParam("sort", qSort); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/api_clients/get_all_api_client_ids_for_customer_responses.go b/falcon/client/api_clients/get_all_api_client_ids_for_customer_responses.go new file mode 100644 index 000000000..30b1ad53a --- /dev/null +++ b/falcon/client/api_clients/get_all_api_client_ids_for_customer_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// GetAllAPIClientIdsForCustomerReader is a Reader for the GetAllAPIClientIdsForCustomer structure. +type GetAllAPIClientIdsForCustomerReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetAllAPIClientIdsForCustomerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetAllAPIClientIdsForCustomerOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGetAllAPIClientIdsForCustomerBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetAllAPIClientIdsForCustomerForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewGetAllAPIClientIdsForCustomerTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetAllAPIClientIdsForCustomerInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /api-clients/queries/api-clients/v1] GetAllAPIClientIdsForCustomer", response, response.Code()) + } +} + +// NewGetAllAPIClientIdsForCustomerOK creates a GetAllAPIClientIdsForCustomerOK with default headers values +func NewGetAllAPIClientIdsForCustomerOK() *GetAllAPIClientIdsForCustomerOK { + return &GetAllAPIClientIdsForCustomerOK{} +} + +/* +GetAllAPIClientIdsForCustomerOK describes a response with status code 200, with default header values. + +OK +*/ +type GetAllAPIClientIdsForCustomerOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaQueryResponse +} + +// IsSuccess returns true when this get all Api client ids for customer o k response has a 2xx status code +func (o *GetAllAPIClientIdsForCustomerOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get all Api client ids for customer o k response has a 3xx status code +func (o *GetAllAPIClientIdsForCustomerOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get all Api client ids for customer o k response has a 4xx status code +func (o *GetAllAPIClientIdsForCustomerOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get all Api client ids for customer o k response has a 5xx status code +func (o *GetAllAPIClientIdsForCustomerOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get all Api client ids for customer o k response a status code equal to that given +func (o *GetAllAPIClientIdsForCustomerOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get all Api client ids for customer o k response +func (o *GetAllAPIClientIdsForCustomerOK) Code() int { + return 200 +} + +func (o *GetAllAPIClientIdsForCustomerOK) Error() string { + return fmt.Sprintf("[GET /api-clients/queries/api-clients/v1][%d] getAllApiClientIdsForCustomerOK %+v", 200, o.Payload) +} + +func (o *GetAllAPIClientIdsForCustomerOK) String() string { + return fmt.Sprintf("[GET /api-clients/queries/api-clients/v1][%d] getAllApiClientIdsForCustomerOK %+v", 200, o.Payload) +} + +func (o *GetAllAPIClientIdsForCustomerOK) GetPayload() *models.MsaQueryResponse { + return o.Payload +} + +func (o *GetAllAPIClientIdsForCustomerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaQueryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAllAPIClientIdsForCustomerBadRequest creates a GetAllAPIClientIdsForCustomerBadRequest with default headers values +func NewGetAllAPIClientIdsForCustomerBadRequest() *GetAllAPIClientIdsForCustomerBadRequest { + return &GetAllAPIClientIdsForCustomerBadRequest{} +} + +/* +GetAllAPIClientIdsForCustomerBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GetAllAPIClientIdsForCustomerBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get all Api client ids for customer bad request response has a 2xx status code +func (o *GetAllAPIClientIdsForCustomerBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get all Api client ids for customer bad request response has a 3xx status code +func (o *GetAllAPIClientIdsForCustomerBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get all Api client ids for customer bad request response has a 4xx status code +func (o *GetAllAPIClientIdsForCustomerBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this get all Api client ids for customer bad request response has a 5xx status code +func (o *GetAllAPIClientIdsForCustomerBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this get all Api client ids for customer bad request response a status code equal to that given +func (o *GetAllAPIClientIdsForCustomerBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the get all Api client ids for customer bad request response +func (o *GetAllAPIClientIdsForCustomerBadRequest) Code() int { + return 400 +} + +func (o *GetAllAPIClientIdsForCustomerBadRequest) Error() string { + return fmt.Sprintf("[GET /api-clients/queries/api-clients/v1][%d] getAllApiClientIdsForCustomerBadRequest %+v", 400, o.Payload) +} + +func (o *GetAllAPIClientIdsForCustomerBadRequest) String() string { + return fmt.Sprintf("[GET /api-clients/queries/api-clients/v1][%d] getAllApiClientIdsForCustomerBadRequest %+v", 400, o.Payload) +} + +func (o *GetAllAPIClientIdsForCustomerBadRequest) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetAllAPIClientIdsForCustomerBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAllAPIClientIdsForCustomerForbidden creates a GetAllAPIClientIdsForCustomerForbidden with default headers values +func NewGetAllAPIClientIdsForCustomerForbidden() *GetAllAPIClientIdsForCustomerForbidden { + return &GetAllAPIClientIdsForCustomerForbidden{} +} + +/* +GetAllAPIClientIdsForCustomerForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GetAllAPIClientIdsForCustomerForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get all Api client ids for customer forbidden response has a 2xx status code +func (o *GetAllAPIClientIdsForCustomerForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get all Api client ids for customer forbidden response has a 3xx status code +func (o *GetAllAPIClientIdsForCustomerForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get all Api client ids for customer forbidden response has a 4xx status code +func (o *GetAllAPIClientIdsForCustomerForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get all Api client ids for customer forbidden response has a 5xx status code +func (o *GetAllAPIClientIdsForCustomerForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get all Api client ids for customer forbidden response a status code equal to that given +func (o *GetAllAPIClientIdsForCustomerForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get all Api client ids for customer forbidden response +func (o *GetAllAPIClientIdsForCustomerForbidden) Code() int { + return 403 +} + +func (o *GetAllAPIClientIdsForCustomerForbidden) Error() string { + return fmt.Sprintf("[GET /api-clients/queries/api-clients/v1][%d] getAllApiClientIdsForCustomerForbidden %+v", 403, o.Payload) +} + +func (o *GetAllAPIClientIdsForCustomerForbidden) String() string { + return fmt.Sprintf("[GET /api-clients/queries/api-clients/v1][%d] getAllApiClientIdsForCustomerForbidden %+v", 403, o.Payload) +} + +func (o *GetAllAPIClientIdsForCustomerForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetAllAPIClientIdsForCustomerForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAllAPIClientIdsForCustomerTooManyRequests creates a GetAllAPIClientIdsForCustomerTooManyRequests with default headers values +func NewGetAllAPIClientIdsForCustomerTooManyRequests() *GetAllAPIClientIdsForCustomerTooManyRequests { + return &GetAllAPIClientIdsForCustomerTooManyRequests{} +} + +/* +GetAllAPIClientIdsForCustomerTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type GetAllAPIClientIdsForCustomerTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get all Api client ids for customer too many requests response has a 2xx status code +func (o *GetAllAPIClientIdsForCustomerTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get all Api client ids for customer too many requests response has a 3xx status code +func (o *GetAllAPIClientIdsForCustomerTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get all Api client ids for customer too many requests response has a 4xx status code +func (o *GetAllAPIClientIdsForCustomerTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this get all Api client ids for customer too many requests response has a 5xx status code +func (o *GetAllAPIClientIdsForCustomerTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this get all Api client ids for customer too many requests response a status code equal to that given +func (o *GetAllAPIClientIdsForCustomerTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the get all Api client ids for customer too many requests response +func (o *GetAllAPIClientIdsForCustomerTooManyRequests) Code() int { + return 429 +} + +func (o *GetAllAPIClientIdsForCustomerTooManyRequests) Error() string { + return fmt.Sprintf("[GET /api-clients/queries/api-clients/v1][%d] getAllApiClientIdsForCustomerTooManyRequests %+v", 429, o.Payload) +} + +func (o *GetAllAPIClientIdsForCustomerTooManyRequests) String() string { + return fmt.Sprintf("[GET /api-clients/queries/api-clients/v1][%d] getAllApiClientIdsForCustomerTooManyRequests %+v", 429, o.Payload) +} + +func (o *GetAllAPIClientIdsForCustomerTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetAllAPIClientIdsForCustomerTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAllAPIClientIdsForCustomerInternalServerError creates a GetAllAPIClientIdsForCustomerInternalServerError with default headers values +func NewGetAllAPIClientIdsForCustomerInternalServerError() *GetAllAPIClientIdsForCustomerInternalServerError { + return &GetAllAPIClientIdsForCustomerInternalServerError{} +} + +/* +GetAllAPIClientIdsForCustomerInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GetAllAPIClientIdsForCustomerInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get all Api client ids for customer internal server error response has a 2xx status code +func (o *GetAllAPIClientIdsForCustomerInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get all Api client ids for customer internal server error response has a 3xx status code +func (o *GetAllAPIClientIdsForCustomerInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get all Api client ids for customer internal server error response has a 4xx status code +func (o *GetAllAPIClientIdsForCustomerInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get all Api client ids for customer internal server error response has a 5xx status code +func (o *GetAllAPIClientIdsForCustomerInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get all Api client ids for customer internal server error response a status code equal to that given +func (o *GetAllAPIClientIdsForCustomerInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get all Api client ids for customer internal server error response +func (o *GetAllAPIClientIdsForCustomerInternalServerError) Code() int { + return 500 +} + +func (o *GetAllAPIClientIdsForCustomerInternalServerError) Error() string { + return fmt.Sprintf("[GET /api-clients/queries/api-clients/v1][%d] getAllApiClientIdsForCustomerInternalServerError %+v", 500, o.Payload) +} + +func (o *GetAllAPIClientIdsForCustomerInternalServerError) String() string { + return fmt.Sprintf("[GET /api-clients/queries/api-clients/v1][%d] getAllApiClientIdsForCustomerInternalServerError %+v", 500, o.Payload) +} + +func (o *GetAllAPIClientIdsForCustomerInternalServerError) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetAllAPIClientIdsForCustomerInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/api_clients/get_api_clients_parameters.go b/falcon/client/api_clients/get_api_clients_parameters.go new file mode 100644 index 000000000..0a6bb02b6 --- /dev/null +++ b/falcon/client/api_clients/get_api_clients_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetAPIClientsParams creates a new GetAPIClientsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetAPIClientsParams() *GetAPIClientsParams { + return &GetAPIClientsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetAPIClientsParamsWithTimeout creates a new GetAPIClientsParams object +// with the ability to set a timeout on a request. +func NewGetAPIClientsParamsWithTimeout(timeout time.Duration) *GetAPIClientsParams { + return &GetAPIClientsParams{ + timeout: timeout, + } +} + +// NewGetAPIClientsParamsWithContext creates a new GetAPIClientsParams object +// with the ability to set a context for a request. +func NewGetAPIClientsParamsWithContext(ctx context.Context) *GetAPIClientsParams { + return &GetAPIClientsParams{ + Context: ctx, + } +} + +// NewGetAPIClientsParamsWithHTTPClient creates a new GetAPIClientsParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetAPIClientsParamsWithHTTPClient(client *http.Client) *GetAPIClientsParams { + return &GetAPIClientsParams{ + HTTPClient: client, + } +} + +/* +GetAPIClientsParams contains all the parameters to send to the API endpoint + + for the get API clients operation. + + Typically these are written to a http.Request. +*/ +type GetAPIClientsParams struct { + + /* Ids. + + The API Client ID(s) for which to obtain API Client definition(s). + */ + Ids []string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get API clients params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAPIClientsParams) WithDefaults() *GetAPIClientsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get API clients params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAPIClientsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get API clients params +func (o *GetAPIClientsParams) WithTimeout(timeout time.Duration) *GetAPIClientsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get API clients params +func (o *GetAPIClientsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get API clients params +func (o *GetAPIClientsParams) WithContext(ctx context.Context) *GetAPIClientsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get API clients params +func (o *GetAPIClientsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get API clients params +func (o *GetAPIClientsParams) WithHTTPClient(client *http.Client) *GetAPIClientsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get API clients params +func (o *GetAPIClientsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIds adds the ids to the get API clients params +func (o *GetAPIClientsParams) WithIds(ids []string) *GetAPIClientsParams { + o.SetIds(ids) + return o +} + +// SetIds adds the ids to the get API clients params +func (o *GetAPIClientsParams) SetIds(ids []string) { + o.Ids = ids +} + +// WriteToRequest writes these params to a swagger request +func (o *GetAPIClientsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Ids != nil { + + // binding items for ids + joinedIds := o.bindParamIds(reg) + + // query array param ids + if err := r.SetQueryParam("ids", joinedIds...); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamGetAPIClients binds the parameter ids +func (o *GetAPIClientsParams) bindParamIds(formats strfmt.Registry) []string { + idsIR := o.Ids + + var idsIC []string + for _, idsIIR := range idsIR { // explode []string + + idsIIV := idsIIR // string as string + idsIC = append(idsIC, idsIIV) + } + + // items.CollectionFormat: "multi" + idsIS := swag.JoinByFormat(idsIC, "multi") + + return idsIS +} diff --git a/falcon/client/api_clients/get_api_clients_responses.go b/falcon/client/api_clients/get_api_clients_responses.go new file mode 100644 index 000000000..dc3ac277c --- /dev/null +++ b/falcon/client/api_clients/get_api_clients_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// GetAPIClientsReader is a Reader for the GetAPIClients structure. +type GetAPIClientsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetAPIClientsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetAPIClientsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGetAPIClientsBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetAPIClientsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewGetAPIClientsTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetAPIClientsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /api-clients/entities/api-clients/v1] GetAPIClients", response, response.Code()) + } +} + +// NewGetAPIClientsOK creates a GetAPIClientsOK with default headers values +func NewGetAPIClientsOK() *GetAPIClientsOK { + return &GetAPIClientsOK{} +} + +/* +GetAPIClientsOK describes a response with status code 200, with default header values. + +OK +*/ +type GetAPIClientsOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaEntitiesResponse +} + +// IsSuccess returns true when this get Api clients o k response has a 2xx status code +func (o *GetAPIClientsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get Api clients o k response has a 3xx status code +func (o *GetAPIClientsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get Api clients o k response has a 4xx status code +func (o *GetAPIClientsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get Api clients o k response has a 5xx status code +func (o *GetAPIClientsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get Api clients o k response a status code equal to that given +func (o *GetAPIClientsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get Api clients o k response +func (o *GetAPIClientsOK) Code() int { + return 200 +} + +func (o *GetAPIClientsOK) Error() string { + return fmt.Sprintf("[GET /api-clients/entities/api-clients/v1][%d] getApiClientsOK %+v", 200, o.Payload) +} + +func (o *GetAPIClientsOK) String() string { + return fmt.Sprintf("[GET /api-clients/entities/api-clients/v1][%d] getApiClientsOK %+v", 200, o.Payload) +} + +func (o *GetAPIClientsOK) GetPayload() *models.MsaEntitiesResponse { + return o.Payload +} + +func (o *GetAPIClientsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaEntitiesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIClientsBadRequest creates a GetAPIClientsBadRequest with default headers values +func NewGetAPIClientsBadRequest() *GetAPIClientsBadRequest { + return &GetAPIClientsBadRequest{} +} + +/* +GetAPIClientsBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GetAPIClientsBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get Api clients bad request response has a 2xx status code +func (o *GetAPIClientsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get Api clients bad request response has a 3xx status code +func (o *GetAPIClientsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get Api clients bad request response has a 4xx status code +func (o *GetAPIClientsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this get Api clients bad request response has a 5xx status code +func (o *GetAPIClientsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this get Api clients bad request response a status code equal to that given +func (o *GetAPIClientsBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the get Api clients bad request response +func (o *GetAPIClientsBadRequest) Code() int { + return 400 +} + +func (o *GetAPIClientsBadRequest) Error() string { + return fmt.Sprintf("[GET /api-clients/entities/api-clients/v1][%d] getApiClientsBadRequest %+v", 400, o.Payload) +} + +func (o *GetAPIClientsBadRequest) String() string { + return fmt.Sprintf("[GET /api-clients/entities/api-clients/v1][%d] getApiClientsBadRequest %+v", 400, o.Payload) +} + +func (o *GetAPIClientsBadRequest) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetAPIClientsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIClientsForbidden creates a GetAPIClientsForbidden with default headers values +func NewGetAPIClientsForbidden() *GetAPIClientsForbidden { + return &GetAPIClientsForbidden{} +} + +/* +GetAPIClientsForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GetAPIClientsForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get Api clients forbidden response has a 2xx status code +func (o *GetAPIClientsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get Api clients forbidden response has a 3xx status code +func (o *GetAPIClientsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get Api clients forbidden response has a 4xx status code +func (o *GetAPIClientsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get Api clients forbidden response has a 5xx status code +func (o *GetAPIClientsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get Api clients forbidden response a status code equal to that given +func (o *GetAPIClientsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get Api clients forbidden response +func (o *GetAPIClientsForbidden) Code() int { + return 403 +} + +func (o *GetAPIClientsForbidden) Error() string { + return fmt.Sprintf("[GET /api-clients/entities/api-clients/v1][%d] getApiClientsForbidden %+v", 403, o.Payload) +} + +func (o *GetAPIClientsForbidden) String() string { + return fmt.Sprintf("[GET /api-clients/entities/api-clients/v1][%d] getApiClientsForbidden %+v", 403, o.Payload) +} + +func (o *GetAPIClientsForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetAPIClientsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIClientsTooManyRequests creates a GetAPIClientsTooManyRequests with default headers values +func NewGetAPIClientsTooManyRequests() *GetAPIClientsTooManyRequests { + return &GetAPIClientsTooManyRequests{} +} + +/* +GetAPIClientsTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type GetAPIClientsTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get Api clients too many requests response has a 2xx status code +func (o *GetAPIClientsTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get Api clients too many requests response has a 3xx status code +func (o *GetAPIClientsTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get Api clients too many requests response has a 4xx status code +func (o *GetAPIClientsTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this get Api clients too many requests response has a 5xx status code +func (o *GetAPIClientsTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this get Api clients too many requests response a status code equal to that given +func (o *GetAPIClientsTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the get Api clients too many requests response +func (o *GetAPIClientsTooManyRequests) Code() int { + return 429 +} + +func (o *GetAPIClientsTooManyRequests) Error() string { + return fmt.Sprintf("[GET /api-clients/entities/api-clients/v1][%d] getApiClientsTooManyRequests %+v", 429, o.Payload) +} + +func (o *GetAPIClientsTooManyRequests) String() string { + return fmt.Sprintf("[GET /api-clients/entities/api-clients/v1][%d] getApiClientsTooManyRequests %+v", 429, o.Payload) +} + +func (o *GetAPIClientsTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetAPIClientsTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIClientsInternalServerError creates a GetAPIClientsInternalServerError with default headers values +func NewGetAPIClientsInternalServerError() *GetAPIClientsInternalServerError { + return &GetAPIClientsInternalServerError{} +} + +/* +GetAPIClientsInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GetAPIClientsInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get Api clients internal server error response has a 2xx status code +func (o *GetAPIClientsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get Api clients internal server error response has a 3xx status code +func (o *GetAPIClientsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get Api clients internal server error response has a 4xx status code +func (o *GetAPIClientsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get Api clients internal server error response has a 5xx status code +func (o *GetAPIClientsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get Api clients internal server error response a status code equal to that given +func (o *GetAPIClientsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get Api clients internal server error response +func (o *GetAPIClientsInternalServerError) Code() int { + return 500 +} + +func (o *GetAPIClientsInternalServerError) Error() string { + return fmt.Sprintf("[GET /api-clients/entities/api-clients/v1][%d] getApiClientsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetAPIClientsInternalServerError) String() string { + return fmt.Sprintf("[GET /api-clients/entities/api-clients/v1][%d] getApiClientsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetAPIClientsInternalServerError) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetAPIClientsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/api_clients/reset_api_client_secret_parameters.go b/falcon/client/api_clients/reset_api_client_secret_parameters.go new file mode 100644 index 000000000..50dc3d964 --- /dev/null +++ b/falcon/client/api_clients/reset_api_client_secret_parameters.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewResetAPIClientSecretParams creates a new ResetAPIClientSecretParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewResetAPIClientSecretParams() *ResetAPIClientSecretParams { + return &ResetAPIClientSecretParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewResetAPIClientSecretParamsWithTimeout creates a new ResetAPIClientSecretParams object +// with the ability to set a timeout on a request. +func NewResetAPIClientSecretParamsWithTimeout(timeout time.Duration) *ResetAPIClientSecretParams { + return &ResetAPIClientSecretParams{ + timeout: timeout, + } +} + +// NewResetAPIClientSecretParamsWithContext creates a new ResetAPIClientSecretParams object +// with the ability to set a context for a request. +func NewResetAPIClientSecretParamsWithContext(ctx context.Context) *ResetAPIClientSecretParams { + return &ResetAPIClientSecretParams{ + Context: ctx, + } +} + +// NewResetAPIClientSecretParamsWithHTTPClient creates a new ResetAPIClientSecretParams object +// with the ability to set a custom HTTPClient for a request. +func NewResetAPIClientSecretParamsWithHTTPClient(client *http.Client) *ResetAPIClientSecretParams { + return &ResetAPIClientSecretParams{ + HTTPClient: client, + } +} + +/* +ResetAPIClientSecretParams contains all the parameters to send to the API endpoint + + for the reset API client secret operation. + + Typically these are written to a http.Request. +*/ +type ResetAPIClientSecretParams struct { + + /* ActionName. + + Action to perform as part of API Client update. Only allowed value is 'reset_secret'. + */ + ActionName string + + /* Ids. + + The API Client ID(s) for which to perform action on API Client(s). + */ + Ids []string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the reset API client secret params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ResetAPIClientSecretParams) WithDefaults() *ResetAPIClientSecretParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the reset API client secret params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ResetAPIClientSecretParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the reset API client secret params +func (o *ResetAPIClientSecretParams) WithTimeout(timeout time.Duration) *ResetAPIClientSecretParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the reset API client secret params +func (o *ResetAPIClientSecretParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the reset API client secret params +func (o *ResetAPIClientSecretParams) WithContext(ctx context.Context) *ResetAPIClientSecretParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the reset API client secret params +func (o *ResetAPIClientSecretParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the reset API client secret params +func (o *ResetAPIClientSecretParams) WithHTTPClient(client *http.Client) *ResetAPIClientSecretParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the reset API client secret params +func (o *ResetAPIClientSecretParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithActionName adds the actionName to the reset API client secret params +func (o *ResetAPIClientSecretParams) WithActionName(actionName string) *ResetAPIClientSecretParams { + o.SetActionName(actionName) + return o +} + +// SetActionName adds the actionName to the reset API client secret params +func (o *ResetAPIClientSecretParams) SetActionName(actionName string) { + o.ActionName = actionName +} + +// WithIds adds the ids to the reset API client secret params +func (o *ResetAPIClientSecretParams) WithIds(ids []string) *ResetAPIClientSecretParams { + o.SetIds(ids) + return o +} + +// SetIds adds the ids to the reset API client secret params +func (o *ResetAPIClientSecretParams) SetIds(ids []string) { + o.Ids = ids +} + +// WriteToRequest writes these params to a swagger request +func (o *ResetAPIClientSecretParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param action_name + qrActionName := o.ActionName + qActionName := qrActionName + if qActionName != "" { + + if err := r.SetQueryParam("action_name", qActionName); err != nil { + return err + } + } + + if o.Ids != nil { + + // binding items for ids + joinedIds := o.bindParamIds(reg) + + // query array param ids + if err := r.SetQueryParam("ids", joinedIds...); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamResetAPIClientSecret binds the parameter ids +func (o *ResetAPIClientSecretParams) bindParamIds(formats strfmt.Registry) []string { + idsIR := o.Ids + + var idsIC []string + for _, idsIIR := range idsIR { // explode []string + + idsIIV := idsIIR // string as string + idsIC = append(idsIC, idsIIV) + } + + // items.CollectionFormat: "multi" + idsIS := swag.JoinByFormat(idsIC, "multi") + + return idsIS +} diff --git a/falcon/client/api_clients/reset_api_client_secret_responses.go b/falcon/client/api_clients/reset_api_client_secret_responses.go new file mode 100644 index 000000000..46fb015e4 --- /dev/null +++ b/falcon/client/api_clients/reset_api_client_secret_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// ResetAPIClientSecretReader is a Reader for the ResetAPIClientSecret structure. +type ResetAPIClientSecretReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ResetAPIClientSecretReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewResetAPIClientSecretCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewResetAPIClientSecretBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewResetAPIClientSecretForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewResetAPIClientSecretTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewResetAPIClientSecretInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /api-clients/entities/api-clients-actions/v1] ResetAPIClientSecret", response, response.Code()) + } +} + +// NewResetAPIClientSecretCreated creates a ResetAPIClientSecretCreated with default headers values +func NewResetAPIClientSecretCreated() *ResetAPIClientSecretCreated { + return &ResetAPIClientSecretCreated{} +} + +/* +ResetAPIClientSecretCreated describes a response with status code 201, with default header values. + +Created +*/ +type ResetAPIClientSecretCreated struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaEntitiesResponse +} + +// IsSuccess returns true when this reset Api client secret created response has a 2xx status code +func (o *ResetAPIClientSecretCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this reset Api client secret created response has a 3xx status code +func (o *ResetAPIClientSecretCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this reset Api client secret created response has a 4xx status code +func (o *ResetAPIClientSecretCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this reset Api client secret created response has a 5xx status code +func (o *ResetAPIClientSecretCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this reset Api client secret created response a status code equal to that given +func (o *ResetAPIClientSecretCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the reset Api client secret created response +func (o *ResetAPIClientSecretCreated) Code() int { + return 201 +} + +func (o *ResetAPIClientSecretCreated) Error() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients-actions/v1][%d] resetApiClientSecretCreated %+v", 201, o.Payload) +} + +func (o *ResetAPIClientSecretCreated) String() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients-actions/v1][%d] resetApiClientSecretCreated %+v", 201, o.Payload) +} + +func (o *ResetAPIClientSecretCreated) GetPayload() *models.MsaEntitiesResponse { + return o.Payload +} + +func (o *ResetAPIClientSecretCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaEntitiesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewResetAPIClientSecretBadRequest creates a ResetAPIClientSecretBadRequest with default headers values +func NewResetAPIClientSecretBadRequest() *ResetAPIClientSecretBadRequest { + return &ResetAPIClientSecretBadRequest{} +} + +/* +ResetAPIClientSecretBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ResetAPIClientSecretBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this reset Api client secret bad request response has a 2xx status code +func (o *ResetAPIClientSecretBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this reset Api client secret bad request response has a 3xx status code +func (o *ResetAPIClientSecretBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this reset Api client secret bad request response has a 4xx status code +func (o *ResetAPIClientSecretBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this reset Api client secret bad request response has a 5xx status code +func (o *ResetAPIClientSecretBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this reset Api client secret bad request response a status code equal to that given +func (o *ResetAPIClientSecretBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the reset Api client secret bad request response +func (o *ResetAPIClientSecretBadRequest) Code() int { + return 400 +} + +func (o *ResetAPIClientSecretBadRequest) Error() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients-actions/v1][%d] resetApiClientSecretBadRequest %+v", 400, o.Payload) +} + +func (o *ResetAPIClientSecretBadRequest) String() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients-actions/v1][%d] resetApiClientSecretBadRequest %+v", 400, o.Payload) +} + +func (o *ResetAPIClientSecretBadRequest) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *ResetAPIClientSecretBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewResetAPIClientSecretForbidden creates a ResetAPIClientSecretForbidden with default headers values +func NewResetAPIClientSecretForbidden() *ResetAPIClientSecretForbidden { + return &ResetAPIClientSecretForbidden{} +} + +/* +ResetAPIClientSecretForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ResetAPIClientSecretForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this reset Api client secret forbidden response has a 2xx status code +func (o *ResetAPIClientSecretForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this reset Api client secret forbidden response has a 3xx status code +func (o *ResetAPIClientSecretForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this reset Api client secret forbidden response has a 4xx status code +func (o *ResetAPIClientSecretForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this reset Api client secret forbidden response has a 5xx status code +func (o *ResetAPIClientSecretForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this reset Api client secret forbidden response a status code equal to that given +func (o *ResetAPIClientSecretForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the reset Api client secret forbidden response +func (o *ResetAPIClientSecretForbidden) Code() int { + return 403 +} + +func (o *ResetAPIClientSecretForbidden) Error() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients-actions/v1][%d] resetApiClientSecretForbidden %+v", 403, o.Payload) +} + +func (o *ResetAPIClientSecretForbidden) String() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients-actions/v1][%d] resetApiClientSecretForbidden %+v", 403, o.Payload) +} + +func (o *ResetAPIClientSecretForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *ResetAPIClientSecretForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewResetAPIClientSecretTooManyRequests creates a ResetAPIClientSecretTooManyRequests with default headers values +func NewResetAPIClientSecretTooManyRequests() *ResetAPIClientSecretTooManyRequests { + return &ResetAPIClientSecretTooManyRequests{} +} + +/* +ResetAPIClientSecretTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type ResetAPIClientSecretTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this reset Api client secret too many requests response has a 2xx status code +func (o *ResetAPIClientSecretTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this reset Api client secret too many requests response has a 3xx status code +func (o *ResetAPIClientSecretTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this reset Api client secret too many requests response has a 4xx status code +func (o *ResetAPIClientSecretTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this reset Api client secret too many requests response has a 5xx status code +func (o *ResetAPIClientSecretTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this reset Api client secret too many requests response a status code equal to that given +func (o *ResetAPIClientSecretTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the reset Api client secret too many requests response +func (o *ResetAPIClientSecretTooManyRequests) Code() int { + return 429 +} + +func (o *ResetAPIClientSecretTooManyRequests) Error() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients-actions/v1][%d] resetApiClientSecretTooManyRequests %+v", 429, o.Payload) +} + +func (o *ResetAPIClientSecretTooManyRequests) String() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients-actions/v1][%d] resetApiClientSecretTooManyRequests %+v", 429, o.Payload) +} + +func (o *ResetAPIClientSecretTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *ResetAPIClientSecretTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewResetAPIClientSecretInternalServerError creates a ResetAPIClientSecretInternalServerError with default headers values +func NewResetAPIClientSecretInternalServerError() *ResetAPIClientSecretInternalServerError { + return &ResetAPIClientSecretInternalServerError{} +} + +/* +ResetAPIClientSecretInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type ResetAPIClientSecretInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this reset Api client secret internal server error response has a 2xx status code +func (o *ResetAPIClientSecretInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this reset Api client secret internal server error response has a 3xx status code +func (o *ResetAPIClientSecretInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this reset Api client secret internal server error response has a 4xx status code +func (o *ResetAPIClientSecretInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this reset Api client secret internal server error response has a 5xx status code +func (o *ResetAPIClientSecretInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this reset Api client secret internal server error response a status code equal to that given +func (o *ResetAPIClientSecretInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the reset Api client secret internal server error response +func (o *ResetAPIClientSecretInternalServerError) Code() int { + return 500 +} + +func (o *ResetAPIClientSecretInternalServerError) Error() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients-actions/v1][%d] resetApiClientSecretInternalServerError %+v", 500, o.Payload) +} + +func (o *ResetAPIClientSecretInternalServerError) String() string { + return fmt.Sprintf("[POST /api-clients/entities/api-clients-actions/v1][%d] resetApiClientSecretInternalServerError %+v", 500, o.Payload) +} + +func (o *ResetAPIClientSecretInternalServerError) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *ResetAPIClientSecretInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/api_clients/update_api_client_parameters.go b/falcon/client/api_clients/update_api_client_parameters.go new file mode 100644 index 000000000..fbb646c43 --- /dev/null +++ b/falcon/client/api_clients/update_api_client_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewUpdateAPIClientParams creates a new UpdateAPIClientParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUpdateAPIClientParams() *UpdateAPIClientParams { + return &UpdateAPIClientParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUpdateAPIClientParamsWithTimeout creates a new UpdateAPIClientParams object +// with the ability to set a timeout on a request. +func NewUpdateAPIClientParamsWithTimeout(timeout time.Duration) *UpdateAPIClientParams { + return &UpdateAPIClientParams{ + timeout: timeout, + } +} + +// NewUpdateAPIClientParamsWithContext creates a new UpdateAPIClientParams object +// with the ability to set a context for a request. +func NewUpdateAPIClientParamsWithContext(ctx context.Context) *UpdateAPIClientParams { + return &UpdateAPIClientParams{ + Context: ctx, + } +} + +// NewUpdateAPIClientParamsWithHTTPClient creates a new UpdateAPIClientParams object +// with the ability to set a custom HTTPClient for a request. +func NewUpdateAPIClientParamsWithHTTPClient(client *http.Client) *UpdateAPIClientParams { + return &UpdateAPIClientParams{ + HTTPClient: client, + } +} + +/* +UpdateAPIClientParams contains all the parameters to send to the API endpoint + + for the update API client operation. + + Typically these are written to a http.Request. +*/ +type UpdateAPIClientParams struct { + + // Body. + Body *models.APIClientRequest + + /* Ids. + + The API Client ID for which to update the API Client definition. + */ + Ids string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the update API client params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateAPIClientParams) WithDefaults() *UpdateAPIClientParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the update API client params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateAPIClientParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the update API client params +func (o *UpdateAPIClientParams) WithTimeout(timeout time.Duration) *UpdateAPIClientParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the update API client params +func (o *UpdateAPIClientParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the update API client params +func (o *UpdateAPIClientParams) WithContext(ctx context.Context) *UpdateAPIClientParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the update API client params +func (o *UpdateAPIClientParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the update API client params +func (o *UpdateAPIClientParams) WithHTTPClient(client *http.Client) *UpdateAPIClientParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the update API client params +func (o *UpdateAPIClientParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the update API client params +func (o *UpdateAPIClientParams) WithBody(body *models.APIClientRequest) *UpdateAPIClientParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the update API client params +func (o *UpdateAPIClientParams) SetBody(body *models.APIClientRequest) { + o.Body = body +} + +// WithIds adds the ids to the update API client params +func (o *UpdateAPIClientParams) WithIds(ids string) *UpdateAPIClientParams { + o.SetIds(ids) + return o +} + +// SetIds adds the ids to the update API client params +func (o *UpdateAPIClientParams) SetIds(ids string) { + o.Ids = ids +} + +// WriteToRequest writes these params to a swagger request +func (o *UpdateAPIClientParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // query param ids + qrIds := o.Ids + qIds := qrIds + if qIds != "" { + + if err := r.SetQueryParam("ids", qIds); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/api_clients/update_api_client_responses.go b/falcon/client/api_clients/update_api_client_responses.go new file mode 100644 index 000000000..e7509dff5 --- /dev/null +++ b/falcon/client/api_clients/update_api_client_responses.go @@ -0,0 +1,729 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package api_clients + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// UpdateAPIClientReader is a Reader for the UpdateAPIClient structure. +type UpdateAPIClientReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateAPIClientReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewUpdateAPIClientNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewUpdateAPIClientBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewUpdateAPIClientForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewUpdateAPIClientConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewUpdateAPIClientTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUpdateAPIClientInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[PATCH /api-clients/entities/api-clients/v1] UpdateAPIClient", response, response.Code()) + } +} + +// NewUpdateAPIClientNoContent creates a UpdateAPIClientNoContent with default headers values +func NewUpdateAPIClientNoContent() *UpdateAPIClientNoContent { + return &UpdateAPIClientNoContent{} +} + +/* +UpdateAPIClientNoContent describes a response with status code 204, with default header values. + +No Content +*/ +type UpdateAPIClientNoContent struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 +} + +// IsSuccess returns true when this update Api client no content response has a 2xx status code +func (o *UpdateAPIClientNoContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update Api client no content response has a 3xx status code +func (o *UpdateAPIClientNoContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update Api client no content response has a 4xx status code +func (o *UpdateAPIClientNoContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this update Api client no content response has a 5xx status code +func (o *UpdateAPIClientNoContent) IsServerError() bool { + return false +} + +// IsCode returns true when this update Api client no content response a status code equal to that given +func (o *UpdateAPIClientNoContent) IsCode(code int) bool { + return code == 204 +} + +// Code gets the status code for the update Api client no content response +func (o *UpdateAPIClientNoContent) Code() int { + return 204 +} + +func (o *UpdateAPIClientNoContent) Error() string { + return fmt.Sprintf("[PATCH /api-clients/entities/api-clients/v1][%d] updateApiClientNoContent ", 204) +} + +func (o *UpdateAPIClientNoContent) String() string { + return fmt.Sprintf("[PATCH /api-clients/entities/api-clients/v1][%d] updateApiClientNoContent ", 204) +} + +func (o *UpdateAPIClientNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + return nil +} + +// NewUpdateAPIClientBadRequest creates a UpdateAPIClientBadRequest with default headers values +func NewUpdateAPIClientBadRequest() *UpdateAPIClientBadRequest { + return &UpdateAPIClientBadRequest{} +} + +/* +UpdateAPIClientBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type UpdateAPIClientBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this update Api client bad request response has a 2xx status code +func (o *UpdateAPIClientBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update Api client bad request response has a 3xx status code +func (o *UpdateAPIClientBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update Api client bad request response has a 4xx status code +func (o *UpdateAPIClientBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this update Api client bad request response has a 5xx status code +func (o *UpdateAPIClientBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this update Api client bad request response a status code equal to that given +func (o *UpdateAPIClientBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the update Api client bad request response +func (o *UpdateAPIClientBadRequest) Code() int { + return 400 +} + +func (o *UpdateAPIClientBadRequest) Error() string { + return fmt.Sprintf("[PATCH /api-clients/entities/api-clients/v1][%d] updateApiClientBadRequest %+v", 400, o.Payload) +} + +func (o *UpdateAPIClientBadRequest) String() string { + return fmt.Sprintf("[PATCH /api-clients/entities/api-clients/v1][%d] updateApiClientBadRequest %+v", 400, o.Payload) +} + +func (o *UpdateAPIClientBadRequest) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *UpdateAPIClientBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateAPIClientForbidden creates a UpdateAPIClientForbidden with default headers values +func NewUpdateAPIClientForbidden() *UpdateAPIClientForbidden { + return &UpdateAPIClientForbidden{} +} + +/* +UpdateAPIClientForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type UpdateAPIClientForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this update Api client forbidden response has a 2xx status code +func (o *UpdateAPIClientForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update Api client forbidden response has a 3xx status code +func (o *UpdateAPIClientForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update Api client forbidden response has a 4xx status code +func (o *UpdateAPIClientForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this update Api client forbidden response has a 5xx status code +func (o *UpdateAPIClientForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this update Api client forbidden response a status code equal to that given +func (o *UpdateAPIClientForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the update Api client forbidden response +func (o *UpdateAPIClientForbidden) Code() int { + return 403 +} + +func (o *UpdateAPIClientForbidden) Error() string { + return fmt.Sprintf("[PATCH /api-clients/entities/api-clients/v1][%d] updateApiClientForbidden %+v", 403, o.Payload) +} + +func (o *UpdateAPIClientForbidden) String() string { + return fmt.Sprintf("[PATCH /api-clients/entities/api-clients/v1][%d] updateApiClientForbidden %+v", 403, o.Payload) +} + +func (o *UpdateAPIClientForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *UpdateAPIClientForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateAPIClientConflict creates a UpdateAPIClientConflict with default headers values +func NewUpdateAPIClientConflict() *UpdateAPIClientConflict { + return &UpdateAPIClientConflict{} +} + +/* +UpdateAPIClientConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type UpdateAPIClientConflict struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this update Api client conflict response has a 2xx status code +func (o *UpdateAPIClientConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update Api client conflict response has a 3xx status code +func (o *UpdateAPIClientConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update Api client conflict response has a 4xx status code +func (o *UpdateAPIClientConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this update Api client conflict response has a 5xx status code +func (o *UpdateAPIClientConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this update Api client conflict response a status code equal to that given +func (o *UpdateAPIClientConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the update Api client conflict response +func (o *UpdateAPIClientConflict) Code() int { + return 409 +} + +func (o *UpdateAPIClientConflict) Error() string { + return fmt.Sprintf("[PATCH /api-clients/entities/api-clients/v1][%d] updateApiClientConflict %+v", 409, o.Payload) +} + +func (o *UpdateAPIClientConflict) String() string { + return fmt.Sprintf("[PATCH /api-clients/entities/api-clients/v1][%d] updateApiClientConflict %+v", 409, o.Payload) +} + +func (o *UpdateAPIClientConflict) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *UpdateAPIClientConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateAPIClientTooManyRequests creates a UpdateAPIClientTooManyRequests with default headers values +func NewUpdateAPIClientTooManyRequests() *UpdateAPIClientTooManyRequests { + return &UpdateAPIClientTooManyRequests{} +} + +/* +UpdateAPIClientTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type UpdateAPIClientTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this update Api client too many requests response has a 2xx status code +func (o *UpdateAPIClientTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update Api client too many requests response has a 3xx status code +func (o *UpdateAPIClientTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update Api client too many requests response has a 4xx status code +func (o *UpdateAPIClientTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this update Api client too many requests response has a 5xx status code +func (o *UpdateAPIClientTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this update Api client too many requests response a status code equal to that given +func (o *UpdateAPIClientTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the update Api client too many requests response +func (o *UpdateAPIClientTooManyRequests) Code() int { + return 429 +} + +func (o *UpdateAPIClientTooManyRequests) Error() string { + return fmt.Sprintf("[PATCH /api-clients/entities/api-clients/v1][%d] updateApiClientTooManyRequests %+v", 429, o.Payload) +} + +func (o *UpdateAPIClientTooManyRequests) String() string { + return fmt.Sprintf("[PATCH /api-clients/entities/api-clients/v1][%d] updateApiClientTooManyRequests %+v", 429, o.Payload) +} + +func (o *UpdateAPIClientTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *UpdateAPIClientTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateAPIClientInternalServerError creates a UpdateAPIClientInternalServerError with default headers values +func NewUpdateAPIClientInternalServerError() *UpdateAPIClientInternalServerError { + return &UpdateAPIClientInternalServerError{} +} + +/* +UpdateAPIClientInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type UpdateAPIClientInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this update Api client internal server error response has a 2xx status code +func (o *UpdateAPIClientInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update Api client internal server error response has a 3xx status code +func (o *UpdateAPIClientInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update Api client internal server error response has a 4xx status code +func (o *UpdateAPIClientInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this update Api client internal server error response has a 5xx status code +func (o *UpdateAPIClientInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this update Api client internal server error response a status code equal to that given +func (o *UpdateAPIClientInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the update Api client internal server error response +func (o *UpdateAPIClientInternalServerError) Code() int { + return 500 +} + +func (o *UpdateAPIClientInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /api-clients/entities/api-clients/v1][%d] updateApiClientInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateAPIClientInternalServerError) String() string { + return fmt.Sprintf("[PATCH /api-clients/entities/api-clients/v1][%d] updateApiClientInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateAPIClientInternalServerError) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *UpdateAPIClientInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_azure_registration_client.go b/falcon/client/cloud_azure_registration/cloud_azure_registration_client.go index 730926528..7239a3158 100644 --- a/falcon/client/cloud_azure_registration/cloud_azure_registration_client.go +++ b/falcon/client/cloud_azure_registration/cloud_azure_registration_client.go @@ -32,20 +32,36 @@ type ClientOption func(*runtime.ClientOperation) type ClientService interface { CloudRegistrationAzureCreateRegistration(params *CloudRegistrationAzureCreateRegistrationParams, opts ...ClientOption) (*CloudRegistrationAzureCreateRegistrationCreated, error) + CloudRegistrationAzureCreateSuppressions(params *CloudRegistrationAzureCreateSuppressionsParams, opts ...ClientOption) (*CloudRegistrationAzureCreateSuppressionsCreated, error) + CloudRegistrationAzureDeleteLegacySubscription(params *CloudRegistrationAzureDeleteLegacySubscriptionParams, opts ...ClientOption) (*CloudRegistrationAzureDeleteLegacySubscriptionOK, error) CloudRegistrationAzureDeleteRegistration(params *CloudRegistrationAzureDeleteRegistrationParams, opts ...ClientOption) (*CloudRegistrationAzureDeleteRegistrationOK, error) + CloudRegistrationAzureDeleteSuppressions(params *CloudRegistrationAzureDeleteSuppressionsParams, opts ...ClientOption) (*CloudRegistrationAzureDeleteSuppressionsOK, error) + CloudRegistrationAzureDownloadScript(params *CloudRegistrationAzureDownloadScriptParams, opts ...ClientOption) (*CloudRegistrationAzureDownloadScriptOK, error) + CloudRegistrationAzureGetIssueSuppressionValuesByField(params *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams, opts ...ClientOption) (*CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK, error) + + CloudRegistrationAzureGetIssueValuesByField(params *CloudRegistrationAzureGetIssueValuesByFieldParams, opts ...ClientOption) (*CloudRegistrationAzureGetIssueValuesByFieldOK, error) + + CloudRegistrationAzureGetIssues(params *CloudRegistrationAzureGetIssuesParams, opts ...ClientOption) (*CloudRegistrationAzureGetIssuesOK, error) + CloudRegistrationAzureGetRegistration(params *CloudRegistrationAzureGetRegistrationParams, opts ...ClientOption) (*CloudRegistrationAzureGetRegistrationOK, error) CloudRegistrationAzureGetScript(params *CloudRegistrationAzureGetScriptParams, opts ...ClientOption) (*CloudRegistrationAzureGetScriptOK, error) + CloudRegistrationAzureGetScriptVersions(params *CloudRegistrationAzureGetScriptVersionsParams, opts ...ClientOption) (*CloudRegistrationAzureGetScriptVersionsOK, error) + + CloudRegistrationAzureGetSuppressions(params *CloudRegistrationAzureGetSuppressionsParams, opts ...ClientOption) (*CloudRegistrationAzureGetSuppressionsOK, error) + CloudRegistrationAzureTriggerHealthCheck(params *CloudRegistrationAzureTriggerHealthCheckParams, opts ...ClientOption) (*CloudRegistrationAzureTriggerHealthCheckOK, error) CloudRegistrationAzureUpdateRegistration(params *CloudRegistrationAzureUpdateRegistrationParams, opts ...ClientOption) (*CloudRegistrationAzureUpdateRegistrationOK, error) + CloudRegistrationAzureUpdateSuppressions(params *CloudRegistrationAzureUpdateSuppressionsParams, opts ...ClientOption) (*CloudRegistrationAzureUpdateSuppressionsOK, error) + CloudRegistrationAzureValidateRegistration(params *CloudRegistrationAzureValidateRegistrationParams, opts ...ClientOption) (*CloudRegistrationAzureValidateRegistrationOK, error) SetTransport(transport runtime.ClientTransport) @@ -89,6 +105,44 @@ func (a *Client) CloudRegistrationAzureCreateRegistration(params *CloudRegistrat panic(msg) } +/* +CloudRegistrationAzureCreateSuppressions creates new issue suppression rules +*/ +func (a *Client) CloudRegistrationAzureCreateSuppressions(params *CloudRegistrationAzureCreateSuppressionsParams, opts ...ClientOption) (*CloudRegistrationAzureCreateSuppressionsCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCloudRegistrationAzureCreateSuppressionsParams() + } + op := &runtime.ClientOperation{ + ID: "cloud-registration-azure-create-suppressions", + Method: "POST", + PathPattern: "/cloud-security-registration-azure/entities/issue-suppressions/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CloudRegistrationAzureCreateSuppressionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CloudRegistrationAzureCreateSuppressionsCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for cloud-registration-azure-create-suppressions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* CloudRegistrationAzureDeleteLegacySubscription deletes existing legacy azure subscriptions */ @@ -165,6 +219,44 @@ func (a *Client) CloudRegistrationAzureDeleteRegistration(params *CloudRegistrat panic(msg) } +/* +CloudRegistrationAzureDeleteSuppressions removes revoke suppression rules +*/ +func (a *Client) CloudRegistrationAzureDeleteSuppressions(params *CloudRegistrationAzureDeleteSuppressionsParams, opts ...ClientOption) (*CloudRegistrationAzureDeleteSuppressionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCloudRegistrationAzureDeleteSuppressionsParams() + } + op := &runtime.ClientOperation{ + ID: "cloud-registration-azure-delete-suppressions", + Method: "DELETE", + PathPattern: "/cloud-security-registration-azure/entities/issue-suppressions/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CloudRegistrationAzureDeleteSuppressionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CloudRegistrationAzureDeleteSuppressionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for cloud-registration-azure-delete-suppressions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* CloudRegistrationAzureDownloadScript retrieves script to create resources */ @@ -203,6 +295,120 @@ func (a *Client) CloudRegistrationAzureDownloadScript(params *CloudRegistrationA panic(msg) } +/* +CloudRegistrationAzureGetIssueSuppressionValuesByField retrieves distinct filterable values for issue suppression fields +*/ +func (a *Client) CloudRegistrationAzureGetIssueSuppressionValuesByField(params *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams, opts ...ClientOption) (*CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldParams() + } + op := &runtime.ClientOperation{ + ID: "cloud-registration-azure-get-issue-suppression-values-by-field", + Method: "GET", + PathPattern: "/cloud-security-registration-azure/aggregates/issue-suppressions-values-by-fields/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CloudRegistrationAzureGetIssueSuppressionValuesByFieldReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for cloud-registration-azure-get-issue-suppression-values-by-field: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +CloudRegistrationAzureGetIssueValuesByField retrieves distinct filterable values for issue fields +*/ +func (a *Client) CloudRegistrationAzureGetIssueValuesByField(params *CloudRegistrationAzureGetIssueValuesByFieldParams, opts ...ClientOption) (*CloudRegistrationAzureGetIssueValuesByFieldOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCloudRegistrationAzureGetIssueValuesByFieldParams() + } + op := &runtime.ClientOperation{ + ID: "cloud-registration-azure-get-issue-values-by-field", + Method: "GET", + PathPattern: "/cloud-security-registration-azure/aggregates/issues-values-by-fields/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CloudRegistrationAzureGetIssueValuesByFieldReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CloudRegistrationAzureGetIssueValuesByFieldOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for cloud-registration-azure-get-issue-values-by-field: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +CloudRegistrationAzureGetIssues retrieves issues for azure registrations +*/ +func (a *Client) CloudRegistrationAzureGetIssues(params *CloudRegistrationAzureGetIssuesParams, opts ...ClientOption) (*CloudRegistrationAzureGetIssuesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCloudRegistrationAzureGetIssuesParams() + } + op := &runtime.ClientOperation{ + ID: "cloud-registration-azure-get-issues", + Method: "GET", + PathPattern: "/cloud-security-registration-azure/entities/issues/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CloudRegistrationAzureGetIssuesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CloudRegistrationAzureGetIssuesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for cloud-registration-azure-get-issues: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* CloudRegistrationAzureGetRegistration retrieves existing azure registration for a tenant */ @@ -279,6 +485,82 @@ func (a *Client) CloudRegistrationAzureGetScript(params *CloudRegistrationAzureG panic(msg) } +/* +CloudRegistrationAzureGetScriptVersions retrieves all available script versions with filtering and sorting +*/ +func (a *Client) CloudRegistrationAzureGetScriptVersions(params *CloudRegistrationAzureGetScriptVersionsParams, opts ...ClientOption) (*CloudRegistrationAzureGetScriptVersionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCloudRegistrationAzureGetScriptVersionsParams() + } + op := &runtime.ClientOperation{ + ID: "cloud-registration-azure-get-script-versions", + Method: "GET", + PathPattern: "/cloud-security-registration-azure/entities/script-versions/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CloudRegistrationAzureGetScriptVersionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CloudRegistrationAzureGetScriptVersionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for cloud-registration-azure-get-script-versions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +CloudRegistrationAzureGetSuppressions retrieves existing suppression rules with filtering +*/ +func (a *Client) CloudRegistrationAzureGetSuppressions(params *CloudRegistrationAzureGetSuppressionsParams, opts ...ClientOption) (*CloudRegistrationAzureGetSuppressionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCloudRegistrationAzureGetSuppressionsParams() + } + op := &runtime.ClientOperation{ + ID: "cloud-registration-azure-get-suppressions", + Method: "GET", + PathPattern: "/cloud-security-registration-azure/entities/issue-suppressions/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CloudRegistrationAzureGetSuppressionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CloudRegistrationAzureGetSuppressionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for cloud-registration-azure-get-suppressions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* CloudRegistrationAzureTriggerHealthCheck triggers health check scan for azure registrations */ @@ -355,6 +637,44 @@ func (a *Client) CloudRegistrationAzureUpdateRegistration(params *CloudRegistrat panic(msg) } +/* +CloudRegistrationAzureUpdateSuppressions updates existing suppression rules +*/ +func (a *Client) CloudRegistrationAzureUpdateSuppressions(params *CloudRegistrationAzureUpdateSuppressionsParams, opts ...ClientOption) (*CloudRegistrationAzureUpdateSuppressionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCloudRegistrationAzureUpdateSuppressionsParams() + } + op := &runtime.ClientOperation{ + ID: "cloud-registration-azure-update-suppressions", + Method: "PATCH", + PathPattern: "/cloud-security-registration-azure/entities/issue-suppressions/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CloudRegistrationAzureUpdateSuppressionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CloudRegistrationAzureUpdateSuppressionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for cloud-registration-azure-update-suppressions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* CloudRegistrationAzureValidateRegistration validates an azure registration by checking service principal role assignments and deployment stack if the deployment method is bicep */ diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_create_suppressions_parameters.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_create_suppressions_parameters.go new file mode 100644 index 000000000..6f615faec --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_create_suppressions_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewCloudRegistrationAzureCreateSuppressionsParams creates a new CloudRegistrationAzureCreateSuppressionsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCloudRegistrationAzureCreateSuppressionsParams() *CloudRegistrationAzureCreateSuppressionsParams { + return &CloudRegistrationAzureCreateSuppressionsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCloudRegistrationAzureCreateSuppressionsParamsWithTimeout creates a new CloudRegistrationAzureCreateSuppressionsParams object +// with the ability to set a timeout on a request. +func NewCloudRegistrationAzureCreateSuppressionsParamsWithTimeout(timeout time.Duration) *CloudRegistrationAzureCreateSuppressionsParams { + return &CloudRegistrationAzureCreateSuppressionsParams{ + timeout: timeout, + } +} + +// NewCloudRegistrationAzureCreateSuppressionsParamsWithContext creates a new CloudRegistrationAzureCreateSuppressionsParams object +// with the ability to set a context for a request. +func NewCloudRegistrationAzureCreateSuppressionsParamsWithContext(ctx context.Context) *CloudRegistrationAzureCreateSuppressionsParams { + return &CloudRegistrationAzureCreateSuppressionsParams{ + Context: ctx, + } +} + +// NewCloudRegistrationAzureCreateSuppressionsParamsWithHTTPClient creates a new CloudRegistrationAzureCreateSuppressionsParams object +// with the ability to set a custom HTTPClient for a request. +func NewCloudRegistrationAzureCreateSuppressionsParamsWithHTTPClient(client *http.Client) *CloudRegistrationAzureCreateSuppressionsParams { + return &CloudRegistrationAzureCreateSuppressionsParams{ + HTTPClient: client, + } +} + +/* +CloudRegistrationAzureCreateSuppressionsParams contains all the parameters to send to the API endpoint + + for the cloud registration azure create suppressions operation. + + Typically these are written to a http.Request. +*/ +type CloudRegistrationAzureCreateSuppressionsParams struct { + + // Body. + Body *models.AzureSuppressionCreateRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cloud registration azure create suppressions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureCreateSuppressionsParams) WithDefaults() *CloudRegistrationAzureCreateSuppressionsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cloud registration azure create suppressions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureCreateSuppressionsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cloud registration azure create suppressions params +func (o *CloudRegistrationAzureCreateSuppressionsParams) WithTimeout(timeout time.Duration) *CloudRegistrationAzureCreateSuppressionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cloud registration azure create suppressions params +func (o *CloudRegistrationAzureCreateSuppressionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cloud registration azure create suppressions params +func (o *CloudRegistrationAzureCreateSuppressionsParams) WithContext(ctx context.Context) *CloudRegistrationAzureCreateSuppressionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cloud registration azure create suppressions params +func (o *CloudRegistrationAzureCreateSuppressionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cloud registration azure create suppressions params +func (o *CloudRegistrationAzureCreateSuppressionsParams) WithHTTPClient(client *http.Client) *CloudRegistrationAzureCreateSuppressionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cloud registration azure create suppressions params +func (o *CloudRegistrationAzureCreateSuppressionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the cloud registration azure create suppressions params +func (o *CloudRegistrationAzureCreateSuppressionsParams) WithBody(body *models.AzureSuppressionCreateRequest) *CloudRegistrationAzureCreateSuppressionsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the cloud registration azure create suppressions params +func (o *CloudRegistrationAzureCreateSuppressionsParams) SetBody(body *models.AzureSuppressionCreateRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *CloudRegistrationAzureCreateSuppressionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_create_suppressions_responses.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_create_suppressions_responses.go new file mode 100644 index 000000000..ed0b5ee7e --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_create_suppressions_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CloudRegistrationAzureCreateSuppressionsReader is a Reader for the CloudRegistrationAzureCreateSuppressions structure. +type CloudRegistrationAzureCreateSuppressionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CloudRegistrationAzureCreateSuppressionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewCloudRegistrationAzureCreateSuppressionsCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCloudRegistrationAzureCreateSuppressionsBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCloudRegistrationAzureCreateSuppressionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCloudRegistrationAzureCreateSuppressionsTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCloudRegistrationAzureCreateSuppressionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /cloud-security-registration-azure/entities/issue-suppressions/v1] cloud-registration-azure-create-suppressions", response, response.Code()) + } +} + +// NewCloudRegistrationAzureCreateSuppressionsCreated creates a CloudRegistrationAzureCreateSuppressionsCreated with default headers values +func NewCloudRegistrationAzureCreateSuppressionsCreated() *CloudRegistrationAzureCreateSuppressionsCreated { + return &CloudRegistrationAzureCreateSuppressionsCreated{} +} + +/* +CloudRegistrationAzureCreateSuppressionsCreated describes a response with status code 201, with default header values. + +Created +*/ +type CloudRegistrationAzureCreateSuppressionsCreated struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AzureSuppressionResponseExtV1 +} + +// IsSuccess returns true when this cloud registration azure create suppressions created response has a 2xx status code +func (o *CloudRegistrationAzureCreateSuppressionsCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cloud registration azure create suppressions created response has a 3xx status code +func (o *CloudRegistrationAzureCreateSuppressionsCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure create suppressions created response has a 4xx status code +func (o *CloudRegistrationAzureCreateSuppressionsCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure create suppressions created response has a 5xx status code +func (o *CloudRegistrationAzureCreateSuppressionsCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure create suppressions created response a status code equal to that given +func (o *CloudRegistrationAzureCreateSuppressionsCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the cloud registration azure create suppressions created response +func (o *CloudRegistrationAzureCreateSuppressionsCreated) Code() int { + return 201 +} + +func (o *CloudRegistrationAzureCreateSuppressionsCreated) Error() string { + return fmt.Sprintf("[POST /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureCreateSuppressionsCreated %+v", 201, o.Payload) +} + +func (o *CloudRegistrationAzureCreateSuppressionsCreated) String() string { + return fmt.Sprintf("[POST /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureCreateSuppressionsCreated %+v", 201, o.Payload) +} + +func (o *CloudRegistrationAzureCreateSuppressionsCreated) GetPayload() *models.AzureSuppressionResponseExtV1 { + return o.Payload +} + +func (o *CloudRegistrationAzureCreateSuppressionsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AzureSuppressionResponseExtV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureCreateSuppressionsBadRequest creates a CloudRegistrationAzureCreateSuppressionsBadRequest with default headers values +func NewCloudRegistrationAzureCreateSuppressionsBadRequest() *CloudRegistrationAzureCreateSuppressionsBadRequest { + return &CloudRegistrationAzureCreateSuppressionsBadRequest{} +} + +/* +CloudRegistrationAzureCreateSuppressionsBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CloudRegistrationAzureCreateSuppressionsBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure create suppressions bad request response has a 2xx status code +func (o *CloudRegistrationAzureCreateSuppressionsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure create suppressions bad request response has a 3xx status code +func (o *CloudRegistrationAzureCreateSuppressionsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure create suppressions bad request response has a 4xx status code +func (o *CloudRegistrationAzureCreateSuppressionsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure create suppressions bad request response has a 5xx status code +func (o *CloudRegistrationAzureCreateSuppressionsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure create suppressions bad request response a status code equal to that given +func (o *CloudRegistrationAzureCreateSuppressionsBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the cloud registration azure create suppressions bad request response +func (o *CloudRegistrationAzureCreateSuppressionsBadRequest) Code() int { + return 400 +} + +func (o *CloudRegistrationAzureCreateSuppressionsBadRequest) Error() string { + return fmt.Sprintf("[POST /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureCreateSuppressionsBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureCreateSuppressionsBadRequest) String() string { + return fmt.Sprintf("[POST /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureCreateSuppressionsBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureCreateSuppressionsBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureCreateSuppressionsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureCreateSuppressionsForbidden creates a CloudRegistrationAzureCreateSuppressionsForbidden with default headers values +func NewCloudRegistrationAzureCreateSuppressionsForbidden() *CloudRegistrationAzureCreateSuppressionsForbidden { + return &CloudRegistrationAzureCreateSuppressionsForbidden{} +} + +/* +CloudRegistrationAzureCreateSuppressionsForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CloudRegistrationAzureCreateSuppressionsForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure create suppressions forbidden response has a 2xx status code +func (o *CloudRegistrationAzureCreateSuppressionsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure create suppressions forbidden response has a 3xx status code +func (o *CloudRegistrationAzureCreateSuppressionsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure create suppressions forbidden response has a 4xx status code +func (o *CloudRegistrationAzureCreateSuppressionsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure create suppressions forbidden response has a 5xx status code +func (o *CloudRegistrationAzureCreateSuppressionsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure create suppressions forbidden response a status code equal to that given +func (o *CloudRegistrationAzureCreateSuppressionsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the cloud registration azure create suppressions forbidden response +func (o *CloudRegistrationAzureCreateSuppressionsForbidden) Code() int { + return 403 +} + +func (o *CloudRegistrationAzureCreateSuppressionsForbidden) Error() string { + return fmt.Sprintf("[POST /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureCreateSuppressionsForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureCreateSuppressionsForbidden) String() string { + return fmt.Sprintf("[POST /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureCreateSuppressionsForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureCreateSuppressionsForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureCreateSuppressionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureCreateSuppressionsTooManyRequests creates a CloudRegistrationAzureCreateSuppressionsTooManyRequests with default headers values +func NewCloudRegistrationAzureCreateSuppressionsTooManyRequests() *CloudRegistrationAzureCreateSuppressionsTooManyRequests { + return &CloudRegistrationAzureCreateSuppressionsTooManyRequests{} +} + +/* +CloudRegistrationAzureCreateSuppressionsTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CloudRegistrationAzureCreateSuppressionsTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this cloud registration azure create suppressions too many requests response has a 2xx status code +func (o *CloudRegistrationAzureCreateSuppressionsTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure create suppressions too many requests response has a 3xx status code +func (o *CloudRegistrationAzureCreateSuppressionsTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure create suppressions too many requests response has a 4xx status code +func (o *CloudRegistrationAzureCreateSuppressionsTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure create suppressions too many requests response has a 5xx status code +func (o *CloudRegistrationAzureCreateSuppressionsTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure create suppressions too many requests response a status code equal to that given +func (o *CloudRegistrationAzureCreateSuppressionsTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the cloud registration azure create suppressions too many requests response +func (o *CloudRegistrationAzureCreateSuppressionsTooManyRequests) Code() int { + return 429 +} + +func (o *CloudRegistrationAzureCreateSuppressionsTooManyRequests) Error() string { + return fmt.Sprintf("[POST /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureCreateSuppressionsTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureCreateSuppressionsTooManyRequests) String() string { + return fmt.Sprintf("[POST /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureCreateSuppressionsTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureCreateSuppressionsTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CloudRegistrationAzureCreateSuppressionsTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureCreateSuppressionsInternalServerError creates a CloudRegistrationAzureCreateSuppressionsInternalServerError with default headers values +func NewCloudRegistrationAzureCreateSuppressionsInternalServerError() *CloudRegistrationAzureCreateSuppressionsInternalServerError { + return &CloudRegistrationAzureCreateSuppressionsInternalServerError{} +} + +/* +CloudRegistrationAzureCreateSuppressionsInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CloudRegistrationAzureCreateSuppressionsInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure create suppressions internal server error response has a 2xx status code +func (o *CloudRegistrationAzureCreateSuppressionsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure create suppressions internal server error response has a 3xx status code +func (o *CloudRegistrationAzureCreateSuppressionsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure create suppressions internal server error response has a 4xx status code +func (o *CloudRegistrationAzureCreateSuppressionsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure create suppressions internal server error response has a 5xx status code +func (o *CloudRegistrationAzureCreateSuppressionsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this cloud registration azure create suppressions internal server error response a status code equal to that given +func (o *CloudRegistrationAzureCreateSuppressionsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the cloud registration azure create suppressions internal server error response +func (o *CloudRegistrationAzureCreateSuppressionsInternalServerError) Code() int { + return 500 +} + +func (o *CloudRegistrationAzureCreateSuppressionsInternalServerError) Error() string { + return fmt.Sprintf("[POST /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureCreateSuppressionsInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureCreateSuppressionsInternalServerError) String() string { + return fmt.Sprintf("[POST /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureCreateSuppressionsInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureCreateSuppressionsInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureCreateSuppressionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_delete_suppressions_parameters.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_delete_suppressions_parameters.go new file mode 100644 index 000000000..fa360e2e8 --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_delete_suppressions_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewCloudRegistrationAzureDeleteSuppressionsParams creates a new CloudRegistrationAzureDeleteSuppressionsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCloudRegistrationAzureDeleteSuppressionsParams() *CloudRegistrationAzureDeleteSuppressionsParams { + return &CloudRegistrationAzureDeleteSuppressionsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCloudRegistrationAzureDeleteSuppressionsParamsWithTimeout creates a new CloudRegistrationAzureDeleteSuppressionsParams object +// with the ability to set a timeout on a request. +func NewCloudRegistrationAzureDeleteSuppressionsParamsWithTimeout(timeout time.Duration) *CloudRegistrationAzureDeleteSuppressionsParams { + return &CloudRegistrationAzureDeleteSuppressionsParams{ + timeout: timeout, + } +} + +// NewCloudRegistrationAzureDeleteSuppressionsParamsWithContext creates a new CloudRegistrationAzureDeleteSuppressionsParams object +// with the ability to set a context for a request. +func NewCloudRegistrationAzureDeleteSuppressionsParamsWithContext(ctx context.Context) *CloudRegistrationAzureDeleteSuppressionsParams { + return &CloudRegistrationAzureDeleteSuppressionsParams{ + Context: ctx, + } +} + +// NewCloudRegistrationAzureDeleteSuppressionsParamsWithHTTPClient creates a new CloudRegistrationAzureDeleteSuppressionsParams object +// with the ability to set a custom HTTPClient for a request. +func NewCloudRegistrationAzureDeleteSuppressionsParamsWithHTTPClient(client *http.Client) *CloudRegistrationAzureDeleteSuppressionsParams { + return &CloudRegistrationAzureDeleteSuppressionsParams{ + HTTPClient: client, + } +} + +/* +CloudRegistrationAzureDeleteSuppressionsParams contains all the parameters to send to the API endpoint + + for the cloud registration azure delete suppressions operation. + + Typically these are written to a http.Request. +*/ +type CloudRegistrationAzureDeleteSuppressionsParams struct { + + // Body. + Body *models.AzureSuppressionDeleteRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cloud registration azure delete suppressions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureDeleteSuppressionsParams) WithDefaults() *CloudRegistrationAzureDeleteSuppressionsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cloud registration azure delete suppressions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureDeleteSuppressionsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cloud registration azure delete suppressions params +func (o *CloudRegistrationAzureDeleteSuppressionsParams) WithTimeout(timeout time.Duration) *CloudRegistrationAzureDeleteSuppressionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cloud registration azure delete suppressions params +func (o *CloudRegistrationAzureDeleteSuppressionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cloud registration azure delete suppressions params +func (o *CloudRegistrationAzureDeleteSuppressionsParams) WithContext(ctx context.Context) *CloudRegistrationAzureDeleteSuppressionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cloud registration azure delete suppressions params +func (o *CloudRegistrationAzureDeleteSuppressionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cloud registration azure delete suppressions params +func (o *CloudRegistrationAzureDeleteSuppressionsParams) WithHTTPClient(client *http.Client) *CloudRegistrationAzureDeleteSuppressionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cloud registration azure delete suppressions params +func (o *CloudRegistrationAzureDeleteSuppressionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the cloud registration azure delete suppressions params +func (o *CloudRegistrationAzureDeleteSuppressionsParams) WithBody(body *models.AzureSuppressionDeleteRequest) *CloudRegistrationAzureDeleteSuppressionsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the cloud registration azure delete suppressions params +func (o *CloudRegistrationAzureDeleteSuppressionsParams) SetBody(body *models.AzureSuppressionDeleteRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *CloudRegistrationAzureDeleteSuppressionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_delete_suppressions_responses.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_delete_suppressions_responses.go new file mode 100644 index 000000000..667e10d01 --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_delete_suppressions_responses.go @@ -0,0 +1,613 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CloudRegistrationAzureDeleteSuppressionsReader is a Reader for the CloudRegistrationAzureDeleteSuppressions structure. +type CloudRegistrationAzureDeleteSuppressionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CloudRegistrationAzureDeleteSuppressionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCloudRegistrationAzureDeleteSuppressionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCloudRegistrationAzureDeleteSuppressionsBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCloudRegistrationAzureDeleteSuppressionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCloudRegistrationAzureDeleteSuppressionsTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCloudRegistrationAzureDeleteSuppressionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[DELETE /cloud-security-registration-azure/entities/issue-suppressions/v1] cloud-registration-azure-delete-suppressions", response, response.Code()) + } +} + +// NewCloudRegistrationAzureDeleteSuppressionsOK creates a CloudRegistrationAzureDeleteSuppressionsOK with default headers values +func NewCloudRegistrationAzureDeleteSuppressionsOK() *CloudRegistrationAzureDeleteSuppressionsOK { + return &CloudRegistrationAzureDeleteSuppressionsOK{} +} + +/* +CloudRegistrationAzureDeleteSuppressionsOK describes a response with status code 200, with default header values. + +OK +*/ +type CloudRegistrationAzureDeleteSuppressionsOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 +} + +// IsSuccess returns true when this cloud registration azure delete suppressions o k response has a 2xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cloud registration azure delete suppressions o k response has a 3xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure delete suppressions o k response has a 4xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure delete suppressions o k response has a 5xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure delete suppressions o k response a status code equal to that given +func (o *CloudRegistrationAzureDeleteSuppressionsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cloud registration azure delete suppressions o k response +func (o *CloudRegistrationAzureDeleteSuppressionsOK) Code() int { + return 200 +} + +func (o *CloudRegistrationAzureDeleteSuppressionsOK) Error() string { + return fmt.Sprintf("[DELETE /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureDeleteSuppressionsOK ", 200) +} + +func (o *CloudRegistrationAzureDeleteSuppressionsOK) String() string { + return fmt.Sprintf("[DELETE /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureDeleteSuppressionsOK ", 200) +} + +func (o *CloudRegistrationAzureDeleteSuppressionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + return nil +} + +// NewCloudRegistrationAzureDeleteSuppressionsBadRequest creates a CloudRegistrationAzureDeleteSuppressionsBadRequest with default headers values +func NewCloudRegistrationAzureDeleteSuppressionsBadRequest() *CloudRegistrationAzureDeleteSuppressionsBadRequest { + return &CloudRegistrationAzureDeleteSuppressionsBadRequest{} +} + +/* +CloudRegistrationAzureDeleteSuppressionsBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CloudRegistrationAzureDeleteSuppressionsBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure delete suppressions bad request response has a 2xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure delete suppressions bad request response has a 3xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure delete suppressions bad request response has a 4xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure delete suppressions bad request response has a 5xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure delete suppressions bad request response a status code equal to that given +func (o *CloudRegistrationAzureDeleteSuppressionsBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the cloud registration azure delete suppressions bad request response +func (o *CloudRegistrationAzureDeleteSuppressionsBadRequest) Code() int { + return 400 +} + +func (o *CloudRegistrationAzureDeleteSuppressionsBadRequest) Error() string { + return fmt.Sprintf("[DELETE /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureDeleteSuppressionsBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureDeleteSuppressionsBadRequest) String() string { + return fmt.Sprintf("[DELETE /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureDeleteSuppressionsBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureDeleteSuppressionsBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureDeleteSuppressionsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureDeleteSuppressionsForbidden creates a CloudRegistrationAzureDeleteSuppressionsForbidden with default headers values +func NewCloudRegistrationAzureDeleteSuppressionsForbidden() *CloudRegistrationAzureDeleteSuppressionsForbidden { + return &CloudRegistrationAzureDeleteSuppressionsForbidden{} +} + +/* +CloudRegistrationAzureDeleteSuppressionsForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CloudRegistrationAzureDeleteSuppressionsForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure delete suppressions forbidden response has a 2xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure delete suppressions forbidden response has a 3xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure delete suppressions forbidden response has a 4xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure delete suppressions forbidden response has a 5xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure delete suppressions forbidden response a status code equal to that given +func (o *CloudRegistrationAzureDeleteSuppressionsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the cloud registration azure delete suppressions forbidden response +func (o *CloudRegistrationAzureDeleteSuppressionsForbidden) Code() int { + return 403 +} + +func (o *CloudRegistrationAzureDeleteSuppressionsForbidden) Error() string { + return fmt.Sprintf("[DELETE /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureDeleteSuppressionsForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureDeleteSuppressionsForbidden) String() string { + return fmt.Sprintf("[DELETE /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureDeleteSuppressionsForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureDeleteSuppressionsForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureDeleteSuppressionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureDeleteSuppressionsTooManyRequests creates a CloudRegistrationAzureDeleteSuppressionsTooManyRequests with default headers values +func NewCloudRegistrationAzureDeleteSuppressionsTooManyRequests() *CloudRegistrationAzureDeleteSuppressionsTooManyRequests { + return &CloudRegistrationAzureDeleteSuppressionsTooManyRequests{} +} + +/* +CloudRegistrationAzureDeleteSuppressionsTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CloudRegistrationAzureDeleteSuppressionsTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this cloud registration azure delete suppressions too many requests response has a 2xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure delete suppressions too many requests response has a 3xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure delete suppressions too many requests response has a 4xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure delete suppressions too many requests response has a 5xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure delete suppressions too many requests response a status code equal to that given +func (o *CloudRegistrationAzureDeleteSuppressionsTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the cloud registration azure delete suppressions too many requests response +func (o *CloudRegistrationAzureDeleteSuppressionsTooManyRequests) Code() int { + return 429 +} + +func (o *CloudRegistrationAzureDeleteSuppressionsTooManyRequests) Error() string { + return fmt.Sprintf("[DELETE /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureDeleteSuppressionsTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureDeleteSuppressionsTooManyRequests) String() string { + return fmt.Sprintf("[DELETE /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureDeleteSuppressionsTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureDeleteSuppressionsTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CloudRegistrationAzureDeleteSuppressionsTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureDeleteSuppressionsInternalServerError creates a CloudRegistrationAzureDeleteSuppressionsInternalServerError with default headers values +func NewCloudRegistrationAzureDeleteSuppressionsInternalServerError() *CloudRegistrationAzureDeleteSuppressionsInternalServerError { + return &CloudRegistrationAzureDeleteSuppressionsInternalServerError{} +} + +/* +CloudRegistrationAzureDeleteSuppressionsInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CloudRegistrationAzureDeleteSuppressionsInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure delete suppressions internal server error response has a 2xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure delete suppressions internal server error response has a 3xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure delete suppressions internal server error response has a 4xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure delete suppressions internal server error response has a 5xx status code +func (o *CloudRegistrationAzureDeleteSuppressionsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this cloud registration azure delete suppressions internal server error response a status code equal to that given +func (o *CloudRegistrationAzureDeleteSuppressionsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the cloud registration azure delete suppressions internal server error response +func (o *CloudRegistrationAzureDeleteSuppressionsInternalServerError) Code() int { + return 500 +} + +func (o *CloudRegistrationAzureDeleteSuppressionsInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureDeleteSuppressionsInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureDeleteSuppressionsInternalServerError) String() string { + return fmt.Sprintf("[DELETE /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureDeleteSuppressionsInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureDeleteSuppressionsInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureDeleteSuppressionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_suppression_values_by_field_parameters.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_suppression_values_by_field_parameters.go new file mode 100644 index 000000000..8ab4e9365 --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_suppression_values_by_field_parameters.go @@ -0,0 +1,183 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldParams creates a new CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldParams() *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams { + return &CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldParamsWithTimeout creates a new CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams object +// with the ability to set a timeout on a request. +func NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldParamsWithTimeout(timeout time.Duration) *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams { + return &CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams{ + timeout: timeout, + } +} + +// NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldParamsWithContext creates a new CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams object +// with the ability to set a context for a request. +func NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldParamsWithContext(ctx context.Context) *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams { + return &CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams{ + Context: ctx, + } +} + +// NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldParamsWithHTTPClient creates a new CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams object +// with the ability to set a custom HTTPClient for a request. +func NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldParamsWithHTTPClient(client *http.Client) *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams { + return &CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams{ + HTTPClient: client, + } +} + +/* +CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams contains all the parameters to send to the API endpoint + + for the cloud registration azure get issue suppression values by field operation. + + Typically these are written to a http.Request. +*/ +type CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams struct { + + /* Field. + + Field to get values for + */ + Field string + + /* RegistrationID. + + Registration ID to filter values by + */ + RegistrationID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cloud registration azure get issue suppression values by field params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) WithDefaults() *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cloud registration azure get issue suppression values by field params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cloud registration azure get issue suppression values by field params +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) WithTimeout(timeout time.Duration) *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cloud registration azure get issue suppression values by field params +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cloud registration azure get issue suppression values by field params +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) WithContext(ctx context.Context) *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cloud registration azure get issue suppression values by field params +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cloud registration azure get issue suppression values by field params +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) WithHTTPClient(client *http.Client) *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cloud registration azure get issue suppression values by field params +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithField adds the field to the cloud registration azure get issue suppression values by field params +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) WithField(field string) *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams { + o.SetField(field) + return o +} + +// SetField adds the field to the cloud registration azure get issue suppression values by field params +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) SetField(field string) { + o.Field = field +} + +// WithRegistrationID adds the registrationID to the cloud registration azure get issue suppression values by field params +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) WithRegistrationID(registrationID string) *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams { + o.SetRegistrationID(registrationID) + return o +} + +// SetRegistrationID adds the registrationId to the cloud registration azure get issue suppression values by field params +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) SetRegistrationID(registrationID string) { + o.RegistrationID = registrationID +} + +// WriteToRequest writes these params to a swagger request +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param field + qrField := o.Field + qField := qrField + if qField != "" { + + if err := r.SetQueryParam("field", qField); err != nil { + return err + } + } + + // query param registration_id + qrRegistrationID := o.RegistrationID + qRegistrationID := qrRegistrationID + if qRegistrationID != "" { + + if err := r.SetQueryParam("registration_id", qRegistrationID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_suppression_values_by_field_responses.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_suppression_values_by_field_responses.go new file mode 100644 index 000000000..dd676be11 --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_suppression_values_by_field_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CloudRegistrationAzureGetIssueSuppressionValuesByFieldReader is a Reader for the CloudRegistrationAzureGetIssueSuppressionValuesByField structure. +type CloudRegistrationAzureGetIssueSuppressionValuesByFieldReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /cloud-security-registration-azure/aggregates/issue-suppressions-values-by-fields/v1] cloud-registration-azure-get-issue-suppression-values-by-field", response, response.Code()) + } +} + +// NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldOK creates a CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK with default headers values +func NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldOK() *CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK { + return &CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK{} +} + +/* +CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK describes a response with status code 200, with default header values. + +OK +*/ +type CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AzureIssueSuppressionValuesByFieldResponse +} + +// IsSuccess returns true when this cloud registration azure get issue suppression values by field o k response has a 2xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cloud registration azure get issue suppression values by field o k response has a 3xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issue suppression values by field o k response has a 4xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure get issue suppression values by field o k response has a 5xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get issue suppression values by field o k response a status code equal to that given +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cloud registration azure get issue suppression values by field o k response +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK) Code() int { + return 200 +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issue-suppressions-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueSuppressionValuesByFieldOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issue-suppressions-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueSuppressionValuesByFieldOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK) GetPayload() *models.AzureIssueSuppressionValuesByFieldResponse { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AzureIssueSuppressionValuesByFieldResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest creates a CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest with default headers values +func NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest() *CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest { + return &CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest{} +} + +/* +CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get issue suppression values by field bad request response has a 2xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get issue suppression values by field bad request response has a 3xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issue suppression values by field bad request response has a 4xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get issue suppression values by field bad request response has a 5xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get issue suppression values by field bad request response a status code equal to that given +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the cloud registration azure get issue suppression values by field bad request response +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest) Code() int { + return 400 +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issue-suppressions-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issue-suppressions-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden creates a CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden with default headers values +func NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden() *CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden { + return &CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden{} +} + +/* +CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get issue suppression values by field forbidden response has a 2xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get issue suppression values by field forbidden response has a 3xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issue suppression values by field forbidden response has a 4xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get issue suppression values by field forbidden response has a 5xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get issue suppression values by field forbidden response a status code equal to that given +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the cloud registration azure get issue suppression values by field forbidden response +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden) Code() int { + return 403 +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issue-suppressions-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issue-suppressions-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests creates a CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests with default headers values +func NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests() *CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests { + return &CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests{} +} + +/* +CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this cloud registration azure get issue suppression values by field too many requests response has a 2xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get issue suppression values by field too many requests response has a 3xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issue suppression values by field too many requests response has a 4xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get issue suppression values by field too many requests response has a 5xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get issue suppression values by field too many requests response a status code equal to that given +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the cloud registration azure get issue suppression values by field too many requests response +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests) Code() int { + return 429 +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issue-suppressions-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issue-suppressions-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError creates a CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError with default headers values +func NewCloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError() *CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError { + return &CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError{} +} + +/* +CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get issue suppression values by field internal server error response has a 2xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get issue suppression values by field internal server error response has a 3xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issue suppression values by field internal server error response has a 4xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure get issue suppression values by field internal server error response has a 5xx status code +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this cloud registration azure get issue suppression values by field internal server error response a status code equal to that given +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the cloud registration azure get issue suppression values by field internal server error response +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError) Code() int { + return 500 +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issue-suppressions-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issue-suppressions-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssueSuppressionValuesByFieldInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_values_by_field_parameters.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_values_by_field_parameters.go new file mode 100644 index 000000000..f12158032 --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_values_by_field_parameters.go @@ -0,0 +1,217 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewCloudRegistrationAzureGetIssueValuesByFieldParams creates a new CloudRegistrationAzureGetIssueValuesByFieldParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCloudRegistrationAzureGetIssueValuesByFieldParams() *CloudRegistrationAzureGetIssueValuesByFieldParams { + return &CloudRegistrationAzureGetIssueValuesByFieldParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCloudRegistrationAzureGetIssueValuesByFieldParamsWithTimeout creates a new CloudRegistrationAzureGetIssueValuesByFieldParams object +// with the ability to set a timeout on a request. +func NewCloudRegistrationAzureGetIssueValuesByFieldParamsWithTimeout(timeout time.Duration) *CloudRegistrationAzureGetIssueValuesByFieldParams { + return &CloudRegistrationAzureGetIssueValuesByFieldParams{ + timeout: timeout, + } +} + +// NewCloudRegistrationAzureGetIssueValuesByFieldParamsWithContext creates a new CloudRegistrationAzureGetIssueValuesByFieldParams object +// with the ability to set a context for a request. +func NewCloudRegistrationAzureGetIssueValuesByFieldParamsWithContext(ctx context.Context) *CloudRegistrationAzureGetIssueValuesByFieldParams { + return &CloudRegistrationAzureGetIssueValuesByFieldParams{ + Context: ctx, + } +} + +// NewCloudRegistrationAzureGetIssueValuesByFieldParamsWithHTTPClient creates a new CloudRegistrationAzureGetIssueValuesByFieldParams object +// with the ability to set a custom HTTPClient for a request. +func NewCloudRegistrationAzureGetIssueValuesByFieldParamsWithHTTPClient(client *http.Client) *CloudRegistrationAzureGetIssueValuesByFieldParams { + return &CloudRegistrationAzureGetIssueValuesByFieldParams{ + HTTPClient: client, + } +} + +/* +CloudRegistrationAzureGetIssueValuesByFieldParams contains all the parameters to send to the API endpoint + + for the cloud registration azure get issue values by field operation. + + Typically these are written to a http.Request. +*/ +type CloudRegistrationAzureGetIssueValuesByFieldParams struct { + + /* Field. + + Field to get values for + */ + Field string + + /* Filter. + + FQL (Falcon Query Language) string for filtering results. Allowed filters are name,issue,severity,category,impact,entity_type,entity_id,entity_name,status + */ + Filter *string + + /* RegistrationID. + + Registration ID to filter values by + */ + RegistrationID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cloud registration azure get issue values by field params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) WithDefaults() *CloudRegistrationAzureGetIssueValuesByFieldParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cloud registration azure get issue values by field params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cloud registration azure get issue values by field params +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) WithTimeout(timeout time.Duration) *CloudRegistrationAzureGetIssueValuesByFieldParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cloud registration azure get issue values by field params +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cloud registration azure get issue values by field params +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) WithContext(ctx context.Context) *CloudRegistrationAzureGetIssueValuesByFieldParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cloud registration azure get issue values by field params +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cloud registration azure get issue values by field params +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) WithHTTPClient(client *http.Client) *CloudRegistrationAzureGetIssueValuesByFieldParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cloud registration azure get issue values by field params +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithField adds the field to the cloud registration azure get issue values by field params +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) WithField(field string) *CloudRegistrationAzureGetIssueValuesByFieldParams { + o.SetField(field) + return o +} + +// SetField adds the field to the cloud registration azure get issue values by field params +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) SetField(field string) { + o.Field = field +} + +// WithFilter adds the filter to the cloud registration azure get issue values by field params +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) WithFilter(filter *string) *CloudRegistrationAzureGetIssueValuesByFieldParams { + o.SetFilter(filter) + return o +} + +// SetFilter adds the filter to the cloud registration azure get issue values by field params +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) SetFilter(filter *string) { + o.Filter = filter +} + +// WithRegistrationID adds the registrationID to the cloud registration azure get issue values by field params +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) WithRegistrationID(registrationID string) *CloudRegistrationAzureGetIssueValuesByFieldParams { + o.SetRegistrationID(registrationID) + return o +} + +// SetRegistrationID adds the registrationId to the cloud registration azure get issue values by field params +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) SetRegistrationID(registrationID string) { + o.RegistrationID = registrationID +} + +// WriteToRequest writes these params to a swagger request +func (o *CloudRegistrationAzureGetIssueValuesByFieldParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param field + qrField := o.Field + qField := qrField + if qField != "" { + + if err := r.SetQueryParam("field", qField); err != nil { + return err + } + } + + if o.Filter != nil { + + // query param filter + var qrFilter string + + if o.Filter != nil { + qrFilter = *o.Filter + } + qFilter := qrFilter + if qFilter != "" { + + if err := r.SetQueryParam("filter", qFilter); err != nil { + return err + } + } + } + + // query param registration_id + qrRegistrationID := o.RegistrationID + qRegistrationID := qrRegistrationID + if qRegistrationID != "" { + + if err := r.SetQueryParam("registration_id", qRegistrationID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_values_by_field_responses.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_values_by_field_responses.go new file mode 100644 index 000000000..a07c86c4e --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issue_values_by_field_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CloudRegistrationAzureGetIssueValuesByFieldReader is a Reader for the CloudRegistrationAzureGetIssueValuesByField structure. +type CloudRegistrationAzureGetIssueValuesByFieldReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CloudRegistrationAzureGetIssueValuesByFieldReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCloudRegistrationAzureGetIssueValuesByFieldOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCloudRegistrationAzureGetIssueValuesByFieldBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCloudRegistrationAzureGetIssueValuesByFieldForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCloudRegistrationAzureGetIssueValuesByFieldTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCloudRegistrationAzureGetIssueValuesByFieldInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /cloud-security-registration-azure/aggregates/issues-values-by-fields/v1] cloud-registration-azure-get-issue-values-by-field", response, response.Code()) + } +} + +// NewCloudRegistrationAzureGetIssueValuesByFieldOK creates a CloudRegistrationAzureGetIssueValuesByFieldOK with default headers values +func NewCloudRegistrationAzureGetIssueValuesByFieldOK() *CloudRegistrationAzureGetIssueValuesByFieldOK { + return &CloudRegistrationAzureGetIssueValuesByFieldOK{} +} + +/* +CloudRegistrationAzureGetIssueValuesByFieldOK describes a response with status code 200, with default header values. + +OK +*/ +type CloudRegistrationAzureGetIssueValuesByFieldOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AzureIssueValuesByFieldResponse +} + +// IsSuccess returns true when this cloud registration azure get issue values by field o k response has a 2xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cloud registration azure get issue values by field o k response has a 3xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issue values by field o k response has a 4xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure get issue values by field o k response has a 5xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get issue values by field o k response a status code equal to that given +func (o *CloudRegistrationAzureGetIssueValuesByFieldOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cloud registration azure get issue values by field o k response +func (o *CloudRegistrationAzureGetIssueValuesByFieldOK) Code() int { + return 200 +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldOK) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issues-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueValuesByFieldOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldOK) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issues-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueValuesByFieldOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldOK) GetPayload() *models.AzureIssueValuesByFieldResponse { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AzureIssueValuesByFieldResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetIssueValuesByFieldBadRequest creates a CloudRegistrationAzureGetIssueValuesByFieldBadRequest with default headers values +func NewCloudRegistrationAzureGetIssueValuesByFieldBadRequest() *CloudRegistrationAzureGetIssueValuesByFieldBadRequest { + return &CloudRegistrationAzureGetIssueValuesByFieldBadRequest{} +} + +/* +CloudRegistrationAzureGetIssueValuesByFieldBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CloudRegistrationAzureGetIssueValuesByFieldBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get issue values by field bad request response has a 2xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get issue values by field bad request response has a 3xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issue values by field bad request response has a 4xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get issue values by field bad request response has a 5xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get issue values by field bad request response a status code equal to that given +func (o *CloudRegistrationAzureGetIssueValuesByFieldBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the cloud registration azure get issue values by field bad request response +func (o *CloudRegistrationAzureGetIssueValuesByFieldBadRequest) Code() int { + return 400 +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldBadRequest) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issues-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueValuesByFieldBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldBadRequest) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issues-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueValuesByFieldBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetIssueValuesByFieldForbidden creates a CloudRegistrationAzureGetIssueValuesByFieldForbidden with default headers values +func NewCloudRegistrationAzureGetIssueValuesByFieldForbidden() *CloudRegistrationAzureGetIssueValuesByFieldForbidden { + return &CloudRegistrationAzureGetIssueValuesByFieldForbidden{} +} + +/* +CloudRegistrationAzureGetIssueValuesByFieldForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CloudRegistrationAzureGetIssueValuesByFieldForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get issue values by field forbidden response has a 2xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get issue values by field forbidden response has a 3xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issue values by field forbidden response has a 4xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get issue values by field forbidden response has a 5xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get issue values by field forbidden response a status code equal to that given +func (o *CloudRegistrationAzureGetIssueValuesByFieldForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the cloud registration azure get issue values by field forbidden response +func (o *CloudRegistrationAzureGetIssueValuesByFieldForbidden) Code() int { + return 403 +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldForbidden) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issues-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueValuesByFieldForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldForbidden) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issues-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueValuesByFieldForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetIssueValuesByFieldTooManyRequests creates a CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests with default headers values +func NewCloudRegistrationAzureGetIssueValuesByFieldTooManyRequests() *CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests { + return &CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests{} +} + +/* +CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this cloud registration azure get issue values by field too many requests response has a 2xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get issue values by field too many requests response has a 3xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issue values by field too many requests response has a 4xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get issue values by field too many requests response has a 5xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get issue values by field too many requests response a status code equal to that given +func (o *CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the cloud registration azure get issue values by field too many requests response +func (o *CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests) Code() int { + return 429 +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issues-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueValuesByFieldTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issues-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueValuesByFieldTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetIssueValuesByFieldInternalServerError creates a CloudRegistrationAzureGetIssueValuesByFieldInternalServerError with default headers values +func NewCloudRegistrationAzureGetIssueValuesByFieldInternalServerError() *CloudRegistrationAzureGetIssueValuesByFieldInternalServerError { + return &CloudRegistrationAzureGetIssueValuesByFieldInternalServerError{} +} + +/* +CloudRegistrationAzureGetIssueValuesByFieldInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CloudRegistrationAzureGetIssueValuesByFieldInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get issue values by field internal server error response has a 2xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get issue values by field internal server error response has a 3xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issue values by field internal server error response has a 4xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure get issue values by field internal server error response has a 5xx status code +func (o *CloudRegistrationAzureGetIssueValuesByFieldInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this cloud registration azure get issue values by field internal server error response a status code equal to that given +func (o *CloudRegistrationAzureGetIssueValuesByFieldInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the cloud registration azure get issue values by field internal server error response +func (o *CloudRegistrationAzureGetIssueValuesByFieldInternalServerError) Code() int { + return 500 +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldInternalServerError) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issues-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueValuesByFieldInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldInternalServerError) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/aggregates/issues-values-by-fields/v1][%d] cloudRegistrationAzureGetIssueValuesByFieldInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssueValuesByFieldInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issues_parameters.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issues_parameters.go new file mode 100644 index 000000000..9a3f2b8e8 --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issues_parameters.go @@ -0,0 +1,343 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewCloudRegistrationAzureGetIssuesParams creates a new CloudRegistrationAzureGetIssuesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCloudRegistrationAzureGetIssuesParams() *CloudRegistrationAzureGetIssuesParams { + return &CloudRegistrationAzureGetIssuesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCloudRegistrationAzureGetIssuesParamsWithTimeout creates a new CloudRegistrationAzureGetIssuesParams object +// with the ability to set a timeout on a request. +func NewCloudRegistrationAzureGetIssuesParamsWithTimeout(timeout time.Duration) *CloudRegistrationAzureGetIssuesParams { + return &CloudRegistrationAzureGetIssuesParams{ + timeout: timeout, + } +} + +// NewCloudRegistrationAzureGetIssuesParamsWithContext creates a new CloudRegistrationAzureGetIssuesParams object +// with the ability to set a context for a request. +func NewCloudRegistrationAzureGetIssuesParamsWithContext(ctx context.Context) *CloudRegistrationAzureGetIssuesParams { + return &CloudRegistrationAzureGetIssuesParams{ + Context: ctx, + } +} + +// NewCloudRegistrationAzureGetIssuesParamsWithHTTPClient creates a new CloudRegistrationAzureGetIssuesParams object +// with the ability to set a custom HTTPClient for a request. +func NewCloudRegistrationAzureGetIssuesParamsWithHTTPClient(client *http.Client) *CloudRegistrationAzureGetIssuesParams { + return &CloudRegistrationAzureGetIssuesParams{ + HTTPClient: client, + } +} + +/* +CloudRegistrationAzureGetIssuesParams contains all the parameters to send to the API endpoint + + for the cloud registration azure get issues operation. + + Typically these are written to a http.Request. +*/ +type CloudRegistrationAzureGetIssuesParams struct { + + /* Filter. + + FQL (Falcon Query Language) string for filtering results. Allowed filters are name,issue,severity,category,impact,entity_type,entity_id,entity_name,status + */ + Filter *string + + /* GroupBy. + + Grouping method: 'name' (optional, default: ungrouped) + */ + GroupBy *string + + /* Limit. + + Maximum number of records to return (default: 100, max: 1000) + + Default: 100 + */ + Limit *int64 + + /* Offset. + + Starting index of result + */ + Offset *int64 + + /* RegistrationID. + + Registration ID + */ + RegistrationID string + + /* Sort. + + Field and direction for sorting results - allowed sort fields are issue,name,severity,category,impact,entity_type,entity_id,entity_name,impacted_entities + */ + Sort *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cloud registration azure get issues params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureGetIssuesParams) WithDefaults() *CloudRegistrationAzureGetIssuesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cloud registration azure get issues params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureGetIssuesParams) SetDefaults() { + var ( + limitDefault = int64(100) + + offsetDefault = int64(0) + ) + + val := CloudRegistrationAzureGetIssuesParams{ + Limit: &limitDefault, + Offset: &offsetDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) WithTimeout(timeout time.Duration) *CloudRegistrationAzureGetIssuesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) WithContext(ctx context.Context) *CloudRegistrationAzureGetIssuesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) WithHTTPClient(client *http.Client) *CloudRegistrationAzureGetIssuesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilter adds the filter to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) WithFilter(filter *string) *CloudRegistrationAzureGetIssuesParams { + o.SetFilter(filter) + return o +} + +// SetFilter adds the filter to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) SetFilter(filter *string) { + o.Filter = filter +} + +// WithGroupBy adds the groupBy to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) WithGroupBy(groupBy *string) *CloudRegistrationAzureGetIssuesParams { + o.SetGroupBy(groupBy) + return o +} + +// SetGroupBy adds the groupBy to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) SetGroupBy(groupBy *string) { + o.GroupBy = groupBy +} + +// WithLimit adds the limit to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) WithLimit(limit *int64) *CloudRegistrationAzureGetIssuesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) WithOffset(offset *int64) *CloudRegistrationAzureGetIssuesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithRegistrationID adds the registrationID to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) WithRegistrationID(registrationID string) *CloudRegistrationAzureGetIssuesParams { + o.SetRegistrationID(registrationID) + return o +} + +// SetRegistrationID adds the registrationId to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) SetRegistrationID(registrationID string) { + o.RegistrationID = registrationID +} + +// WithSort adds the sort to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) WithSort(sort *string) *CloudRegistrationAzureGetIssuesParams { + o.SetSort(sort) + return o +} + +// SetSort adds the sort to the cloud registration azure get issues params +func (o *CloudRegistrationAzureGetIssuesParams) SetSort(sort *string) { + o.Sort = sort +} + +// WriteToRequest writes these params to a swagger request +func (o *CloudRegistrationAzureGetIssuesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filter != nil { + + // query param filter + var qrFilter string + + if o.Filter != nil { + qrFilter = *o.Filter + } + qFilter := qrFilter + if qFilter != "" { + + if err := r.SetQueryParam("filter", qFilter); err != nil { + return err + } + } + } + + if o.GroupBy != nil { + + // query param group_by + var qrGroupBy string + + if o.GroupBy != nil { + qrGroupBy = *o.GroupBy + } + qGroupBy := qrGroupBy + if qGroupBy != "" { + + if err := r.SetQueryParam("group_by", qGroupBy); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + // query param registration_id + qrRegistrationID := o.RegistrationID + qRegistrationID := qrRegistrationID + if qRegistrationID != "" { + + if err := r.SetQueryParam("registration_id", qRegistrationID); err != nil { + return err + } + } + + if o.Sort != nil { + + // query param sort + var qrSort string + + if o.Sort != nil { + qrSort = *o.Sort + } + qSort := qrSort + if qSort != "" { + + if err := r.SetQueryParam("sort", qSort); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issues_responses.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issues_responses.go new file mode 100644 index 000000000..aff8162cb --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_issues_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CloudRegistrationAzureGetIssuesReader is a Reader for the CloudRegistrationAzureGetIssues structure. +type CloudRegistrationAzureGetIssuesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CloudRegistrationAzureGetIssuesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCloudRegistrationAzureGetIssuesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCloudRegistrationAzureGetIssuesBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCloudRegistrationAzureGetIssuesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCloudRegistrationAzureGetIssuesTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCloudRegistrationAzureGetIssuesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /cloud-security-registration-azure/entities/issues/v1] cloud-registration-azure-get-issues", response, response.Code()) + } +} + +// NewCloudRegistrationAzureGetIssuesOK creates a CloudRegistrationAzureGetIssuesOK with default headers values +func NewCloudRegistrationAzureGetIssuesOK() *CloudRegistrationAzureGetIssuesOK { + return &CloudRegistrationAzureGetIssuesOK{} +} + +/* +CloudRegistrationAzureGetIssuesOK describes a response with status code 200, with default header values. + +OK +*/ +type CloudRegistrationAzureGetIssuesOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AzureIssueResponseExtV1 +} + +// IsSuccess returns true when this cloud registration azure get issues o k response has a 2xx status code +func (o *CloudRegistrationAzureGetIssuesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cloud registration azure get issues o k response has a 3xx status code +func (o *CloudRegistrationAzureGetIssuesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issues o k response has a 4xx status code +func (o *CloudRegistrationAzureGetIssuesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure get issues o k response has a 5xx status code +func (o *CloudRegistrationAzureGetIssuesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get issues o k response a status code equal to that given +func (o *CloudRegistrationAzureGetIssuesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cloud registration azure get issues o k response +func (o *CloudRegistrationAzureGetIssuesOK) Code() int { + return 200 +} + +func (o *CloudRegistrationAzureGetIssuesOK) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issues/v1][%d] cloudRegistrationAzureGetIssuesOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssuesOK) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issues/v1][%d] cloudRegistrationAzureGetIssuesOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssuesOK) GetPayload() *models.AzureIssueResponseExtV1 { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssuesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AzureIssueResponseExtV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetIssuesBadRequest creates a CloudRegistrationAzureGetIssuesBadRequest with default headers values +func NewCloudRegistrationAzureGetIssuesBadRequest() *CloudRegistrationAzureGetIssuesBadRequest { + return &CloudRegistrationAzureGetIssuesBadRequest{} +} + +/* +CloudRegistrationAzureGetIssuesBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CloudRegistrationAzureGetIssuesBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get issues bad request response has a 2xx status code +func (o *CloudRegistrationAzureGetIssuesBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get issues bad request response has a 3xx status code +func (o *CloudRegistrationAzureGetIssuesBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issues bad request response has a 4xx status code +func (o *CloudRegistrationAzureGetIssuesBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get issues bad request response has a 5xx status code +func (o *CloudRegistrationAzureGetIssuesBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get issues bad request response a status code equal to that given +func (o *CloudRegistrationAzureGetIssuesBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the cloud registration azure get issues bad request response +func (o *CloudRegistrationAzureGetIssuesBadRequest) Code() int { + return 400 +} + +func (o *CloudRegistrationAzureGetIssuesBadRequest) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issues/v1][%d] cloudRegistrationAzureGetIssuesBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssuesBadRequest) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issues/v1][%d] cloudRegistrationAzureGetIssuesBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssuesBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssuesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetIssuesForbidden creates a CloudRegistrationAzureGetIssuesForbidden with default headers values +func NewCloudRegistrationAzureGetIssuesForbidden() *CloudRegistrationAzureGetIssuesForbidden { + return &CloudRegistrationAzureGetIssuesForbidden{} +} + +/* +CloudRegistrationAzureGetIssuesForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CloudRegistrationAzureGetIssuesForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get issues forbidden response has a 2xx status code +func (o *CloudRegistrationAzureGetIssuesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get issues forbidden response has a 3xx status code +func (o *CloudRegistrationAzureGetIssuesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issues forbidden response has a 4xx status code +func (o *CloudRegistrationAzureGetIssuesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get issues forbidden response has a 5xx status code +func (o *CloudRegistrationAzureGetIssuesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get issues forbidden response a status code equal to that given +func (o *CloudRegistrationAzureGetIssuesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the cloud registration azure get issues forbidden response +func (o *CloudRegistrationAzureGetIssuesForbidden) Code() int { + return 403 +} + +func (o *CloudRegistrationAzureGetIssuesForbidden) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issues/v1][%d] cloudRegistrationAzureGetIssuesForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssuesForbidden) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issues/v1][%d] cloudRegistrationAzureGetIssuesForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssuesForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssuesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetIssuesTooManyRequests creates a CloudRegistrationAzureGetIssuesTooManyRequests with default headers values +func NewCloudRegistrationAzureGetIssuesTooManyRequests() *CloudRegistrationAzureGetIssuesTooManyRequests { + return &CloudRegistrationAzureGetIssuesTooManyRequests{} +} + +/* +CloudRegistrationAzureGetIssuesTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CloudRegistrationAzureGetIssuesTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this cloud registration azure get issues too many requests response has a 2xx status code +func (o *CloudRegistrationAzureGetIssuesTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get issues too many requests response has a 3xx status code +func (o *CloudRegistrationAzureGetIssuesTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issues too many requests response has a 4xx status code +func (o *CloudRegistrationAzureGetIssuesTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get issues too many requests response has a 5xx status code +func (o *CloudRegistrationAzureGetIssuesTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get issues too many requests response a status code equal to that given +func (o *CloudRegistrationAzureGetIssuesTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the cloud registration azure get issues too many requests response +func (o *CloudRegistrationAzureGetIssuesTooManyRequests) Code() int { + return 429 +} + +func (o *CloudRegistrationAzureGetIssuesTooManyRequests) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issues/v1][%d] cloudRegistrationAzureGetIssuesTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssuesTooManyRequests) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issues/v1][%d] cloudRegistrationAzureGetIssuesTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssuesTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssuesTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetIssuesInternalServerError creates a CloudRegistrationAzureGetIssuesInternalServerError with default headers values +func NewCloudRegistrationAzureGetIssuesInternalServerError() *CloudRegistrationAzureGetIssuesInternalServerError { + return &CloudRegistrationAzureGetIssuesInternalServerError{} +} + +/* +CloudRegistrationAzureGetIssuesInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CloudRegistrationAzureGetIssuesInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get issues internal server error response has a 2xx status code +func (o *CloudRegistrationAzureGetIssuesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get issues internal server error response has a 3xx status code +func (o *CloudRegistrationAzureGetIssuesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get issues internal server error response has a 4xx status code +func (o *CloudRegistrationAzureGetIssuesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure get issues internal server error response has a 5xx status code +func (o *CloudRegistrationAzureGetIssuesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this cloud registration azure get issues internal server error response a status code equal to that given +func (o *CloudRegistrationAzureGetIssuesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the cloud registration azure get issues internal server error response +func (o *CloudRegistrationAzureGetIssuesInternalServerError) Code() int { + return 500 +} + +func (o *CloudRegistrationAzureGetIssuesInternalServerError) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issues/v1][%d] cloudRegistrationAzureGetIssuesInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssuesInternalServerError) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issues/v1][%d] cloudRegistrationAzureGetIssuesInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureGetIssuesInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetIssuesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_get_registration_parameters.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_registration_parameters.go index 87356cb40..0e60c6444 100644 --- a/falcon/client/cloud_azure_registration/cloud_registration_azure_get_registration_parameters.go +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_registration_parameters.go @@ -61,11 +61,17 @@ CloudRegistrationAzureGetRegistrationParams contains all the parameters to send */ type CloudRegistrationAzureGetRegistrationParams struct { + /* RegistrationID. + + Registration ID + */ + RegistrationID *string + /* TenantID. Tenant ID */ - TenantID string + TenantID *string timeout time.Duration Context context.Context @@ -120,14 +126,25 @@ func (o *CloudRegistrationAzureGetRegistrationParams) SetHTTPClient(client *http o.HTTPClient = client } +// WithRegistrationID adds the registrationID to the cloud registration azure get registration params +func (o *CloudRegistrationAzureGetRegistrationParams) WithRegistrationID(registrationID *string) *CloudRegistrationAzureGetRegistrationParams { + o.SetRegistrationID(registrationID) + return o +} + +// SetRegistrationID adds the registrationId to the cloud registration azure get registration params +func (o *CloudRegistrationAzureGetRegistrationParams) SetRegistrationID(registrationID *string) { + o.RegistrationID = registrationID +} + // WithTenantID adds the tenantID to the cloud registration azure get registration params -func (o *CloudRegistrationAzureGetRegistrationParams) WithTenantID(tenantID string) *CloudRegistrationAzureGetRegistrationParams { +func (o *CloudRegistrationAzureGetRegistrationParams) WithTenantID(tenantID *string) *CloudRegistrationAzureGetRegistrationParams { o.SetTenantID(tenantID) return o } // SetTenantID adds the tenantId to the cloud registration azure get registration params -func (o *CloudRegistrationAzureGetRegistrationParams) SetTenantID(tenantID string) { +func (o *CloudRegistrationAzureGetRegistrationParams) SetTenantID(tenantID *string) { o.TenantID = tenantID } @@ -139,13 +156,37 @@ func (o *CloudRegistrationAzureGetRegistrationParams) WriteToRequest(r runtime.C } var res []error - // query param tenant_id - qrTenantID := o.TenantID - qTenantID := qrTenantID - if qTenantID != "" { + if o.RegistrationID != nil { + + // query param registration_id + var qrRegistrationID string + + if o.RegistrationID != nil { + qrRegistrationID = *o.RegistrationID + } + qRegistrationID := qrRegistrationID + if qRegistrationID != "" { + + if err := r.SetQueryParam("registration_id", qRegistrationID); err != nil { + return err + } + } + } + + if o.TenantID != nil { + + // query param tenant_id + var qrTenantID string + + if o.TenantID != nil { + qrTenantID = *o.TenantID + } + qTenantID := qrTenantID + if qTenantID != "" { - if err := r.SetQueryParam("tenant_id", qTenantID); err != nil { - return err + if err := r.SetQueryParam("tenant_id", qTenantID); err != nil { + return err + } } } diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_get_script_versions_parameters.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_script_versions_parameters.go new file mode 100644 index 000000000..20384ba7c --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_script_versions_parameters.go @@ -0,0 +1,275 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewCloudRegistrationAzureGetScriptVersionsParams creates a new CloudRegistrationAzureGetScriptVersionsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCloudRegistrationAzureGetScriptVersionsParams() *CloudRegistrationAzureGetScriptVersionsParams { + return &CloudRegistrationAzureGetScriptVersionsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCloudRegistrationAzureGetScriptVersionsParamsWithTimeout creates a new CloudRegistrationAzureGetScriptVersionsParams object +// with the ability to set a timeout on a request. +func NewCloudRegistrationAzureGetScriptVersionsParamsWithTimeout(timeout time.Duration) *CloudRegistrationAzureGetScriptVersionsParams { + return &CloudRegistrationAzureGetScriptVersionsParams{ + timeout: timeout, + } +} + +// NewCloudRegistrationAzureGetScriptVersionsParamsWithContext creates a new CloudRegistrationAzureGetScriptVersionsParams object +// with the ability to set a context for a request. +func NewCloudRegistrationAzureGetScriptVersionsParamsWithContext(ctx context.Context) *CloudRegistrationAzureGetScriptVersionsParams { + return &CloudRegistrationAzureGetScriptVersionsParams{ + Context: ctx, + } +} + +// NewCloudRegistrationAzureGetScriptVersionsParamsWithHTTPClient creates a new CloudRegistrationAzureGetScriptVersionsParams object +// with the ability to set a custom HTTPClient for a request. +func NewCloudRegistrationAzureGetScriptVersionsParamsWithHTTPClient(client *http.Client) *CloudRegistrationAzureGetScriptVersionsParams { + return &CloudRegistrationAzureGetScriptVersionsParams{ + HTTPClient: client, + } +} + +/* +CloudRegistrationAzureGetScriptVersionsParams contains all the parameters to send to the API endpoint + + for the cloud registration azure get script versions operation. + + Typically these are written to a http.Request. +*/ +type CloudRegistrationAzureGetScriptVersionsParams struct { + + /* DeploymentMethod. + + Filter by deployment method (e.g., 'bicep-legacy', 'bicep-deployment-stack') + */ + DeploymentMethod string + + /* Limit. + + Maximum number of records to return (default: 100, max: 1000) + + Default: 100 + */ + Limit *int64 + + /* Offset. + + Starting index of result + */ + Offset *int64 + + /* Sort. + + Field and direction for sorting results - allowed sort fields are version,deployment_method,published_date + */ + Sort *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cloud registration azure get script versions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureGetScriptVersionsParams) WithDefaults() *CloudRegistrationAzureGetScriptVersionsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cloud registration azure get script versions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureGetScriptVersionsParams) SetDefaults() { + var ( + limitDefault = int64(100) + + offsetDefault = int64(0) + ) + + val := CloudRegistrationAzureGetScriptVersionsParams{ + Limit: &limitDefault, + Offset: &offsetDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) WithTimeout(timeout time.Duration) *CloudRegistrationAzureGetScriptVersionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) WithContext(ctx context.Context) *CloudRegistrationAzureGetScriptVersionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) WithHTTPClient(client *http.Client) *CloudRegistrationAzureGetScriptVersionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDeploymentMethod adds the deploymentMethod to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) WithDeploymentMethod(deploymentMethod string) *CloudRegistrationAzureGetScriptVersionsParams { + o.SetDeploymentMethod(deploymentMethod) + return o +} + +// SetDeploymentMethod adds the deploymentMethod to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) SetDeploymentMethod(deploymentMethod string) { + o.DeploymentMethod = deploymentMethod +} + +// WithLimit adds the limit to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) WithLimit(limit *int64) *CloudRegistrationAzureGetScriptVersionsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) WithOffset(offset *int64) *CloudRegistrationAzureGetScriptVersionsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithSort adds the sort to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) WithSort(sort *string) *CloudRegistrationAzureGetScriptVersionsParams { + o.SetSort(sort) + return o +} + +// SetSort adds the sort to the cloud registration azure get script versions params +func (o *CloudRegistrationAzureGetScriptVersionsParams) SetSort(sort *string) { + o.Sort = sort +} + +// WriteToRequest writes these params to a swagger request +func (o *CloudRegistrationAzureGetScriptVersionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param deployment_method + qrDeploymentMethod := o.DeploymentMethod + qDeploymentMethod := qrDeploymentMethod + if qDeploymentMethod != "" { + + if err := r.SetQueryParam("deployment_method", qDeploymentMethod); err != nil { + return err + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Sort != nil { + + // query param sort + var qrSort string + + if o.Sort != nil { + qrSort = *o.Sort + } + qSort := qrSort + if qSort != "" { + + if err := r.SetQueryParam("sort", qSort); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_get_script_versions_responses.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_script_versions_responses.go new file mode 100644 index 000000000..254146d79 --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_script_versions_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CloudRegistrationAzureGetScriptVersionsReader is a Reader for the CloudRegistrationAzureGetScriptVersions structure. +type CloudRegistrationAzureGetScriptVersionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CloudRegistrationAzureGetScriptVersionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCloudRegistrationAzureGetScriptVersionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCloudRegistrationAzureGetScriptVersionsBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCloudRegistrationAzureGetScriptVersionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCloudRegistrationAzureGetScriptVersionsTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCloudRegistrationAzureGetScriptVersionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /cloud-security-registration-azure/entities/script-versions/v1] cloud-registration-azure-get-script-versions", response, response.Code()) + } +} + +// NewCloudRegistrationAzureGetScriptVersionsOK creates a CloudRegistrationAzureGetScriptVersionsOK with default headers values +func NewCloudRegistrationAzureGetScriptVersionsOK() *CloudRegistrationAzureGetScriptVersionsOK { + return &CloudRegistrationAzureGetScriptVersionsOK{} +} + +/* +CloudRegistrationAzureGetScriptVersionsOK describes a response with status code 200, with default header values. + +OK +*/ +type CloudRegistrationAzureGetScriptVersionsOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AzureScriptVersionResponseExtV1 +} + +// IsSuccess returns true when this cloud registration azure get script versions o k response has a 2xx status code +func (o *CloudRegistrationAzureGetScriptVersionsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cloud registration azure get script versions o k response has a 3xx status code +func (o *CloudRegistrationAzureGetScriptVersionsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get script versions o k response has a 4xx status code +func (o *CloudRegistrationAzureGetScriptVersionsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure get script versions o k response has a 5xx status code +func (o *CloudRegistrationAzureGetScriptVersionsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get script versions o k response a status code equal to that given +func (o *CloudRegistrationAzureGetScriptVersionsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cloud registration azure get script versions o k response +func (o *CloudRegistrationAzureGetScriptVersionsOK) Code() int { + return 200 +} + +func (o *CloudRegistrationAzureGetScriptVersionsOK) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/script-versions/v1][%d] cloudRegistrationAzureGetScriptVersionsOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationAzureGetScriptVersionsOK) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/script-versions/v1][%d] cloudRegistrationAzureGetScriptVersionsOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationAzureGetScriptVersionsOK) GetPayload() *models.AzureScriptVersionResponseExtV1 { + return o.Payload +} + +func (o *CloudRegistrationAzureGetScriptVersionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AzureScriptVersionResponseExtV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetScriptVersionsBadRequest creates a CloudRegistrationAzureGetScriptVersionsBadRequest with default headers values +func NewCloudRegistrationAzureGetScriptVersionsBadRequest() *CloudRegistrationAzureGetScriptVersionsBadRequest { + return &CloudRegistrationAzureGetScriptVersionsBadRequest{} +} + +/* +CloudRegistrationAzureGetScriptVersionsBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CloudRegistrationAzureGetScriptVersionsBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get script versions bad request response has a 2xx status code +func (o *CloudRegistrationAzureGetScriptVersionsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get script versions bad request response has a 3xx status code +func (o *CloudRegistrationAzureGetScriptVersionsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get script versions bad request response has a 4xx status code +func (o *CloudRegistrationAzureGetScriptVersionsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get script versions bad request response has a 5xx status code +func (o *CloudRegistrationAzureGetScriptVersionsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get script versions bad request response a status code equal to that given +func (o *CloudRegistrationAzureGetScriptVersionsBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the cloud registration azure get script versions bad request response +func (o *CloudRegistrationAzureGetScriptVersionsBadRequest) Code() int { + return 400 +} + +func (o *CloudRegistrationAzureGetScriptVersionsBadRequest) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/script-versions/v1][%d] cloudRegistrationAzureGetScriptVersionsBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureGetScriptVersionsBadRequest) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/script-versions/v1][%d] cloudRegistrationAzureGetScriptVersionsBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureGetScriptVersionsBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetScriptVersionsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetScriptVersionsForbidden creates a CloudRegistrationAzureGetScriptVersionsForbidden with default headers values +func NewCloudRegistrationAzureGetScriptVersionsForbidden() *CloudRegistrationAzureGetScriptVersionsForbidden { + return &CloudRegistrationAzureGetScriptVersionsForbidden{} +} + +/* +CloudRegistrationAzureGetScriptVersionsForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CloudRegistrationAzureGetScriptVersionsForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get script versions forbidden response has a 2xx status code +func (o *CloudRegistrationAzureGetScriptVersionsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get script versions forbidden response has a 3xx status code +func (o *CloudRegistrationAzureGetScriptVersionsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get script versions forbidden response has a 4xx status code +func (o *CloudRegistrationAzureGetScriptVersionsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get script versions forbidden response has a 5xx status code +func (o *CloudRegistrationAzureGetScriptVersionsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get script versions forbidden response a status code equal to that given +func (o *CloudRegistrationAzureGetScriptVersionsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the cloud registration azure get script versions forbidden response +func (o *CloudRegistrationAzureGetScriptVersionsForbidden) Code() int { + return 403 +} + +func (o *CloudRegistrationAzureGetScriptVersionsForbidden) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/script-versions/v1][%d] cloudRegistrationAzureGetScriptVersionsForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureGetScriptVersionsForbidden) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/script-versions/v1][%d] cloudRegistrationAzureGetScriptVersionsForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureGetScriptVersionsForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetScriptVersionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetScriptVersionsTooManyRequests creates a CloudRegistrationAzureGetScriptVersionsTooManyRequests with default headers values +func NewCloudRegistrationAzureGetScriptVersionsTooManyRequests() *CloudRegistrationAzureGetScriptVersionsTooManyRequests { + return &CloudRegistrationAzureGetScriptVersionsTooManyRequests{} +} + +/* +CloudRegistrationAzureGetScriptVersionsTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CloudRegistrationAzureGetScriptVersionsTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this cloud registration azure get script versions too many requests response has a 2xx status code +func (o *CloudRegistrationAzureGetScriptVersionsTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get script versions too many requests response has a 3xx status code +func (o *CloudRegistrationAzureGetScriptVersionsTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get script versions too many requests response has a 4xx status code +func (o *CloudRegistrationAzureGetScriptVersionsTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get script versions too many requests response has a 5xx status code +func (o *CloudRegistrationAzureGetScriptVersionsTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get script versions too many requests response a status code equal to that given +func (o *CloudRegistrationAzureGetScriptVersionsTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the cloud registration azure get script versions too many requests response +func (o *CloudRegistrationAzureGetScriptVersionsTooManyRequests) Code() int { + return 429 +} + +func (o *CloudRegistrationAzureGetScriptVersionsTooManyRequests) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/script-versions/v1][%d] cloudRegistrationAzureGetScriptVersionsTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureGetScriptVersionsTooManyRequests) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/script-versions/v1][%d] cloudRegistrationAzureGetScriptVersionsTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureGetScriptVersionsTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CloudRegistrationAzureGetScriptVersionsTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetScriptVersionsInternalServerError creates a CloudRegistrationAzureGetScriptVersionsInternalServerError with default headers values +func NewCloudRegistrationAzureGetScriptVersionsInternalServerError() *CloudRegistrationAzureGetScriptVersionsInternalServerError { + return &CloudRegistrationAzureGetScriptVersionsInternalServerError{} +} + +/* +CloudRegistrationAzureGetScriptVersionsInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CloudRegistrationAzureGetScriptVersionsInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get script versions internal server error response has a 2xx status code +func (o *CloudRegistrationAzureGetScriptVersionsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get script versions internal server error response has a 3xx status code +func (o *CloudRegistrationAzureGetScriptVersionsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get script versions internal server error response has a 4xx status code +func (o *CloudRegistrationAzureGetScriptVersionsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure get script versions internal server error response has a 5xx status code +func (o *CloudRegistrationAzureGetScriptVersionsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this cloud registration azure get script versions internal server error response a status code equal to that given +func (o *CloudRegistrationAzureGetScriptVersionsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the cloud registration azure get script versions internal server error response +func (o *CloudRegistrationAzureGetScriptVersionsInternalServerError) Code() int { + return 500 +} + +func (o *CloudRegistrationAzureGetScriptVersionsInternalServerError) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/script-versions/v1][%d] cloudRegistrationAzureGetScriptVersionsInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureGetScriptVersionsInternalServerError) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/script-versions/v1][%d] cloudRegistrationAzureGetScriptVersionsInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureGetScriptVersionsInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetScriptVersionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_get_suppressions_parameters.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_suppressions_parameters.go new file mode 100644 index 000000000..60cd6986e --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_suppressions_parameters.go @@ -0,0 +1,309 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewCloudRegistrationAzureGetSuppressionsParams creates a new CloudRegistrationAzureGetSuppressionsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCloudRegistrationAzureGetSuppressionsParams() *CloudRegistrationAzureGetSuppressionsParams { + return &CloudRegistrationAzureGetSuppressionsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCloudRegistrationAzureGetSuppressionsParamsWithTimeout creates a new CloudRegistrationAzureGetSuppressionsParams object +// with the ability to set a timeout on a request. +func NewCloudRegistrationAzureGetSuppressionsParamsWithTimeout(timeout time.Duration) *CloudRegistrationAzureGetSuppressionsParams { + return &CloudRegistrationAzureGetSuppressionsParams{ + timeout: timeout, + } +} + +// NewCloudRegistrationAzureGetSuppressionsParamsWithContext creates a new CloudRegistrationAzureGetSuppressionsParams object +// with the ability to set a context for a request. +func NewCloudRegistrationAzureGetSuppressionsParamsWithContext(ctx context.Context) *CloudRegistrationAzureGetSuppressionsParams { + return &CloudRegistrationAzureGetSuppressionsParams{ + Context: ctx, + } +} + +// NewCloudRegistrationAzureGetSuppressionsParamsWithHTTPClient creates a new CloudRegistrationAzureGetSuppressionsParams object +// with the ability to set a custom HTTPClient for a request. +func NewCloudRegistrationAzureGetSuppressionsParamsWithHTTPClient(client *http.Client) *CloudRegistrationAzureGetSuppressionsParams { + return &CloudRegistrationAzureGetSuppressionsParams{ + HTTPClient: client, + } +} + +/* +CloudRegistrationAzureGetSuppressionsParams contains all the parameters to send to the API endpoint + + for the cloud registration azure get suppressions operation. + + Typically these are written to a http.Request. +*/ +type CloudRegistrationAzureGetSuppressionsParams struct { + + /* Filter. + + FQL (Falcon Query Language) string for filtering results. Allowed filters are issue_name,entity_id,suppressed_by,created_at,reason + */ + Filter *string + + /* Limit. + + Maximum number of records to return (default: 100, max: 1000) + + Default: 100 + */ + Limit *int64 + + /* Offset. + + Starting index of result + */ + Offset *int64 + + /* RegistrationID. + + Registration ID + */ + RegistrationID string + + /* Sort. + + Field and direction for sorting results - allowed sort fields are issue_name,entity_id,suppressed_by,created_at,reason + */ + Sort *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cloud registration azure get suppressions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureGetSuppressionsParams) WithDefaults() *CloudRegistrationAzureGetSuppressionsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cloud registration azure get suppressions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureGetSuppressionsParams) SetDefaults() { + var ( + limitDefault = int64(100) + + offsetDefault = int64(0) + ) + + val := CloudRegistrationAzureGetSuppressionsParams{ + Limit: &limitDefault, + Offset: &offsetDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) WithTimeout(timeout time.Duration) *CloudRegistrationAzureGetSuppressionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) WithContext(ctx context.Context) *CloudRegistrationAzureGetSuppressionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) WithHTTPClient(client *http.Client) *CloudRegistrationAzureGetSuppressionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilter adds the filter to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) WithFilter(filter *string) *CloudRegistrationAzureGetSuppressionsParams { + o.SetFilter(filter) + return o +} + +// SetFilter adds the filter to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) SetFilter(filter *string) { + o.Filter = filter +} + +// WithLimit adds the limit to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) WithLimit(limit *int64) *CloudRegistrationAzureGetSuppressionsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) WithOffset(offset *int64) *CloudRegistrationAzureGetSuppressionsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithRegistrationID adds the registrationID to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) WithRegistrationID(registrationID string) *CloudRegistrationAzureGetSuppressionsParams { + o.SetRegistrationID(registrationID) + return o +} + +// SetRegistrationID adds the registrationId to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) SetRegistrationID(registrationID string) { + o.RegistrationID = registrationID +} + +// WithSort adds the sort to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) WithSort(sort *string) *CloudRegistrationAzureGetSuppressionsParams { + o.SetSort(sort) + return o +} + +// SetSort adds the sort to the cloud registration azure get suppressions params +func (o *CloudRegistrationAzureGetSuppressionsParams) SetSort(sort *string) { + o.Sort = sort +} + +// WriteToRequest writes these params to a swagger request +func (o *CloudRegistrationAzureGetSuppressionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filter != nil { + + // query param filter + var qrFilter string + + if o.Filter != nil { + qrFilter = *o.Filter + } + qFilter := qrFilter + if qFilter != "" { + + if err := r.SetQueryParam("filter", qFilter); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + // query param registration_id + qrRegistrationID := o.RegistrationID + qRegistrationID := qrRegistrationID + if qRegistrationID != "" { + + if err := r.SetQueryParam("registration_id", qRegistrationID); err != nil { + return err + } + } + + if o.Sort != nil { + + // query param sort + var qrSort string + + if o.Sort != nil { + qrSort = *o.Sort + } + qSort := qrSort + if qSort != "" { + + if err := r.SetQueryParam("sort", qSort); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_get_suppressions_responses.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_suppressions_responses.go new file mode 100644 index 000000000..b6fc75fac --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_get_suppressions_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CloudRegistrationAzureGetSuppressionsReader is a Reader for the CloudRegistrationAzureGetSuppressions structure. +type CloudRegistrationAzureGetSuppressionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CloudRegistrationAzureGetSuppressionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCloudRegistrationAzureGetSuppressionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCloudRegistrationAzureGetSuppressionsBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCloudRegistrationAzureGetSuppressionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCloudRegistrationAzureGetSuppressionsTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCloudRegistrationAzureGetSuppressionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /cloud-security-registration-azure/entities/issue-suppressions/v1] cloud-registration-azure-get-suppressions", response, response.Code()) + } +} + +// NewCloudRegistrationAzureGetSuppressionsOK creates a CloudRegistrationAzureGetSuppressionsOK with default headers values +func NewCloudRegistrationAzureGetSuppressionsOK() *CloudRegistrationAzureGetSuppressionsOK { + return &CloudRegistrationAzureGetSuppressionsOK{} +} + +/* +CloudRegistrationAzureGetSuppressionsOK describes a response with status code 200, with default header values. + +OK +*/ +type CloudRegistrationAzureGetSuppressionsOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AzureSuppressionResponseExtV1 +} + +// IsSuccess returns true when this cloud registration azure get suppressions o k response has a 2xx status code +func (o *CloudRegistrationAzureGetSuppressionsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cloud registration azure get suppressions o k response has a 3xx status code +func (o *CloudRegistrationAzureGetSuppressionsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get suppressions o k response has a 4xx status code +func (o *CloudRegistrationAzureGetSuppressionsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure get suppressions o k response has a 5xx status code +func (o *CloudRegistrationAzureGetSuppressionsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get suppressions o k response a status code equal to that given +func (o *CloudRegistrationAzureGetSuppressionsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cloud registration azure get suppressions o k response +func (o *CloudRegistrationAzureGetSuppressionsOK) Code() int { + return 200 +} + +func (o *CloudRegistrationAzureGetSuppressionsOK) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureGetSuppressionsOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationAzureGetSuppressionsOK) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureGetSuppressionsOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationAzureGetSuppressionsOK) GetPayload() *models.AzureSuppressionResponseExtV1 { + return o.Payload +} + +func (o *CloudRegistrationAzureGetSuppressionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AzureSuppressionResponseExtV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetSuppressionsBadRequest creates a CloudRegistrationAzureGetSuppressionsBadRequest with default headers values +func NewCloudRegistrationAzureGetSuppressionsBadRequest() *CloudRegistrationAzureGetSuppressionsBadRequest { + return &CloudRegistrationAzureGetSuppressionsBadRequest{} +} + +/* +CloudRegistrationAzureGetSuppressionsBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CloudRegistrationAzureGetSuppressionsBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get suppressions bad request response has a 2xx status code +func (o *CloudRegistrationAzureGetSuppressionsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get suppressions bad request response has a 3xx status code +func (o *CloudRegistrationAzureGetSuppressionsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get suppressions bad request response has a 4xx status code +func (o *CloudRegistrationAzureGetSuppressionsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get suppressions bad request response has a 5xx status code +func (o *CloudRegistrationAzureGetSuppressionsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get suppressions bad request response a status code equal to that given +func (o *CloudRegistrationAzureGetSuppressionsBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the cloud registration azure get suppressions bad request response +func (o *CloudRegistrationAzureGetSuppressionsBadRequest) Code() int { + return 400 +} + +func (o *CloudRegistrationAzureGetSuppressionsBadRequest) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureGetSuppressionsBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureGetSuppressionsBadRequest) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureGetSuppressionsBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureGetSuppressionsBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetSuppressionsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetSuppressionsForbidden creates a CloudRegistrationAzureGetSuppressionsForbidden with default headers values +func NewCloudRegistrationAzureGetSuppressionsForbidden() *CloudRegistrationAzureGetSuppressionsForbidden { + return &CloudRegistrationAzureGetSuppressionsForbidden{} +} + +/* +CloudRegistrationAzureGetSuppressionsForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CloudRegistrationAzureGetSuppressionsForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get suppressions forbidden response has a 2xx status code +func (o *CloudRegistrationAzureGetSuppressionsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get suppressions forbidden response has a 3xx status code +func (o *CloudRegistrationAzureGetSuppressionsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get suppressions forbidden response has a 4xx status code +func (o *CloudRegistrationAzureGetSuppressionsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get suppressions forbidden response has a 5xx status code +func (o *CloudRegistrationAzureGetSuppressionsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get suppressions forbidden response a status code equal to that given +func (o *CloudRegistrationAzureGetSuppressionsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the cloud registration azure get suppressions forbidden response +func (o *CloudRegistrationAzureGetSuppressionsForbidden) Code() int { + return 403 +} + +func (o *CloudRegistrationAzureGetSuppressionsForbidden) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureGetSuppressionsForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureGetSuppressionsForbidden) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureGetSuppressionsForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureGetSuppressionsForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetSuppressionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetSuppressionsTooManyRequests creates a CloudRegistrationAzureGetSuppressionsTooManyRequests with default headers values +func NewCloudRegistrationAzureGetSuppressionsTooManyRequests() *CloudRegistrationAzureGetSuppressionsTooManyRequests { + return &CloudRegistrationAzureGetSuppressionsTooManyRequests{} +} + +/* +CloudRegistrationAzureGetSuppressionsTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CloudRegistrationAzureGetSuppressionsTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this cloud registration azure get suppressions too many requests response has a 2xx status code +func (o *CloudRegistrationAzureGetSuppressionsTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get suppressions too many requests response has a 3xx status code +func (o *CloudRegistrationAzureGetSuppressionsTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get suppressions too many requests response has a 4xx status code +func (o *CloudRegistrationAzureGetSuppressionsTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure get suppressions too many requests response has a 5xx status code +func (o *CloudRegistrationAzureGetSuppressionsTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure get suppressions too many requests response a status code equal to that given +func (o *CloudRegistrationAzureGetSuppressionsTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the cloud registration azure get suppressions too many requests response +func (o *CloudRegistrationAzureGetSuppressionsTooManyRequests) Code() int { + return 429 +} + +func (o *CloudRegistrationAzureGetSuppressionsTooManyRequests) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureGetSuppressionsTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureGetSuppressionsTooManyRequests) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureGetSuppressionsTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureGetSuppressionsTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CloudRegistrationAzureGetSuppressionsTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureGetSuppressionsInternalServerError creates a CloudRegistrationAzureGetSuppressionsInternalServerError with default headers values +func NewCloudRegistrationAzureGetSuppressionsInternalServerError() *CloudRegistrationAzureGetSuppressionsInternalServerError { + return &CloudRegistrationAzureGetSuppressionsInternalServerError{} +} + +/* +CloudRegistrationAzureGetSuppressionsInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CloudRegistrationAzureGetSuppressionsInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure get suppressions internal server error response has a 2xx status code +func (o *CloudRegistrationAzureGetSuppressionsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure get suppressions internal server error response has a 3xx status code +func (o *CloudRegistrationAzureGetSuppressionsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure get suppressions internal server error response has a 4xx status code +func (o *CloudRegistrationAzureGetSuppressionsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure get suppressions internal server error response has a 5xx status code +func (o *CloudRegistrationAzureGetSuppressionsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this cloud registration azure get suppressions internal server error response a status code equal to that given +func (o *CloudRegistrationAzureGetSuppressionsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the cloud registration azure get suppressions internal server error response +func (o *CloudRegistrationAzureGetSuppressionsInternalServerError) Code() int { + return 500 +} + +func (o *CloudRegistrationAzureGetSuppressionsInternalServerError) Error() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureGetSuppressionsInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureGetSuppressionsInternalServerError) String() string { + return fmt.Sprintf("[GET /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureGetSuppressionsInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureGetSuppressionsInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureGetSuppressionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_update_suppressions_parameters.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_update_suppressions_parameters.go new file mode 100644 index 000000000..85f2e9475 --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_update_suppressions_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewCloudRegistrationAzureUpdateSuppressionsParams creates a new CloudRegistrationAzureUpdateSuppressionsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCloudRegistrationAzureUpdateSuppressionsParams() *CloudRegistrationAzureUpdateSuppressionsParams { + return &CloudRegistrationAzureUpdateSuppressionsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCloudRegistrationAzureUpdateSuppressionsParamsWithTimeout creates a new CloudRegistrationAzureUpdateSuppressionsParams object +// with the ability to set a timeout on a request. +func NewCloudRegistrationAzureUpdateSuppressionsParamsWithTimeout(timeout time.Duration) *CloudRegistrationAzureUpdateSuppressionsParams { + return &CloudRegistrationAzureUpdateSuppressionsParams{ + timeout: timeout, + } +} + +// NewCloudRegistrationAzureUpdateSuppressionsParamsWithContext creates a new CloudRegistrationAzureUpdateSuppressionsParams object +// with the ability to set a context for a request. +func NewCloudRegistrationAzureUpdateSuppressionsParamsWithContext(ctx context.Context) *CloudRegistrationAzureUpdateSuppressionsParams { + return &CloudRegistrationAzureUpdateSuppressionsParams{ + Context: ctx, + } +} + +// NewCloudRegistrationAzureUpdateSuppressionsParamsWithHTTPClient creates a new CloudRegistrationAzureUpdateSuppressionsParams object +// with the ability to set a custom HTTPClient for a request. +func NewCloudRegistrationAzureUpdateSuppressionsParamsWithHTTPClient(client *http.Client) *CloudRegistrationAzureUpdateSuppressionsParams { + return &CloudRegistrationAzureUpdateSuppressionsParams{ + HTTPClient: client, + } +} + +/* +CloudRegistrationAzureUpdateSuppressionsParams contains all the parameters to send to the API endpoint + + for the cloud registration azure update suppressions operation. + + Typically these are written to a http.Request. +*/ +type CloudRegistrationAzureUpdateSuppressionsParams struct { + + // Body. + Body *models.AzureSuppressionUpdateRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cloud registration azure update suppressions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureUpdateSuppressionsParams) WithDefaults() *CloudRegistrationAzureUpdateSuppressionsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cloud registration azure update suppressions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationAzureUpdateSuppressionsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cloud registration azure update suppressions params +func (o *CloudRegistrationAzureUpdateSuppressionsParams) WithTimeout(timeout time.Duration) *CloudRegistrationAzureUpdateSuppressionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cloud registration azure update suppressions params +func (o *CloudRegistrationAzureUpdateSuppressionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cloud registration azure update suppressions params +func (o *CloudRegistrationAzureUpdateSuppressionsParams) WithContext(ctx context.Context) *CloudRegistrationAzureUpdateSuppressionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cloud registration azure update suppressions params +func (o *CloudRegistrationAzureUpdateSuppressionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cloud registration azure update suppressions params +func (o *CloudRegistrationAzureUpdateSuppressionsParams) WithHTTPClient(client *http.Client) *CloudRegistrationAzureUpdateSuppressionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cloud registration azure update suppressions params +func (o *CloudRegistrationAzureUpdateSuppressionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the cloud registration azure update suppressions params +func (o *CloudRegistrationAzureUpdateSuppressionsParams) WithBody(body *models.AzureSuppressionUpdateRequest) *CloudRegistrationAzureUpdateSuppressionsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the cloud registration azure update suppressions params +func (o *CloudRegistrationAzureUpdateSuppressionsParams) SetBody(body *models.AzureSuppressionUpdateRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *CloudRegistrationAzureUpdateSuppressionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/cloud_azure_registration/cloud_registration_azure_update_suppressions_responses.go b/falcon/client/cloud_azure_registration/cloud_registration_azure_update_suppressions_responses.go new file mode 100644 index 000000000..50b75928a --- /dev/null +++ b/falcon/client/cloud_azure_registration/cloud_registration_azure_update_suppressions_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_azure_registration + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CloudRegistrationAzureUpdateSuppressionsReader is a Reader for the CloudRegistrationAzureUpdateSuppressions structure. +type CloudRegistrationAzureUpdateSuppressionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CloudRegistrationAzureUpdateSuppressionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCloudRegistrationAzureUpdateSuppressionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCloudRegistrationAzureUpdateSuppressionsBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCloudRegistrationAzureUpdateSuppressionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCloudRegistrationAzureUpdateSuppressionsTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCloudRegistrationAzureUpdateSuppressionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[PATCH /cloud-security-registration-azure/entities/issue-suppressions/v1] cloud-registration-azure-update-suppressions", response, response.Code()) + } +} + +// NewCloudRegistrationAzureUpdateSuppressionsOK creates a CloudRegistrationAzureUpdateSuppressionsOK with default headers values +func NewCloudRegistrationAzureUpdateSuppressionsOK() *CloudRegistrationAzureUpdateSuppressionsOK { + return &CloudRegistrationAzureUpdateSuppressionsOK{} +} + +/* +CloudRegistrationAzureUpdateSuppressionsOK describes a response with status code 200, with default header values. + +OK +*/ +type CloudRegistrationAzureUpdateSuppressionsOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AzureSuppressionResponseExtV1 +} + +// IsSuccess returns true when this cloud registration azure update suppressions o k response has a 2xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cloud registration azure update suppressions o k response has a 3xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure update suppressions o k response has a 4xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure update suppressions o k response has a 5xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure update suppressions o k response a status code equal to that given +func (o *CloudRegistrationAzureUpdateSuppressionsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cloud registration azure update suppressions o k response +func (o *CloudRegistrationAzureUpdateSuppressionsOK) Code() int { + return 200 +} + +func (o *CloudRegistrationAzureUpdateSuppressionsOK) Error() string { + return fmt.Sprintf("[PATCH /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureUpdateSuppressionsOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationAzureUpdateSuppressionsOK) String() string { + return fmt.Sprintf("[PATCH /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureUpdateSuppressionsOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationAzureUpdateSuppressionsOK) GetPayload() *models.AzureSuppressionResponseExtV1 { + return o.Payload +} + +func (o *CloudRegistrationAzureUpdateSuppressionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AzureSuppressionResponseExtV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureUpdateSuppressionsBadRequest creates a CloudRegistrationAzureUpdateSuppressionsBadRequest with default headers values +func NewCloudRegistrationAzureUpdateSuppressionsBadRequest() *CloudRegistrationAzureUpdateSuppressionsBadRequest { + return &CloudRegistrationAzureUpdateSuppressionsBadRequest{} +} + +/* +CloudRegistrationAzureUpdateSuppressionsBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CloudRegistrationAzureUpdateSuppressionsBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure update suppressions bad request response has a 2xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure update suppressions bad request response has a 3xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure update suppressions bad request response has a 4xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure update suppressions bad request response has a 5xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure update suppressions bad request response a status code equal to that given +func (o *CloudRegistrationAzureUpdateSuppressionsBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the cloud registration azure update suppressions bad request response +func (o *CloudRegistrationAzureUpdateSuppressionsBadRequest) Code() int { + return 400 +} + +func (o *CloudRegistrationAzureUpdateSuppressionsBadRequest) Error() string { + return fmt.Sprintf("[PATCH /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureUpdateSuppressionsBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureUpdateSuppressionsBadRequest) String() string { + return fmt.Sprintf("[PATCH /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureUpdateSuppressionsBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationAzureUpdateSuppressionsBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureUpdateSuppressionsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureUpdateSuppressionsForbidden creates a CloudRegistrationAzureUpdateSuppressionsForbidden with default headers values +func NewCloudRegistrationAzureUpdateSuppressionsForbidden() *CloudRegistrationAzureUpdateSuppressionsForbidden { + return &CloudRegistrationAzureUpdateSuppressionsForbidden{} +} + +/* +CloudRegistrationAzureUpdateSuppressionsForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CloudRegistrationAzureUpdateSuppressionsForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure update suppressions forbidden response has a 2xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure update suppressions forbidden response has a 3xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure update suppressions forbidden response has a 4xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure update suppressions forbidden response has a 5xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure update suppressions forbidden response a status code equal to that given +func (o *CloudRegistrationAzureUpdateSuppressionsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the cloud registration azure update suppressions forbidden response +func (o *CloudRegistrationAzureUpdateSuppressionsForbidden) Code() int { + return 403 +} + +func (o *CloudRegistrationAzureUpdateSuppressionsForbidden) Error() string { + return fmt.Sprintf("[PATCH /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureUpdateSuppressionsForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureUpdateSuppressionsForbidden) String() string { + return fmt.Sprintf("[PATCH /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureUpdateSuppressionsForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationAzureUpdateSuppressionsForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureUpdateSuppressionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureUpdateSuppressionsTooManyRequests creates a CloudRegistrationAzureUpdateSuppressionsTooManyRequests with default headers values +func NewCloudRegistrationAzureUpdateSuppressionsTooManyRequests() *CloudRegistrationAzureUpdateSuppressionsTooManyRequests { + return &CloudRegistrationAzureUpdateSuppressionsTooManyRequests{} +} + +/* +CloudRegistrationAzureUpdateSuppressionsTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CloudRegistrationAzureUpdateSuppressionsTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this cloud registration azure update suppressions too many requests response has a 2xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure update suppressions too many requests response has a 3xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure update suppressions too many requests response has a 4xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration azure update suppressions too many requests response has a 5xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration azure update suppressions too many requests response a status code equal to that given +func (o *CloudRegistrationAzureUpdateSuppressionsTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the cloud registration azure update suppressions too many requests response +func (o *CloudRegistrationAzureUpdateSuppressionsTooManyRequests) Code() int { + return 429 +} + +func (o *CloudRegistrationAzureUpdateSuppressionsTooManyRequests) Error() string { + return fmt.Sprintf("[PATCH /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureUpdateSuppressionsTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureUpdateSuppressionsTooManyRequests) String() string { + return fmt.Sprintf("[PATCH /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureUpdateSuppressionsTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationAzureUpdateSuppressionsTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CloudRegistrationAzureUpdateSuppressionsTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationAzureUpdateSuppressionsInternalServerError creates a CloudRegistrationAzureUpdateSuppressionsInternalServerError with default headers values +func NewCloudRegistrationAzureUpdateSuppressionsInternalServerError() *CloudRegistrationAzureUpdateSuppressionsInternalServerError { + return &CloudRegistrationAzureUpdateSuppressionsInternalServerError{} +} + +/* +CloudRegistrationAzureUpdateSuppressionsInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CloudRegistrationAzureUpdateSuppressionsInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration azure update suppressions internal server error response has a 2xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration azure update suppressions internal server error response has a 3xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration azure update suppressions internal server error response has a 4xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration azure update suppressions internal server error response has a 5xx status code +func (o *CloudRegistrationAzureUpdateSuppressionsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this cloud registration azure update suppressions internal server error response a status code equal to that given +func (o *CloudRegistrationAzureUpdateSuppressionsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the cloud registration azure update suppressions internal server error response +func (o *CloudRegistrationAzureUpdateSuppressionsInternalServerError) Code() int { + return 500 +} + +func (o *CloudRegistrationAzureUpdateSuppressionsInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureUpdateSuppressionsInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureUpdateSuppressionsInternalServerError) String() string { + return fmt.Sprintf("[PATCH /cloud-security-registration-azure/entities/issue-suppressions/v1][%d] cloudRegistrationAzureUpdateSuppressionsInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationAzureUpdateSuppressionsInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationAzureUpdateSuppressionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/cloud_google_cloud_registration/cloud_registration_gcp_get_entities_parameters.go b/falcon/client/cloud_google_cloud_registration/cloud_registration_gcp_get_entities_parameters.go index 5577598d8..d7848ae56 100644 --- a/falcon/client/cloud_google_cloud_registration/cloud_registration_gcp_get_entities_parameters.go +++ b/falcon/client/cloud_google_cloud_registration/cloud_registration_gcp_get_entities_parameters.go @@ -64,7 +64,7 @@ type CloudRegistrationGcpGetEntitiesParams struct { /* Filter. - FQL (Falcon Query Language) string for filtering results. Allowed filters are entity_type, entity_id, entity_name, registration_id, registration_name, registration_scope, parent_id, project_number, ioa_status, iom_status, created, updated + FQL (Falcon Query Language) string for filtering results. Allowed filters are entity_type, entity_id, entity_name, registration_id, registration_name, registration_scope, parent_id, project_number, ioa_status, iom_status, dspm_status, vulnerability_scanning_status, created, updated */ Filter *string diff --git a/falcon/client/cloud_oci_registration/cloud_security_registration_oci_get_account_parameters.go b/falcon/client/cloud_oci_registration/cloud_security_registration_oci_get_account_parameters.go index d085a103b..7b5dcdc19 100644 --- a/falcon/client/cloud_oci_registration/cloud_security_registration_oci_get_account_parameters.go +++ b/falcon/client/cloud_oci_registration/cloud_security_registration_oci_get_account_parameters.go @@ -64,7 +64,7 @@ type CloudSecurityRegistrationOciGetAccountParams struct { /* Filter. - FQL (Falcon Query Language) string for filtering results. Allowed filters are Set{tenancy_ocid, tenancy_name, home_region, key_age, overall_status, created_at, updated_at} + FQL (Falcon Query Language) string for filtering results. Allowed filters are Set{key_age, overall_status, created_at, updated_at, tenancy_ocid, tenancy_name, home_region} */ Filter *string @@ -90,7 +90,7 @@ type CloudSecurityRegistrationOciGetAccountParams struct { /* Sort. - Field and direction for sorting results - allowed sort fields are Set{home_region, key_age, overall_status, created_at, updated_at, tenancy_ocid, tenancy_name} + Field and direction for sorting results - allowed sort fields are Set{key_age, overall_status, created_at, updated_at, tenancy_ocid, tenancy_name, home_region} */ Sort *string diff --git a/falcon/client/cloud_security/combined_cloud_risks_parameters.go b/falcon/client/cloud_security/combined_cloud_risks_parameters.go index 3637ff4fa..4221965f6 100644 --- a/falcon/client/cloud_security/combined_cloud_risks_parameters.go +++ b/falcon/client/cloud_security/combined_cloud_risks_parameters.go @@ -76,6 +76,10 @@ type CombinedCloudRisksParams struct { - `cloud_group` - `cloud_provider` - `first_seen` + - `groups` + - `groups.business_impact` + - `groups.business_unit` + - `groups.environment` - `last_seen` - `resolved_at` - `risk_factor` diff --git a/falcon/client/cloud_security/list_cloud_group_i_ds_external_parameters.go b/falcon/client/cloud_security/list_cloud_group_i_ds_external_parameters.go index 461401a0a..6b1179540 100644 --- a/falcon/client/cloud_security/list_cloud_group_i_ds_external_parameters.go +++ b/falcon/client/cloud_security/list_cloud_group_i_ds_external_parameters.go @@ -74,6 +74,7 @@ type ListCloudGroupIDsExternalParams struct { - `cloud_provider` - `account_id` - `region` + - `gcrn` - `cloud_provider_tag` - `image_registry` - `image_repository` diff --git a/falcon/client/cloud_security/list_cloud_groups_external_parameters.go b/falcon/client/cloud_security/list_cloud_groups_external_parameters.go index 10d19d7c5..dcff76392 100644 --- a/falcon/client/cloud_security/list_cloud_groups_external_parameters.go +++ b/falcon/client/cloud_security/list_cloud_groups_external_parameters.go @@ -74,6 +74,7 @@ type ListCloudGroupsExternalParams struct { - `cloud_provider` - `account_id` - `region` + - `gcrn` - `cloud_provider_tag` - `image_registry` - `image_repository` diff --git a/falcon/client/cloud_security_assets/cloud_security_assets_client.go b/falcon/client/cloud_security_assets/cloud_security_assets_client.go index 69a665488..690346091 100644 --- a/falcon/client/cloud_security_assets/cloud_security_assets_client.go +++ b/falcon/client/cloud_security_assets/cloud_security_assets_client.go @@ -36,6 +36,8 @@ type ClientService interface { CloudSecurityAssetsEntitiesGet(params *CloudSecurityAssetsEntitiesGetParams, opts ...ClientOption) (*CloudSecurityAssetsEntitiesGetOK, error) + CloudSecurityAssetsEntitiesPost(params *CloudSecurityAssetsEntitiesPostParams, opts ...ClientOption) (*CloudSecurityAssetsEntitiesPostOK, error) + CloudSecurityAssetsQueries(params *CloudSecurityAssetsQueriesParams, opts ...ClientOption) (*CloudSecurityAssetsQueriesOK, error) SetTransport(transport runtime.ClientTransport) @@ -155,6 +157,44 @@ func (a *Client) CloudSecurityAssetsEntitiesGet(params *CloudSecurityAssetsEntit panic(msg) } +/* +CloudSecurityAssetsEntitiesPost gets raw resources based on i ds in the request body maximum of 500 resources can be requested +*/ +func (a *Client) CloudSecurityAssetsEntitiesPost(params *CloudSecurityAssetsEntitiesPostParams, opts ...ClientOption) (*CloudSecurityAssetsEntitiesPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCloudSecurityAssetsEntitiesPostParams() + } + op := &runtime.ClientOperation{ + ID: "cloud-security-assets-entities-post", + Method: "POST", + PathPattern: "/cloud-security-assets/entities/resources/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CloudSecurityAssetsEntitiesPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CloudSecurityAssetsEntitiesPostOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for cloud-security-assets-entities-post: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* CloudSecurityAssetsQueries gets a list of resource i ds for the given parameters filters and sort criteria */ diff --git a/falcon/client/cloud_security_assets/cloud_security_assets_entities_post_parameters.go b/falcon/client/cloud_security_assets/cloud_security_assets_entities_post_parameters.go new file mode 100644 index 000000000..f3db04531 --- /dev/null +++ b/falcon/client/cloud_security_assets/cloud_security_assets_entities_post_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_security_assets + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewCloudSecurityAssetsEntitiesPostParams creates a new CloudSecurityAssetsEntitiesPostParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCloudSecurityAssetsEntitiesPostParams() *CloudSecurityAssetsEntitiesPostParams { + return &CloudSecurityAssetsEntitiesPostParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCloudSecurityAssetsEntitiesPostParamsWithTimeout creates a new CloudSecurityAssetsEntitiesPostParams object +// with the ability to set a timeout on a request. +func NewCloudSecurityAssetsEntitiesPostParamsWithTimeout(timeout time.Duration) *CloudSecurityAssetsEntitiesPostParams { + return &CloudSecurityAssetsEntitiesPostParams{ + timeout: timeout, + } +} + +// NewCloudSecurityAssetsEntitiesPostParamsWithContext creates a new CloudSecurityAssetsEntitiesPostParams object +// with the ability to set a context for a request. +func NewCloudSecurityAssetsEntitiesPostParamsWithContext(ctx context.Context) *CloudSecurityAssetsEntitiesPostParams { + return &CloudSecurityAssetsEntitiesPostParams{ + Context: ctx, + } +} + +// NewCloudSecurityAssetsEntitiesPostParamsWithHTTPClient creates a new CloudSecurityAssetsEntitiesPostParams object +// with the ability to set a custom HTTPClient for a request. +func NewCloudSecurityAssetsEntitiesPostParamsWithHTTPClient(client *http.Client) *CloudSecurityAssetsEntitiesPostParams { + return &CloudSecurityAssetsEntitiesPostParams{ + HTTPClient: client, + } +} + +/* +CloudSecurityAssetsEntitiesPostParams contains all the parameters to send to the API endpoint + + for the cloud security assets entities post operation. + + Typically these are written to a http.Request. +*/ +type CloudSecurityAssetsEntitiesPostParams struct { + + /* Body. + + Body with array of 'ids' (maximum 500 IDs). + */ + Body *models.AssetsGetResourcesRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cloud security assets entities post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudSecurityAssetsEntitiesPostParams) WithDefaults() *CloudSecurityAssetsEntitiesPostParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cloud security assets entities post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudSecurityAssetsEntitiesPostParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cloud security assets entities post params +func (o *CloudSecurityAssetsEntitiesPostParams) WithTimeout(timeout time.Duration) *CloudSecurityAssetsEntitiesPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cloud security assets entities post params +func (o *CloudSecurityAssetsEntitiesPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cloud security assets entities post params +func (o *CloudSecurityAssetsEntitiesPostParams) WithContext(ctx context.Context) *CloudSecurityAssetsEntitiesPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cloud security assets entities post params +func (o *CloudSecurityAssetsEntitiesPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cloud security assets entities post params +func (o *CloudSecurityAssetsEntitiesPostParams) WithHTTPClient(client *http.Client) *CloudSecurityAssetsEntitiesPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cloud security assets entities post params +func (o *CloudSecurityAssetsEntitiesPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the cloud security assets entities post params +func (o *CloudSecurityAssetsEntitiesPostParams) WithBody(body *models.AssetsGetResourcesRequest) *CloudSecurityAssetsEntitiesPostParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the cloud security assets entities post params +func (o *CloudSecurityAssetsEntitiesPostParams) SetBody(body *models.AssetsGetResourcesRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *CloudSecurityAssetsEntitiesPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/cloud_security_assets/cloud_security_assets_entities_post_responses.go b/falcon/client/cloud_security_assets/cloud_security_assets_entities_post_responses.go new file mode 100644 index 000000000..3fa823364 --- /dev/null +++ b/falcon/client/cloud_security_assets/cloud_security_assets_entities_post_responses.go @@ -0,0 +1,858 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_security_assets + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CloudSecurityAssetsEntitiesPostReader is a Reader for the CloudSecurityAssetsEntitiesPost structure. +type CloudSecurityAssetsEntitiesPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CloudSecurityAssetsEntitiesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCloudSecurityAssetsEntitiesPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCloudSecurityAssetsEntitiesPostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCloudSecurityAssetsEntitiesPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewCloudSecurityAssetsEntitiesPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 408: + result := NewCloudSecurityAssetsEntitiesPostRequestTimeout() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCloudSecurityAssetsEntitiesPostTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCloudSecurityAssetsEntitiesPostInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /cloud-security-assets/entities/resources/v1] cloud-security-assets-entities-post", response, response.Code()) + } +} + +// NewCloudSecurityAssetsEntitiesPostOK creates a CloudSecurityAssetsEntitiesPostOK with default headers values +func NewCloudSecurityAssetsEntitiesPostOK() *CloudSecurityAssetsEntitiesPostOK { + return &CloudSecurityAssetsEntitiesPostOK{} +} + +/* +CloudSecurityAssetsEntitiesPostOK describes a response with status code 200, with default header values. + +OK +*/ +type CloudSecurityAssetsEntitiesPostOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.AssetsGetResourcesResponse +} + +// IsSuccess returns true when this cloud security assets entities post o k response has a 2xx status code +func (o *CloudSecurityAssetsEntitiesPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cloud security assets entities post o k response has a 3xx status code +func (o *CloudSecurityAssetsEntitiesPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud security assets entities post o k response has a 4xx status code +func (o *CloudSecurityAssetsEntitiesPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud security assets entities post o k response has a 5xx status code +func (o *CloudSecurityAssetsEntitiesPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud security assets entities post o k response a status code equal to that given +func (o *CloudSecurityAssetsEntitiesPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cloud security assets entities post o k response +func (o *CloudSecurityAssetsEntitiesPostOK) Code() int { + return 200 +} + +func (o *CloudSecurityAssetsEntitiesPostOK) Error() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostOK %+v", 200, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostOK) String() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostOK %+v", 200, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostOK) GetPayload() *models.AssetsGetResourcesResponse { + return o.Payload +} + +func (o *CloudSecurityAssetsEntitiesPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.AssetsGetResourcesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudSecurityAssetsEntitiesPostBadRequest creates a CloudSecurityAssetsEntitiesPostBadRequest with default headers values +func NewCloudSecurityAssetsEntitiesPostBadRequest() *CloudSecurityAssetsEntitiesPostBadRequest { + return &CloudSecurityAssetsEntitiesPostBadRequest{} +} + +/* +CloudSecurityAssetsEntitiesPostBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CloudSecurityAssetsEntitiesPostBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.RestCursorResponseFields +} + +// IsSuccess returns true when this cloud security assets entities post bad request response has a 2xx status code +func (o *CloudSecurityAssetsEntitiesPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud security assets entities post bad request response has a 3xx status code +func (o *CloudSecurityAssetsEntitiesPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud security assets entities post bad request response has a 4xx status code +func (o *CloudSecurityAssetsEntitiesPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud security assets entities post bad request response has a 5xx status code +func (o *CloudSecurityAssetsEntitiesPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud security assets entities post bad request response a status code equal to that given +func (o *CloudSecurityAssetsEntitiesPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the cloud security assets entities post bad request response +func (o *CloudSecurityAssetsEntitiesPostBadRequest) Code() int { + return 400 +} + +func (o *CloudSecurityAssetsEntitiesPostBadRequest) Error() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostBadRequest %+v", 400, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostBadRequest) String() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostBadRequest %+v", 400, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostBadRequest) GetPayload() *models.RestCursorResponseFields { + return o.Payload +} + +func (o *CloudSecurityAssetsEntitiesPostBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.RestCursorResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudSecurityAssetsEntitiesPostForbidden creates a CloudSecurityAssetsEntitiesPostForbidden with default headers values +func NewCloudSecurityAssetsEntitiesPostForbidden() *CloudSecurityAssetsEntitiesPostForbidden { + return &CloudSecurityAssetsEntitiesPostForbidden{} +} + +/* +CloudSecurityAssetsEntitiesPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CloudSecurityAssetsEntitiesPostForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this cloud security assets entities post forbidden response has a 2xx status code +func (o *CloudSecurityAssetsEntitiesPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud security assets entities post forbidden response has a 3xx status code +func (o *CloudSecurityAssetsEntitiesPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud security assets entities post forbidden response has a 4xx status code +func (o *CloudSecurityAssetsEntitiesPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud security assets entities post forbidden response has a 5xx status code +func (o *CloudSecurityAssetsEntitiesPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud security assets entities post forbidden response a status code equal to that given +func (o *CloudSecurityAssetsEntitiesPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the cloud security assets entities post forbidden response +func (o *CloudSecurityAssetsEntitiesPostForbidden) Code() int { + return 403 +} + +func (o *CloudSecurityAssetsEntitiesPostForbidden) Error() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostForbidden %+v", 403, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostForbidden) String() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostForbidden %+v", 403, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CloudSecurityAssetsEntitiesPostForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudSecurityAssetsEntitiesPostNotFound creates a CloudSecurityAssetsEntitiesPostNotFound with default headers values +func NewCloudSecurityAssetsEntitiesPostNotFound() *CloudSecurityAssetsEntitiesPostNotFound { + return &CloudSecurityAssetsEntitiesPostNotFound{} +} + +/* +CloudSecurityAssetsEntitiesPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type CloudSecurityAssetsEntitiesPostNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.RestCursorResponseFields +} + +// IsSuccess returns true when this cloud security assets entities post not found response has a 2xx status code +func (o *CloudSecurityAssetsEntitiesPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud security assets entities post not found response has a 3xx status code +func (o *CloudSecurityAssetsEntitiesPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud security assets entities post not found response has a 4xx status code +func (o *CloudSecurityAssetsEntitiesPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud security assets entities post not found response has a 5xx status code +func (o *CloudSecurityAssetsEntitiesPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud security assets entities post not found response a status code equal to that given +func (o *CloudSecurityAssetsEntitiesPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the cloud security assets entities post not found response +func (o *CloudSecurityAssetsEntitiesPostNotFound) Code() int { + return 404 +} + +func (o *CloudSecurityAssetsEntitiesPostNotFound) Error() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostNotFound %+v", 404, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostNotFound) String() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostNotFound %+v", 404, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostNotFound) GetPayload() *models.RestCursorResponseFields { + return o.Payload +} + +func (o *CloudSecurityAssetsEntitiesPostNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.RestCursorResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudSecurityAssetsEntitiesPostRequestTimeout creates a CloudSecurityAssetsEntitiesPostRequestTimeout with default headers values +func NewCloudSecurityAssetsEntitiesPostRequestTimeout() *CloudSecurityAssetsEntitiesPostRequestTimeout { + return &CloudSecurityAssetsEntitiesPostRequestTimeout{} +} + +/* +CloudSecurityAssetsEntitiesPostRequestTimeout describes a response with status code 408, with default header values. + +Request Timeout +*/ +type CloudSecurityAssetsEntitiesPostRequestTimeout struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.RestCursorResponseFields +} + +// IsSuccess returns true when this cloud security assets entities post request timeout response has a 2xx status code +func (o *CloudSecurityAssetsEntitiesPostRequestTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud security assets entities post request timeout response has a 3xx status code +func (o *CloudSecurityAssetsEntitiesPostRequestTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud security assets entities post request timeout response has a 4xx status code +func (o *CloudSecurityAssetsEntitiesPostRequestTimeout) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud security assets entities post request timeout response has a 5xx status code +func (o *CloudSecurityAssetsEntitiesPostRequestTimeout) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud security assets entities post request timeout response a status code equal to that given +func (o *CloudSecurityAssetsEntitiesPostRequestTimeout) IsCode(code int) bool { + return code == 408 +} + +// Code gets the status code for the cloud security assets entities post request timeout response +func (o *CloudSecurityAssetsEntitiesPostRequestTimeout) Code() int { + return 408 +} + +func (o *CloudSecurityAssetsEntitiesPostRequestTimeout) Error() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostRequestTimeout %+v", 408, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostRequestTimeout) String() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostRequestTimeout %+v", 408, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostRequestTimeout) GetPayload() *models.RestCursorResponseFields { + return o.Payload +} + +func (o *CloudSecurityAssetsEntitiesPostRequestTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.RestCursorResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudSecurityAssetsEntitiesPostTooManyRequests creates a CloudSecurityAssetsEntitiesPostTooManyRequests with default headers values +func NewCloudSecurityAssetsEntitiesPostTooManyRequests() *CloudSecurityAssetsEntitiesPostTooManyRequests { + return &CloudSecurityAssetsEntitiesPostTooManyRequests{} +} + +/* +CloudSecurityAssetsEntitiesPostTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CloudSecurityAssetsEntitiesPostTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this cloud security assets entities post too many requests response has a 2xx status code +func (o *CloudSecurityAssetsEntitiesPostTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud security assets entities post too many requests response has a 3xx status code +func (o *CloudSecurityAssetsEntitiesPostTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud security assets entities post too many requests response has a 4xx status code +func (o *CloudSecurityAssetsEntitiesPostTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud security assets entities post too many requests response has a 5xx status code +func (o *CloudSecurityAssetsEntitiesPostTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud security assets entities post too many requests response a status code equal to that given +func (o *CloudSecurityAssetsEntitiesPostTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the cloud security assets entities post too many requests response +func (o *CloudSecurityAssetsEntitiesPostTooManyRequests) Code() int { + return 429 +} + +func (o *CloudSecurityAssetsEntitiesPostTooManyRequests) Error() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostTooManyRequests) String() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CloudSecurityAssetsEntitiesPostTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudSecurityAssetsEntitiesPostInternalServerError creates a CloudSecurityAssetsEntitiesPostInternalServerError with default headers values +func NewCloudSecurityAssetsEntitiesPostInternalServerError() *CloudSecurityAssetsEntitiesPostInternalServerError { + return &CloudSecurityAssetsEntitiesPostInternalServerError{} +} + +/* +CloudSecurityAssetsEntitiesPostInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CloudSecurityAssetsEntitiesPostInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.RestCursorResponseFields +} + +// IsSuccess returns true when this cloud security assets entities post internal server error response has a 2xx status code +func (o *CloudSecurityAssetsEntitiesPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud security assets entities post internal server error response has a 3xx status code +func (o *CloudSecurityAssetsEntitiesPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud security assets entities post internal server error response has a 4xx status code +func (o *CloudSecurityAssetsEntitiesPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud security assets entities post internal server error response has a 5xx status code +func (o *CloudSecurityAssetsEntitiesPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this cloud security assets entities post internal server error response a status code equal to that given +func (o *CloudSecurityAssetsEntitiesPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the cloud security assets entities post internal server error response +func (o *CloudSecurityAssetsEntitiesPostInternalServerError) Code() int { + return 500 +} + +func (o *CloudSecurityAssetsEntitiesPostInternalServerError) Error() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostInternalServerError) String() string { + return fmt.Sprintf("[POST /cloud-security-assets/entities/resources/v1][%d] cloudSecurityAssetsEntitiesPostInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudSecurityAssetsEntitiesPostInternalServerError) GetPayload() *models.RestCursorResponseFields { + return o.Payload +} + +func (o *CloudSecurityAssetsEntitiesPostInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.RestCursorResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/cloud_security_assets/cloud_security_assets_queries_parameters.go b/falcon/client/cloud_security_assets/cloud_security_assets_queries_parameters.go index 58809da81..a094459dd 100644 --- a/falcon/client/cloud_security_assets/cloud_security_assets_queries_parameters.go +++ b/falcon/client/cloud_security_assets/cloud_security_assets_queries_parameters.go @@ -71,6 +71,7 @@ type CloudSecurityAssetsQueriesParams struct { /* Filter. FQL string to filter on asset contents. Filterable fields include: + - `account_bitmap_token_64` - `account_id` - `account_name` - `active` @@ -78,6 +79,7 @@ type CloudSecurityAssetsQueriesParams struct { - `aspm.deployment_provider` - `aspm.deployment_type` - `aspm.technologies` + - `azure.resource_group` - `azure.vm_id` - `business_impact` - `cloud_group` diff --git a/falcon/client/cloud_security_detections/cspm_evaluations_combined_iom_by_rule_parameters.go b/falcon/client/cloud_security_detections/cspm_evaluations_combined_iom_by_rule_parameters.go index 82fb2fc33..9d98ecdf6 100644 --- a/falcon/client/cloud_security_detections/cspm_evaluations_combined_iom_by_rule_parameters.go +++ b/falcon/client/cloud_security_detections/cspm_evaluations_combined_iom_by_rule_parameters.go @@ -112,6 +112,7 @@ type CspmEvaluationsCombinedIomByRuleParams struct { - `tags_string` - `technique_id` - `technique_name` + - `tenant_id` - `zone` */ Filter *string diff --git a/falcon/client/cloud_security_detections/cspm_evaluations_iom_queries_parameters.go b/falcon/client/cloud_security_detections/cspm_evaluations_iom_queries_parameters.go index b4a0ab22b..9b3a1b309 100644 --- a/falcon/client/cloud_security_detections/cspm_evaluations_iom_queries_parameters.go +++ b/falcon/client/cloud_security_detections/cspm_evaluations_iom_queries_parameters.go @@ -122,6 +122,7 @@ type CspmEvaluationsIomQueriesParams struct { - `tags_string` - `technique_id` - `technique_name` + - `tenant_id` */ Filter *string @@ -193,6 +194,7 @@ type CspmEvaluationsIomQueriesParams struct { - `tags_string` - `technique_id` - `technique_name` + - `tenant_id` */ Sort *string diff --git a/falcon/client/cloud_security_registration_combined/cloud_registration_cross_provider_get_account_aggregates_parameters.go b/falcon/client/cloud_security_registration_combined/cloud_registration_cross_provider_get_account_aggregates_parameters.go new file mode 100644 index 000000000..b76eb8ce6 --- /dev/null +++ b/falcon/client/cloud_security_registration_combined/cloud_registration_cross_provider_get_account_aggregates_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_security_registration_combined + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewCloudRegistrationCrossProviderGetAccountAggregatesParams creates a new CloudRegistrationCrossProviderGetAccountAggregatesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCloudRegistrationCrossProviderGetAccountAggregatesParams() *CloudRegistrationCrossProviderGetAccountAggregatesParams { + return &CloudRegistrationCrossProviderGetAccountAggregatesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCloudRegistrationCrossProviderGetAccountAggregatesParamsWithTimeout creates a new CloudRegistrationCrossProviderGetAccountAggregatesParams object +// with the ability to set a timeout on a request. +func NewCloudRegistrationCrossProviderGetAccountAggregatesParamsWithTimeout(timeout time.Duration) *CloudRegistrationCrossProviderGetAccountAggregatesParams { + return &CloudRegistrationCrossProviderGetAccountAggregatesParams{ + timeout: timeout, + } +} + +// NewCloudRegistrationCrossProviderGetAccountAggregatesParamsWithContext creates a new CloudRegistrationCrossProviderGetAccountAggregatesParams object +// with the ability to set a context for a request. +func NewCloudRegistrationCrossProviderGetAccountAggregatesParamsWithContext(ctx context.Context) *CloudRegistrationCrossProviderGetAccountAggregatesParams { + return &CloudRegistrationCrossProviderGetAccountAggregatesParams{ + Context: ctx, + } +} + +// NewCloudRegistrationCrossProviderGetAccountAggregatesParamsWithHTTPClient creates a new CloudRegistrationCrossProviderGetAccountAggregatesParams object +// with the ability to set a custom HTTPClient for a request. +func NewCloudRegistrationCrossProviderGetAccountAggregatesParamsWithHTTPClient(client *http.Client) *CloudRegistrationCrossProviderGetAccountAggregatesParams { + return &CloudRegistrationCrossProviderGetAccountAggregatesParams{ + HTTPClient: client, + } +} + +/* +CloudRegistrationCrossProviderGetAccountAggregatesParams contains all the parameters to send to the API endpoint + + for the cloud registration cross provider get account aggregates operation. + + Typically these are written to a http.Request. +*/ +type CloudRegistrationCrossProviderGetAccountAggregatesParams struct { + + /* Body. + + Aggregation specification + */ + Body []*models.MsaAggregateQueryRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cloud registration cross provider get account aggregates params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationCrossProviderGetAccountAggregatesParams) WithDefaults() *CloudRegistrationCrossProviderGetAccountAggregatesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cloud registration cross provider get account aggregates params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudRegistrationCrossProviderGetAccountAggregatesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cloud registration cross provider get account aggregates params +func (o *CloudRegistrationCrossProviderGetAccountAggregatesParams) WithTimeout(timeout time.Duration) *CloudRegistrationCrossProviderGetAccountAggregatesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cloud registration cross provider get account aggregates params +func (o *CloudRegistrationCrossProviderGetAccountAggregatesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cloud registration cross provider get account aggregates params +func (o *CloudRegistrationCrossProviderGetAccountAggregatesParams) WithContext(ctx context.Context) *CloudRegistrationCrossProviderGetAccountAggregatesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cloud registration cross provider get account aggregates params +func (o *CloudRegistrationCrossProviderGetAccountAggregatesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cloud registration cross provider get account aggregates params +func (o *CloudRegistrationCrossProviderGetAccountAggregatesParams) WithHTTPClient(client *http.Client) *CloudRegistrationCrossProviderGetAccountAggregatesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cloud registration cross provider get account aggregates params +func (o *CloudRegistrationCrossProviderGetAccountAggregatesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the cloud registration cross provider get account aggregates params +func (o *CloudRegistrationCrossProviderGetAccountAggregatesParams) WithBody(body []*models.MsaAggregateQueryRequest) *CloudRegistrationCrossProviderGetAccountAggregatesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the cloud registration cross provider get account aggregates params +func (o *CloudRegistrationCrossProviderGetAccountAggregatesParams) SetBody(body []*models.MsaAggregateQueryRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *CloudRegistrationCrossProviderGetAccountAggregatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/cloud_security_registration_combined/cloud_registration_cross_provider_get_account_aggregates_responses.go b/falcon/client/cloud_security_registration_combined/cloud_registration_cross_provider_get_account_aggregates_responses.go new file mode 100644 index 000000000..c32217c76 --- /dev/null +++ b/falcon/client/cloud_security_registration_combined/cloud_registration_cross_provider_get_account_aggregates_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_security_registration_combined + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CloudRegistrationCrossProviderGetAccountAggregatesReader is a Reader for the CloudRegistrationCrossProviderGetAccountAggregates structure. +type CloudRegistrationCrossProviderGetAccountAggregatesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CloudRegistrationCrossProviderGetAccountAggregatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCloudRegistrationCrossProviderGetAccountAggregatesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCloudRegistrationCrossProviderGetAccountAggregatesBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCloudRegistrationCrossProviderGetAccountAggregatesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCloudRegistrationCrossProviderGetAccountAggregatesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /cloud-security-registration/aggregates/accounts/v1] cloud-registration-cross-provider-get-account-aggregates", response, response.Code()) + } +} + +// NewCloudRegistrationCrossProviderGetAccountAggregatesOK creates a CloudRegistrationCrossProviderGetAccountAggregatesOK with default headers values +func NewCloudRegistrationCrossProviderGetAccountAggregatesOK() *CloudRegistrationCrossProviderGetAccountAggregatesOK { + return &CloudRegistrationCrossProviderGetAccountAggregatesOK{} +} + +/* +CloudRegistrationCrossProviderGetAccountAggregatesOK describes a response with status code 200, with default header values. + +OK +*/ +type CloudRegistrationCrossProviderGetAccountAggregatesOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.RegistrationAccountCountsByStatusAggregateResponse +} + +// IsSuccess returns true when this cloud registration cross provider get account aggregates o k response has a 2xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cloud registration cross provider get account aggregates o k response has a 3xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration cross provider get account aggregates o k response has a 4xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration cross provider get account aggregates o k response has a 5xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration cross provider get account aggregates o k response a status code equal to that given +func (o *CloudRegistrationCrossProviderGetAccountAggregatesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cloud registration cross provider get account aggregates o k response +func (o *CloudRegistrationCrossProviderGetAccountAggregatesOK) Code() int { + return 200 +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesOK) Error() string { + return fmt.Sprintf("[POST /cloud-security-registration/aggregates/accounts/v1][%d] cloudRegistrationCrossProviderGetAccountAggregatesOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesOK) String() string { + return fmt.Sprintf("[POST /cloud-security-registration/aggregates/accounts/v1][%d] cloudRegistrationCrossProviderGetAccountAggregatesOK %+v", 200, o.Payload) +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesOK) GetPayload() *models.RegistrationAccountCountsByStatusAggregateResponse { + return o.Payload +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.RegistrationAccountCountsByStatusAggregateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationCrossProviderGetAccountAggregatesBadRequest creates a CloudRegistrationCrossProviderGetAccountAggregatesBadRequest with default headers values +func NewCloudRegistrationCrossProviderGetAccountAggregatesBadRequest() *CloudRegistrationCrossProviderGetAccountAggregatesBadRequest { + return &CloudRegistrationCrossProviderGetAccountAggregatesBadRequest{} +} + +/* +CloudRegistrationCrossProviderGetAccountAggregatesBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CloudRegistrationCrossProviderGetAccountAggregatesBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.RegistrationAccountCountsByStatusAggregateResponse +} + +// IsSuccess returns true when this cloud registration cross provider get account aggregates bad request response has a 2xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration cross provider get account aggregates bad request response has a 3xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration cross provider get account aggregates bad request response has a 4xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration cross provider get account aggregates bad request response has a 5xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration cross provider get account aggregates bad request response a status code equal to that given +func (o *CloudRegistrationCrossProviderGetAccountAggregatesBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the cloud registration cross provider get account aggregates bad request response +func (o *CloudRegistrationCrossProviderGetAccountAggregatesBadRequest) Code() int { + return 400 +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesBadRequest) Error() string { + return fmt.Sprintf("[POST /cloud-security-registration/aggregates/accounts/v1][%d] cloudRegistrationCrossProviderGetAccountAggregatesBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesBadRequest) String() string { + return fmt.Sprintf("[POST /cloud-security-registration/aggregates/accounts/v1][%d] cloudRegistrationCrossProviderGetAccountAggregatesBadRequest %+v", 400, o.Payload) +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesBadRequest) GetPayload() *models.RegistrationAccountCountsByStatusAggregateResponse { + return o.Payload +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.RegistrationAccountCountsByStatusAggregateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationCrossProviderGetAccountAggregatesForbidden creates a CloudRegistrationCrossProviderGetAccountAggregatesForbidden with default headers values +func NewCloudRegistrationCrossProviderGetAccountAggregatesForbidden() *CloudRegistrationCrossProviderGetAccountAggregatesForbidden { + return &CloudRegistrationCrossProviderGetAccountAggregatesForbidden{} +} + +/* +CloudRegistrationCrossProviderGetAccountAggregatesForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CloudRegistrationCrossProviderGetAccountAggregatesForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud registration cross provider get account aggregates forbidden response has a 2xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration cross provider get account aggregates forbidden response has a 3xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration cross provider get account aggregates forbidden response has a 4xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration cross provider get account aggregates forbidden response has a 5xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration cross provider get account aggregates forbidden response a status code equal to that given +func (o *CloudRegistrationCrossProviderGetAccountAggregatesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the cloud registration cross provider get account aggregates forbidden response +func (o *CloudRegistrationCrossProviderGetAccountAggregatesForbidden) Code() int { + return 403 +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesForbidden) Error() string { + return fmt.Sprintf("[POST /cloud-security-registration/aggregates/accounts/v1][%d] cloudRegistrationCrossProviderGetAccountAggregatesForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesForbidden) String() string { + return fmt.Sprintf("[POST /cloud-security-registration/aggregates/accounts/v1][%d] cloudRegistrationCrossProviderGetAccountAggregatesForbidden %+v", 403, o.Payload) +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests creates a CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests with default headers values +func NewCloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests() *CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests { + return &CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests{} +} + +/* +CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this cloud registration cross provider get account aggregates too many requests response has a 2xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration cross provider get account aggregates too many requests response has a 3xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration cross provider get account aggregates too many requests response has a 4xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud registration cross provider get account aggregates too many requests response has a 5xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud registration cross provider get account aggregates too many requests response a status code equal to that given +func (o *CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the cloud registration cross provider get account aggregates too many requests response +func (o *CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests) Code() int { + return 429 +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests) Error() string { + return fmt.Sprintf("[POST /cloud-security-registration/aggregates/accounts/v1][%d] cloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests) String() string { + return fmt.Sprintf("[POST /cloud-security-registration/aggregates/accounts/v1][%d] cloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudRegistrationCrossProviderGetAccountAggregatesInternalServerError creates a CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError with default headers values +func NewCloudRegistrationCrossProviderGetAccountAggregatesInternalServerError() *CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError { + return &CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError{} +} + +/* +CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.RegistrationAccountCountsByStatusAggregateResponse +} + +// IsSuccess returns true when this cloud registration cross provider get account aggregates internal server error response has a 2xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud registration cross provider get account aggregates internal server error response has a 3xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud registration cross provider get account aggregates internal server error response has a 4xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud registration cross provider get account aggregates internal server error response has a 5xx status code +func (o *CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this cloud registration cross provider get account aggregates internal server error response a status code equal to that given +func (o *CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the cloud registration cross provider get account aggregates internal server error response +func (o *CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError) Code() int { + return 500 +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError) Error() string { + return fmt.Sprintf("[POST /cloud-security-registration/aggregates/accounts/v1][%d] cloudRegistrationCrossProviderGetAccountAggregatesInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError) String() string { + return fmt.Sprintf("[POST /cloud-security-registration/aggregates/accounts/v1][%d] cloudRegistrationCrossProviderGetAccountAggregatesInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError) GetPayload() *models.RegistrationAccountCountsByStatusAggregateResponse { + return o.Payload +} + +func (o *CloudRegistrationCrossProviderGetAccountAggregatesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.RegistrationAccountCountsByStatusAggregateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/cloud_security_registration_combined/cloud_security_registration_combined_client.go b/falcon/client/cloud_security_registration_combined/cloud_security_registration_combined_client.go new file mode 100644 index 000000000..a5c63b196 --- /dev/null +++ b/falcon/client/cloud_security_registration_combined/cloud_security_registration_combined_client.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_security_registration_combined + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new cloud security registration combined API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for cloud security registration combined API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + CloudRegistrationCrossProviderGetAccountAggregates(params *CloudRegistrationCrossProviderGetAccountAggregatesParams, opts ...ClientOption) (*CloudRegistrationCrossProviderGetAccountAggregatesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +CloudRegistrationCrossProviderGetAccountAggregates returns cross provider account aggregates by status +*/ +func (a *Client) CloudRegistrationCrossProviderGetAccountAggregates(params *CloudRegistrationCrossProviderGetAccountAggregatesParams, opts ...ClientOption) (*CloudRegistrationCrossProviderGetAccountAggregatesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCloudRegistrationCrossProviderGetAccountAggregatesParams() + } + op := &runtime.ClientOperation{ + ID: "cloud-registration-cross-provider-get-account-aggregates", + Method: "POST", + PathPattern: "/cloud-security-registration/aggregates/accounts/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CloudRegistrationCrossProviderGetAccountAggregatesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CloudRegistrationCrossProviderGetAccountAggregatesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for cloud-registration-cross-provider-get-account-aggregates: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/falcon/client/cloud_security_risks/cloud_security_risks_client.go b/falcon/client/cloud_security_risks/cloud_security_risks_client.go new file mode 100644 index 000000000..6e80adb80 --- /dev/null +++ b/falcon/client/cloud_security_risks/cloud_security_risks_client.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_security_risks + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new cloud security risks API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for cloud security risks API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + CloudSecurityTimelineRisksEnriched(params *CloudSecurityTimelineRisksEnrichedParams, opts ...ClientOption) (*CloudSecurityTimelineRisksEnrichedOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +CloudSecurityTimelineRisksEnriched returns the enriched asset timeline rate limited to 500 requests per minute per c ID exceeding this limit returns HTTP 429 too many requests +*/ +func (a *Client) CloudSecurityTimelineRisksEnriched(params *CloudSecurityTimelineRisksEnrichedParams, opts ...ClientOption) (*CloudSecurityTimelineRisksEnrichedOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCloudSecurityTimelineRisksEnrichedParams() + } + op := &runtime.ClientOperation{ + ID: "cloud-security-timeline-risks-enriched", + Method: "GET", + PathPattern: "/cloud-security-timeline/entities/cloud-risks-enriched-timeline/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CloudSecurityTimelineRisksEnrichedReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CloudSecurityTimelineRisksEnrichedOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for cloud-security-timeline-risks-enriched: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/falcon/client/cloud_security_risks/cloud_security_timeline_risks_enriched_parameters.go b/falcon/client/cloud_security_risks/cloud_security_timeline_risks_enriched_parameters.go new file mode 100644 index 000000000..86e26908f --- /dev/null +++ b/falcon/client/cloud_security_risks/cloud_security_timeline_risks_enriched_parameters.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_security_risks + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewCloudSecurityTimelineRisksEnrichedParams creates a new CloudSecurityTimelineRisksEnrichedParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCloudSecurityTimelineRisksEnrichedParams() *CloudSecurityTimelineRisksEnrichedParams { + return &CloudSecurityTimelineRisksEnrichedParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCloudSecurityTimelineRisksEnrichedParamsWithTimeout creates a new CloudSecurityTimelineRisksEnrichedParams object +// with the ability to set a timeout on a request. +func NewCloudSecurityTimelineRisksEnrichedParamsWithTimeout(timeout time.Duration) *CloudSecurityTimelineRisksEnrichedParams { + return &CloudSecurityTimelineRisksEnrichedParams{ + timeout: timeout, + } +} + +// NewCloudSecurityTimelineRisksEnrichedParamsWithContext creates a new CloudSecurityTimelineRisksEnrichedParams object +// with the ability to set a context for a request. +func NewCloudSecurityTimelineRisksEnrichedParamsWithContext(ctx context.Context) *CloudSecurityTimelineRisksEnrichedParams { + return &CloudSecurityTimelineRisksEnrichedParams{ + Context: ctx, + } +} + +// NewCloudSecurityTimelineRisksEnrichedParamsWithHTTPClient creates a new CloudSecurityTimelineRisksEnrichedParams object +// with the ability to set a custom HTTPClient for a request. +func NewCloudSecurityTimelineRisksEnrichedParamsWithHTTPClient(client *http.Client) *CloudSecurityTimelineRisksEnrichedParams { + return &CloudSecurityTimelineRisksEnrichedParams{ + HTTPClient: client, + } +} + +/* +CloudSecurityTimelineRisksEnrichedParams contains all the parameters to send to the API endpoint + + for the cloud security timeline risks enriched operation. + + Typically these are written to a http.Request. +*/ +type CloudSecurityTimelineRisksEnrichedParams struct { + + /* ID. + + The GCRN (Global Cloud Resource Name) of the asset + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cloud security timeline risks enriched params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudSecurityTimelineRisksEnrichedParams) WithDefaults() *CloudSecurityTimelineRisksEnrichedParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cloud security timeline risks enriched params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CloudSecurityTimelineRisksEnrichedParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cloud security timeline risks enriched params +func (o *CloudSecurityTimelineRisksEnrichedParams) WithTimeout(timeout time.Duration) *CloudSecurityTimelineRisksEnrichedParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cloud security timeline risks enriched params +func (o *CloudSecurityTimelineRisksEnrichedParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cloud security timeline risks enriched params +func (o *CloudSecurityTimelineRisksEnrichedParams) WithContext(ctx context.Context) *CloudSecurityTimelineRisksEnrichedParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cloud security timeline risks enriched params +func (o *CloudSecurityTimelineRisksEnrichedParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cloud security timeline risks enriched params +func (o *CloudSecurityTimelineRisksEnrichedParams) WithHTTPClient(client *http.Client) *CloudSecurityTimelineRisksEnrichedParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cloud security timeline risks enriched params +func (o *CloudSecurityTimelineRisksEnrichedParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the cloud security timeline risks enriched params +func (o *CloudSecurityTimelineRisksEnrichedParams) WithID(id string) *CloudSecurityTimelineRisksEnrichedParams { + o.SetID(id) + return o +} + +// SetID adds the id to the cloud security timeline risks enriched params +func (o *CloudSecurityTimelineRisksEnrichedParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *CloudSecurityTimelineRisksEnrichedParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param id + qrID := o.ID + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/cloud_security_risks/cloud_security_timeline_risks_enriched_responses.go b/falcon/client/cloud_security_risks/cloud_security_timeline_risks_enriched_responses.go new file mode 100644 index 000000000..e99e4cb0e --- /dev/null +++ b/falcon/client/cloud_security_risks/cloud_security_timeline_risks_enriched_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cloud_security_risks + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CloudSecurityTimelineRisksEnrichedReader is a Reader for the CloudSecurityTimelineRisksEnriched structure. +type CloudSecurityTimelineRisksEnrichedReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CloudSecurityTimelineRisksEnrichedReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCloudSecurityTimelineRisksEnrichedOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCloudSecurityTimelineRisksEnrichedBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCloudSecurityTimelineRisksEnrichedForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCloudSecurityTimelineRisksEnrichedTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCloudSecurityTimelineRisksEnrichedInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /cloud-security-timeline/entities/cloud-risks-enriched-timeline/v1] cloud-security-timeline-risks-enriched", response, response.Code()) + } +} + +// NewCloudSecurityTimelineRisksEnrichedOK creates a CloudSecurityTimelineRisksEnrichedOK with default headers values +func NewCloudSecurityTimelineRisksEnrichedOK() *CloudSecurityTimelineRisksEnrichedOK { + return &CloudSecurityTimelineRisksEnrichedOK{} +} + +/* +CloudSecurityTimelineRisksEnrichedOK describes a response with status code 200, with default header values. + +OK +*/ +type CloudSecurityTimelineRisksEnrichedOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.RestGetEnrichedTimelineResponse +} + +// IsSuccess returns true when this cloud security timeline risks enriched o k response has a 2xx status code +func (o *CloudSecurityTimelineRisksEnrichedOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this cloud security timeline risks enriched o k response has a 3xx status code +func (o *CloudSecurityTimelineRisksEnrichedOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud security timeline risks enriched o k response has a 4xx status code +func (o *CloudSecurityTimelineRisksEnrichedOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud security timeline risks enriched o k response has a 5xx status code +func (o *CloudSecurityTimelineRisksEnrichedOK) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud security timeline risks enriched o k response a status code equal to that given +func (o *CloudSecurityTimelineRisksEnrichedOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the cloud security timeline risks enriched o k response +func (o *CloudSecurityTimelineRisksEnrichedOK) Code() int { + return 200 +} + +func (o *CloudSecurityTimelineRisksEnrichedOK) Error() string { + return fmt.Sprintf("[GET /cloud-security-timeline/entities/cloud-risks-enriched-timeline/v1][%d] cloudSecurityTimelineRisksEnrichedOK %+v", 200, o.Payload) +} + +func (o *CloudSecurityTimelineRisksEnrichedOK) String() string { + return fmt.Sprintf("[GET /cloud-security-timeline/entities/cloud-risks-enriched-timeline/v1][%d] cloudSecurityTimelineRisksEnrichedOK %+v", 200, o.Payload) +} + +func (o *CloudSecurityTimelineRisksEnrichedOK) GetPayload() *models.RestGetEnrichedTimelineResponse { + return o.Payload +} + +func (o *CloudSecurityTimelineRisksEnrichedOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.RestGetEnrichedTimelineResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudSecurityTimelineRisksEnrichedBadRequest creates a CloudSecurityTimelineRisksEnrichedBadRequest with default headers values +func NewCloudSecurityTimelineRisksEnrichedBadRequest() *CloudSecurityTimelineRisksEnrichedBadRequest { + return &CloudSecurityTimelineRisksEnrichedBadRequest{} +} + +/* +CloudSecurityTimelineRisksEnrichedBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CloudSecurityTimelineRisksEnrichedBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud security timeline risks enriched bad request response has a 2xx status code +func (o *CloudSecurityTimelineRisksEnrichedBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud security timeline risks enriched bad request response has a 3xx status code +func (o *CloudSecurityTimelineRisksEnrichedBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud security timeline risks enriched bad request response has a 4xx status code +func (o *CloudSecurityTimelineRisksEnrichedBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud security timeline risks enriched bad request response has a 5xx status code +func (o *CloudSecurityTimelineRisksEnrichedBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud security timeline risks enriched bad request response a status code equal to that given +func (o *CloudSecurityTimelineRisksEnrichedBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the cloud security timeline risks enriched bad request response +func (o *CloudSecurityTimelineRisksEnrichedBadRequest) Code() int { + return 400 +} + +func (o *CloudSecurityTimelineRisksEnrichedBadRequest) Error() string { + return fmt.Sprintf("[GET /cloud-security-timeline/entities/cloud-risks-enriched-timeline/v1][%d] cloudSecurityTimelineRisksEnrichedBadRequest %+v", 400, o.Payload) +} + +func (o *CloudSecurityTimelineRisksEnrichedBadRequest) String() string { + return fmt.Sprintf("[GET /cloud-security-timeline/entities/cloud-risks-enriched-timeline/v1][%d] cloudSecurityTimelineRisksEnrichedBadRequest %+v", 400, o.Payload) +} + +func (o *CloudSecurityTimelineRisksEnrichedBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudSecurityTimelineRisksEnrichedBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudSecurityTimelineRisksEnrichedForbidden creates a CloudSecurityTimelineRisksEnrichedForbidden with default headers values +func NewCloudSecurityTimelineRisksEnrichedForbidden() *CloudSecurityTimelineRisksEnrichedForbidden { + return &CloudSecurityTimelineRisksEnrichedForbidden{} +} + +/* +CloudSecurityTimelineRisksEnrichedForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CloudSecurityTimelineRisksEnrichedForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud security timeline risks enriched forbidden response has a 2xx status code +func (o *CloudSecurityTimelineRisksEnrichedForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud security timeline risks enriched forbidden response has a 3xx status code +func (o *CloudSecurityTimelineRisksEnrichedForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud security timeline risks enriched forbidden response has a 4xx status code +func (o *CloudSecurityTimelineRisksEnrichedForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud security timeline risks enriched forbidden response has a 5xx status code +func (o *CloudSecurityTimelineRisksEnrichedForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud security timeline risks enriched forbidden response a status code equal to that given +func (o *CloudSecurityTimelineRisksEnrichedForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the cloud security timeline risks enriched forbidden response +func (o *CloudSecurityTimelineRisksEnrichedForbidden) Code() int { + return 403 +} + +func (o *CloudSecurityTimelineRisksEnrichedForbidden) Error() string { + return fmt.Sprintf("[GET /cloud-security-timeline/entities/cloud-risks-enriched-timeline/v1][%d] cloudSecurityTimelineRisksEnrichedForbidden %+v", 403, o.Payload) +} + +func (o *CloudSecurityTimelineRisksEnrichedForbidden) String() string { + return fmt.Sprintf("[GET /cloud-security-timeline/entities/cloud-risks-enriched-timeline/v1][%d] cloudSecurityTimelineRisksEnrichedForbidden %+v", 403, o.Payload) +} + +func (o *CloudSecurityTimelineRisksEnrichedForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudSecurityTimelineRisksEnrichedForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudSecurityTimelineRisksEnrichedTooManyRequests creates a CloudSecurityTimelineRisksEnrichedTooManyRequests with default headers values +func NewCloudSecurityTimelineRisksEnrichedTooManyRequests() *CloudSecurityTimelineRisksEnrichedTooManyRequests { + return &CloudSecurityTimelineRisksEnrichedTooManyRequests{} +} + +/* +CloudSecurityTimelineRisksEnrichedTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CloudSecurityTimelineRisksEnrichedTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud security timeline risks enriched too many requests response has a 2xx status code +func (o *CloudSecurityTimelineRisksEnrichedTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud security timeline risks enriched too many requests response has a 3xx status code +func (o *CloudSecurityTimelineRisksEnrichedTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud security timeline risks enriched too many requests response has a 4xx status code +func (o *CloudSecurityTimelineRisksEnrichedTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this cloud security timeline risks enriched too many requests response has a 5xx status code +func (o *CloudSecurityTimelineRisksEnrichedTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this cloud security timeline risks enriched too many requests response a status code equal to that given +func (o *CloudSecurityTimelineRisksEnrichedTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the cloud security timeline risks enriched too many requests response +func (o *CloudSecurityTimelineRisksEnrichedTooManyRequests) Code() int { + return 429 +} + +func (o *CloudSecurityTimelineRisksEnrichedTooManyRequests) Error() string { + return fmt.Sprintf("[GET /cloud-security-timeline/entities/cloud-risks-enriched-timeline/v1][%d] cloudSecurityTimelineRisksEnrichedTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudSecurityTimelineRisksEnrichedTooManyRequests) String() string { + return fmt.Sprintf("[GET /cloud-security-timeline/entities/cloud-risks-enriched-timeline/v1][%d] cloudSecurityTimelineRisksEnrichedTooManyRequests %+v", 429, o.Payload) +} + +func (o *CloudSecurityTimelineRisksEnrichedTooManyRequests) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudSecurityTimelineRisksEnrichedTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCloudSecurityTimelineRisksEnrichedInternalServerError creates a CloudSecurityTimelineRisksEnrichedInternalServerError with default headers values +func NewCloudSecurityTimelineRisksEnrichedInternalServerError() *CloudSecurityTimelineRisksEnrichedInternalServerError { + return &CloudSecurityTimelineRisksEnrichedInternalServerError{} +} + +/* +CloudSecurityTimelineRisksEnrichedInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CloudSecurityTimelineRisksEnrichedInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this cloud security timeline risks enriched internal server error response has a 2xx status code +func (o *CloudSecurityTimelineRisksEnrichedInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this cloud security timeline risks enriched internal server error response has a 3xx status code +func (o *CloudSecurityTimelineRisksEnrichedInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this cloud security timeline risks enriched internal server error response has a 4xx status code +func (o *CloudSecurityTimelineRisksEnrichedInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this cloud security timeline risks enriched internal server error response has a 5xx status code +func (o *CloudSecurityTimelineRisksEnrichedInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this cloud security timeline risks enriched internal server error response a status code equal to that given +func (o *CloudSecurityTimelineRisksEnrichedInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the cloud security timeline risks enriched internal server error response +func (o *CloudSecurityTimelineRisksEnrichedInternalServerError) Code() int { + return 500 +} + +func (o *CloudSecurityTimelineRisksEnrichedInternalServerError) Error() string { + return fmt.Sprintf("[GET /cloud-security-timeline/entities/cloud-risks-enriched-timeline/v1][%d] cloudSecurityTimelineRisksEnrichedInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudSecurityTimelineRisksEnrichedInternalServerError) String() string { + return fmt.Sprintf("[GET /cloud-security-timeline/entities/cloud-risks-enriched-timeline/v1][%d] cloudSecurityTimelineRisksEnrichedInternalServerError %+v", 500, o.Payload) +} + +func (o *CloudSecurityTimelineRisksEnrichedInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CloudSecurityTimelineRisksEnrichedInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/container_image_compliance/ext_aggregate_cluster_assessments_parameters.go b/falcon/client/container_image_compliance/ext_aggregate_cluster_assessments_parameters.go index 5afd8502e..034e7d2e2 100644 --- a/falcon/client/container_image_compliance/ext_aggregate_cluster_assessments_parameters.go +++ b/falcon/client/container_image_compliance/ext_aggregate_cluster_assessments_parameters.go @@ -64,13 +64,13 @@ type ExtAggregateClusterAssessmentsParams struct { /* Filter. Filter results using a query in Falcon Query Language (FQL). Supported Filters: - cloud_info.cloud_account_id: Cloud account ID - cloud_info.namespace: Kubernetes namespace - compliance_finding.framework: Compliance finding framework (available values: CIS) cid: Customer ID + cloud_info.namespace: Kubernetes namespace + cloud_info.cloud_account_id: Cloud account ID cloud_info.cloud_region: Cloud region - cloud_info.cluster_name: Kubernetes cluster name cloud_info.cloud_provider: Cloud provider + cloud_info.cluster_name: Kubernetes cluster name + compliance_finding.framework: Compliance finding framework (available values: CIS) */ Filter *string diff --git a/falcon/client/container_image_compliance/ext_aggregate_failed_containers_by_rules_path_parameters.go b/falcon/client/container_image_compliance/ext_aggregate_failed_containers_by_rules_path_parameters.go index 1065d32da..4dedb0c53 100644 --- a/falcon/client/container_image_compliance/ext_aggregate_failed_containers_by_rules_path_parameters.go +++ b/falcon/client/container_image_compliance/ext_aggregate_failed_containers_by_rules_path_parameters.go @@ -65,20 +65,20 @@ type ExtAggregateFailedContainersByRulesPathParams struct { Filter results using a query in Falcon Query Language (FQL). Supported Filters: cloud_info.cloud_region: Cloud region + cloud_info.cloud_provider: Cloud provider + compliance_finding.id: Compliance finding ID + image_digest: Image digest (sha256 digest) cloud_info.cloud_account_id: Cloud account ID - image_repository: Image repository - image_id: Image ID + cloud_info.namespace: Kubernetes namespace compliance_finding.name: Compliance finding Name - cloud_info.cluster_name: Kubernetes cluster name - image_registry: Image registry - image_digest: Image digest (sha256 digest) - cloud_info.cloud_provider: Cloud provider compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) cid: Customer ID - image_tag: Image tag - cloud_info.namespace: Kubernetes namespace - compliance_finding.id: Compliance finding ID compliance_finding.framework: Compliance finding framework (available values: CIS) + image_registry: Image registry + image_tag: Image tag + image_repository: Image repository + cloud_info.cluster_name: Kubernetes cluster name + image_id: Image ID */ Filter *string diff --git a/falcon/client/container_image_compliance/ext_aggregate_failed_containers_count_by_severity_parameters.go b/falcon/client/container_image_compliance/ext_aggregate_failed_containers_count_by_severity_parameters.go index bbf1e094f..bbebf6d3b 100644 --- a/falcon/client/container_image_compliance/ext_aggregate_failed_containers_count_by_severity_parameters.go +++ b/falcon/client/container_image_compliance/ext_aggregate_failed_containers_count_by_severity_parameters.go @@ -64,21 +64,21 @@ type ExtAggregateFailedContainersCountBySeverityParams struct { /* Filter. Filter results using a query in Falcon Query Language (FQL). Supported Filters: - compliance_finding.name: Compliance finding Name - compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) - image_tag: Image tag - cloud_info.cluster_name: Kubernetes cluster name - cid: Customer ID - image_repository: Image repository - cloud_info.namespace: Kubernetes namespace - cloud_info.cloud_region: Cloud region image_registry: Image registry - cloud_info.cloud_account_id: Cloud account ID compliance_finding.id: Compliance finding ID + image_digest: Image digest (sha256 digest) + compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) compliance_finding.framework: Compliance finding framework (available values: CIS) + cloud_info.cloud_account_id: Cloud account ID + compliance_finding.name: Compliance finding Name + cloud_info.cluster_name: Kubernetes cluster name + cloud_info.namespace: Kubernetes namespace image_id: Image ID - image_digest: Image digest (sha256 digest) + image_tag: Image tag + image_repository: Image repository cloud_info.cloud_provider: Cloud provider + cid: Customer ID + cloud_info.cloud_region: Cloud region */ Filter *string diff --git a/falcon/client/container_image_compliance/ext_aggregate_failed_images_by_rules_path_parameters.go b/falcon/client/container_image_compliance/ext_aggregate_failed_images_by_rules_path_parameters.go index 9797e8dba..5196ba377 100644 --- a/falcon/client/container_image_compliance/ext_aggregate_failed_images_by_rules_path_parameters.go +++ b/falcon/client/container_image_compliance/ext_aggregate_failed_images_by_rules_path_parameters.go @@ -64,21 +64,21 @@ type ExtAggregateFailedImagesByRulesPathParams struct { /* Filter. Filter results using a query in Falcon Query Language (FQL). Supported Filters: - cloud_info.cluster_name: Kubernetes cluster name - cid: Customer ID + image_id: Image ID + cloud_info.cloud_provider: Cloud provider image_registry: Image registry + image_tag: Image tag image_repository: Image repository + compliance_finding.id: Compliance finding ID + image_digest: Image digest (sha256 digest) + cid: Customer ID + cloud_info.cluster_name: Kubernetes cluster name cloud_info.namespace: Kubernetes namespace compliance_finding.framework: Compliance finding framework (available values: CIS) - image_digest: Image digest (sha256 digest) - compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) - cloud_info.cloud_region: Cloud region cloud_info.cloud_account_id: Cloud account ID - image_id: Image ID - cloud_info.cloud_provider: Cloud provider - image_tag: Image tag - compliance_finding.id: Compliance finding ID compliance_finding.name: Compliance finding Name + compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) + cloud_info.cloud_region: Cloud region */ Filter *string diff --git a/falcon/client/container_image_compliance/ext_aggregate_failed_images_count_by_severity_parameters.go b/falcon/client/container_image_compliance/ext_aggregate_failed_images_count_by_severity_parameters.go index 2971efabe..7b27ff74f 100644 --- a/falcon/client/container_image_compliance/ext_aggregate_failed_images_count_by_severity_parameters.go +++ b/falcon/client/container_image_compliance/ext_aggregate_failed_images_count_by_severity_parameters.go @@ -64,21 +64,21 @@ type ExtAggregateFailedImagesCountBySeverityParams struct { /* Filter. Filter results using a query in Falcon Query Language (FQL). Supported Filters: - compliance_finding.id: Compliance finding ID cloud_info.cloud_provider: Cloud provider - cloud_info.namespace: Kubernetes namespace - compliance_finding.framework: Compliance finding framework (available values: CIS) + image_registry: Image registry + compliance_finding.id: Compliance finding ID + image_digest: Image digest (sha256 digest) + cloud_info.cloud_region: Cloud region + image_repository: Image repository + cloud_info.cloud_account_id: Cloud account ID + cid: Customer ID + cloud_info.cluster_name: Kubernetes cluster name image_id: Image ID + compliance_finding.framework: Compliance finding framework (available values: CIS) compliance_finding.name: Compliance finding Name - cloud_info.cloud_region: Cloud region + cloud_info.namespace: Kubernetes namespace image_tag: Image tag - cloud_info.cloud_account_id: Cloud account ID - image_digest: Image digest (sha256 digest) compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) - cloud_info.cluster_name: Kubernetes cluster name - cid: Customer ID - image_registry: Image registry - image_repository: Image repository */ Filter *string diff --git a/falcon/client/container_image_compliance/ext_aggregate_failed_rules_by_clusters_parameters.go b/falcon/client/container_image_compliance/ext_aggregate_failed_rules_by_clusters_parameters.go index 4e724390d..823026086 100644 --- a/falcon/client/container_image_compliance/ext_aggregate_failed_rules_by_clusters_parameters.go +++ b/falcon/client/container_image_compliance/ext_aggregate_failed_rules_by_clusters_parameters.go @@ -64,20 +64,20 @@ type ExtAggregateFailedRulesByClustersParams struct { /* Filter. Filter results using a query in Falcon Query Language (FQL). Supported Filters: - cloud_info.cloud_account_id: Cloud account ID - image_repository: Image repository - image_digest: Image digest (sha256 digest) - asset_type: asset type (container, image) + image_tag: Image tag compliance_finding.id: Compliance finding ID - compliance_finding.framework: Compliance finding framework (available values: CIS) - image_id: Image ID compliance_finding.name: Compliance finding Name - cloud_info.cloud_provider: Cloud provider - compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) cid: Customer ID - image_registry: Image registry - image_tag: Image tag + cloud_info.cloud_account_id: Cloud account ID + compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) cloud_info.cloud_region: Cloud region + image_id: Image ID + cloud_info.cloud_provider: Cloud provider + image_registry: Image registry + image_digest: Image digest (sha256 digest) + image_repository: Image repository + compliance_finding.framework: Compliance finding framework (available values: CIS) + asset_type: asset type (container, image) cloud_info.cluster_name: Kubernetes cluster name */ diff --git a/falcon/client/container_image_compliance/ext_aggregate_failed_rules_by_images_parameters.go b/falcon/client/container_image_compliance/ext_aggregate_failed_rules_by_images_parameters.go index 8a34608d7..e047f9459 100644 --- a/falcon/client/container_image_compliance/ext_aggregate_failed_rules_by_images_parameters.go +++ b/falcon/client/container_image_compliance/ext_aggregate_failed_rules_by_images_parameters.go @@ -64,22 +64,22 @@ type ExtAggregateFailedRulesByImagesParams struct { /* Filter. Filter results using a query in Falcon Query Language (FQL). Supported Filters: + compliance_finding.name: Compliance finding Name + compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) image_registry: Image registry - image_tag: Image tag compliance_finding.id: Compliance finding ID - cloud_info.cloud_provider: Cloud provider - compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) - cloud_info.cloud_region: Cloud region - cloud_info.namespace: Kubernetes namespace asset_type: asset type (container, image) - image_repository: Image repository - compliance_finding.framework: Compliance finding framework (available values: CIS) + cloud_info.cloud_account_id: Cloud account ID + cid: Customer ID + cloud_info.cloud_region: Cloud region image_id: Image ID - image_digest: Image digest (sha256 digest) - compliance_finding.name: Compliance finding Name + compliance_finding.framework: Compliance finding framework (available values: CIS) + image_repository: Image repository cloud_info.cluster_name: Kubernetes cluster name - cid: Customer ID - cloud_info.cloud_account_id: Cloud account ID + image_tag: Image tag + image_digest: Image digest (sha256 digest) + cloud_info.namespace: Kubernetes namespace + cloud_info.cloud_provider: Cloud provider */ Filter *string diff --git a/falcon/client/container_image_compliance/ext_aggregate_failed_rules_count_by_severity_parameters.go b/falcon/client/container_image_compliance/ext_aggregate_failed_rules_count_by_severity_parameters.go index 3d92383e6..04bbc9506 100644 --- a/falcon/client/container_image_compliance/ext_aggregate_failed_rules_count_by_severity_parameters.go +++ b/falcon/client/container_image_compliance/ext_aggregate_failed_rules_count_by_severity_parameters.go @@ -64,21 +64,21 @@ type ExtAggregateFailedRulesCountBySeverityParams struct { /* Filter. Filter results using a query in Falcon Query Language (FQL). Supported Filters: - cid: Customer ID - compliance_finding.framework: Compliance finding framework (available values: CIS) - image_id: Image ID - compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) - cloud_info.cloud_region: Cloud region - cloud_info.cloud_account_id: Cloud account ID - asset_type: asset type (container, image) + image_tag: Image tag image_repository: Image repository + cloud_info.cloud_account_id: Cloud account ID + cid: Customer ID cloud_info.cloud_provider: Cloud provider - cloud_info.cluster_name: Kubernetes cluster name - image_registry: Image registry - image_tag: Image tag compliance_finding.id: Compliance finding ID + compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) + cloud_info.cluster_name: Kubernetes cluster name + asset_type: asset type (container, image) image_digest: Image digest (sha256 digest) + cloud_info.cloud_region: Cloud region + image_id: Image ID + image_registry: Image registry compliance_finding.name: Compliance finding Name + compliance_finding.framework: Compliance finding framework (available values: CIS) */ Filter *string diff --git a/falcon/client/container_image_compliance/ext_aggregate_image_assessments_parameters.go b/falcon/client/container_image_compliance/ext_aggregate_image_assessments_parameters.go index 15705d3f6..11d381a19 100644 --- a/falcon/client/container_image_compliance/ext_aggregate_image_assessments_parameters.go +++ b/falcon/client/container_image_compliance/ext_aggregate_image_assessments_parameters.go @@ -70,22 +70,22 @@ type ExtAggregateImageAssessmentsParams struct { /* Filter. Filter results using a query in Falcon Query Language (FQL). Supported Filters: + cloud_info.cloud_account_id: Cloud account ID cloud_info.cloud_region: Cloud region - cloud_info.cluster_name: Kubernetes cluster name - asset_type: asset type (container, image) + cloud_info.cloud_provider: Cloud provider + image_tag: Image tag image_repository: Image repository - cloud_info.namespace: Kubernetes namespace + cid: Customer ID + cloud_info.cluster_name: Kubernetes cluster name compliance_finding.framework: Compliance finding framework (available values: CIS) image_registry: Image registry - image_tag: Image tag - image_id: Image ID + asset_type: asset type (container, image) + compliance_finding.name: Compliance finding Name compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) - cid: Customer ID - cloud_info.cloud_account_id: Cloud account ID + cloud_info.namespace: Kubernetes namespace + image_id: Image ID compliance_finding.id: Compliance finding ID image_digest: Image digest (sha256 digest) - cloud_info.cloud_provider: Cloud provider - compliance_finding.name: Compliance finding Name */ Filter *string diff --git a/falcon/client/container_image_compliance/ext_aggregate_rules_assessments_parameters.go b/falcon/client/container_image_compliance/ext_aggregate_rules_assessments_parameters.go index b11ce4c68..1635e560f 100644 --- a/falcon/client/container_image_compliance/ext_aggregate_rules_assessments_parameters.go +++ b/falcon/client/container_image_compliance/ext_aggregate_rules_assessments_parameters.go @@ -64,20 +64,20 @@ type ExtAggregateRulesAssessmentsParams struct { /* Filter. Filter results using a query in Falcon Query Language (FQL). Supported Filters: - image_tag: Image tag - cloud_info.cloud_account_id: Cloud account ID - image_id: Image ID - compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) - cid: Customer ID - image_registry: Image registry compliance_finding.id: Compliance finding ID - image_digest: Image digest (sha256 digest) - cloud_info.cloud_region: Cloud region cloud_info.cluster_name: Kubernetes cluster name + image_id: Image ID image_repository: Image repository - compliance_finding.framework: Compliance finding framework (available values: CIS) - cloud_info.cloud_provider: Cloud provider + cloud_info.cloud_account_id: Cloud account ID compliance_finding.name: Compliance finding Name + compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) + cloud_info.cloud_region: Cloud region + cloud_info.cloud_provider: Cloud provider + image_tag: Image tag + image_digest: Image digest (sha256 digest) + cid: Customer ID + compliance_finding.framework: Compliance finding framework (available values: CIS) + image_registry: Image registry */ Filter *string diff --git a/falcon/client/container_image_compliance/ext_aggregate_rules_by_status_parameters.go b/falcon/client/container_image_compliance/ext_aggregate_rules_by_status_parameters.go index 233618089..42edf7512 100644 --- a/falcon/client/container_image_compliance/ext_aggregate_rules_by_status_parameters.go +++ b/falcon/client/container_image_compliance/ext_aggregate_rules_by_status_parameters.go @@ -64,23 +64,23 @@ type ExtAggregateRulesByStatusParams struct { /* Filter. Filter results using a query in Falcon Query Language (FQL). Supported Filters: - cloud_info.cloud_provider: Cloud provider + image_repository: Image repository cloud_info.cloud_account_id: Cloud account ID - asset_type: asset type (container, image) - image_id: Image ID - container_name: Container name compliance_finding.severity: Compliance finding severity; available values: 4, 3, 2, 1 (4: critical, 3: high, 2: medium, 1:low) - cid: Customer ID - image_repository: Image repository container_id: Container ID - image_digest: Image digest (sha256 digest) + compliance_finding.id: Compliance finding ID cloud_info.cluster_name: Kubernetes cluster name - image_registry: Image registry + cloud_info.cloud_provider: Cloud provider compliance_finding.name: Compliance finding Name + image_id: Image ID + asset_type: asset type (container, image) + image_digest: Image digest (sha256 digest) + container_name: Container name + cid: Customer ID cloud_info.cloud_region: Cloud region - image_tag: Image tag - compliance_finding.id: Compliance finding ID compliance_finding.framework: Compliance finding framework (available values: CIS) + image_registry: Image registry + image_tag: Image tag */ Filter *string diff --git a/falcon/client/crowd_strike_api_specification_client.go b/falcon/client/crowd_strike_api_specification_client.go index 03b79924c..f7a091900 100644 --- a/falcon/client/crowd_strike_api_specification_client.go +++ b/falcon/client/crowd_strike_api_specification_client.go @@ -11,8 +11,10 @@ import ( "github.com/go-openapi/strfmt" "github.com/crowdstrike/gofalcon/falcon/client/a_s_p_m" + "github.com/crowdstrike/gofalcon/falcon/client/access_scopes" "github.com/crowdstrike/gofalcon/falcon/client/admission_control_policies" "github.com/crowdstrike/gofalcon/falcon/client/alerts" + "github.com/crowdstrike/gofalcon/falcon/client/api_clients" "github.com/crowdstrike/gofalcon/falcon/client/api_integrations" "github.com/crowdstrike/gofalcon/falcon/client/cao_hunting" "github.com/crowdstrike/gofalcon/falcon/client/case_files" @@ -28,6 +30,8 @@ import ( "github.com/crowdstrike/gofalcon/falcon/client/cloud_security_assets" "github.com/crowdstrike/gofalcon/falcon/client/cloud_security_compliance" "github.com/crowdstrike/gofalcon/falcon/client/cloud_security_detections" + "github.com/crowdstrike/gofalcon/falcon/client/cloud_security_registration_combined" + "github.com/crowdstrike/gofalcon/falcon/client/cloud_security_risks" "github.com/crowdstrike/gofalcon/falcon/client/cloud_snapshots" "github.com/crowdstrike/gofalcon/falcon/client/configuration_assessment" "github.com/crowdstrike/gofalcon/falcon/client/configuration_assessment_evaluation_logic" @@ -64,12 +68,15 @@ import ( "github.com/crowdstrike/gofalcon/falcon/client/falcon_container" "github.com/crowdstrike/gofalcon/falcon/client/falcon_container_cli" "github.com/crowdstrike/gofalcon/falcon/client/falcon_container_image" + "github.com/crowdstrike/gofalcon/falcon/client/falcon_id" "github.com/crowdstrike/gofalcon/falcon/client/falconx_sandbox" + "github.com/crowdstrike/gofalcon/falcon/client/federated_connections" "github.com/crowdstrike/gofalcon/falcon/client/field_schema" "github.com/crowdstrike/gofalcon/falcon/client/filevantage" "github.com/crowdstrike/gofalcon/falcon/client/firewall_management" "github.com/crowdstrike/gofalcon/falcon/client/firewall_policies" "github.com/crowdstrike/gofalcon/falcon/client/foundry_logscale" + "github.com/crowdstrike/gofalcon/falcon/client/foundry_lookup_files" "github.com/crowdstrike/gofalcon/falcon/client/host_group" "github.com/crowdstrike/gofalcon/falcon/client/host_migration" "github.com/crowdstrike/gofalcon/falcon/client/hosts" @@ -91,7 +98,6 @@ import ( "github.com/crowdstrike/gofalcon/falcon/client/knowledge_bases" "github.com/crowdstrike/gofalcon/falcon/client/kubernetes_container_compliance" "github.com/crowdstrike/gofalcon/falcon/client/kubernetes_protection" - "github.com/crowdstrike/gofalcon/falcon/client/lookup_files" "github.com/crowdstrike/gofalcon/falcon/client/maintenance_token" "github.com/crowdstrike/gofalcon/falcon/client/malquery" "github.com/crowdstrike/gofalcon/falcon/client/message_center" @@ -111,6 +117,7 @@ import ( "github.com/crowdstrike/gofalcon/falcon/client/ods" "github.com/crowdstrike/gofalcon/falcon/client/operations" "github.com/crowdstrike/gofalcon/falcon/client/prevention_policies" + "github.com/crowdstrike/gofalcon/falcon/client/profile_groups" "github.com/crowdstrike/gofalcon/falcon/client/quarantine" "github.com/crowdstrike/gofalcon/falcon/client/quick_scan" "github.com/crowdstrike/gofalcon/falcon/client/quick_scan_pro" @@ -186,8 +193,10 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *CrowdStrik cli := new(CrowdStrikeAPISpecification) cli.Transport = transport cli.Aspm = a_s_p_m.New(transport, formats) + cli.AccessScopes = access_scopes.New(transport, formats) cli.AdmissionControlPolicies = admission_control_policies.New(transport, formats) cli.Alerts = alerts.New(transport, formats) + cli.APIClients = api_clients.New(transport, formats) cli.APIIntegrations = api_integrations.New(transport, formats) cli.CaoHunting = cao_hunting.New(transport, formats) cli.CaseFiles = case_files.New(transport, formats) @@ -203,6 +212,8 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *CrowdStrik cli.CloudSecurityAssets = cloud_security_assets.New(transport, formats) cli.CloudSecurityCompliance = cloud_security_compliance.New(transport, formats) cli.CloudSecurityDetections = cloud_security_detections.New(transport, formats) + cli.CloudSecurityRegistrationCombined = cloud_security_registration_combined.New(transport, formats) + cli.CloudSecurityRisks = cloud_security_risks.New(transport, formats) cli.CloudSnapshots = cloud_snapshots.New(transport, formats) cli.ConfigurationAssessment = configuration_assessment.New(transport, formats) cli.ConfigurationAssessmentEvaluationLogic = configuration_assessment_evaluation_logic.New(transport, formats) @@ -239,12 +250,15 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *CrowdStrik cli.FalconContainer = falcon_container.New(transport, formats) cli.FalconContainerCli = falcon_container_cli.New(transport, formats) cli.FalconContainerImage = falcon_container_image.New(transport, formats) + cli.FalconID = falcon_id.New(transport, formats) cli.FalconxSandbox = falconx_sandbox.New(transport, formats) + cli.FederatedConnections = federated_connections.New(transport, formats) cli.FieldSchema = field_schema.New(transport, formats) cli.Filevantage = filevantage.New(transport, formats) cli.FirewallManagement = firewall_management.New(transport, formats) cli.FirewallPolicies = firewall_policies.New(transport, formats) cli.FoundryLogscale = foundry_logscale.New(transport, formats) + cli.FoundryLookupFiles = foundry_lookup_files.New(transport, formats) cli.HostGroup = host_group.New(transport, formats) cli.HostMigration = host_migration.New(transport, formats) cli.Hosts = hosts.New(transport, formats) @@ -266,7 +280,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *CrowdStrik cli.KnowledgeBases = knowledge_bases.New(transport, formats) cli.KubernetesContainerCompliance = kubernetes_container_compliance.New(transport, formats) cli.KubernetesProtection = kubernetes_protection.New(transport, formats) - cli.LookupFiles = lookup_files.New(transport, formats) cli.MaintenanceToken = maintenance_token.New(transport, formats) cli.Malquery = malquery.New(transport, formats) cli.MessageCenter = message_center.New(transport, formats) @@ -286,6 +299,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *CrowdStrik cli.Ods = ods.New(transport, formats) cli.Operations = operations.New(transport, formats) cli.PreventionPolicies = prevention_policies.New(transport, formats) + cli.ProfileGroups = profile_groups.New(transport, formats) cli.Quarantine = quarantine.New(transport, formats) cli.QuickScan = quick_scan.New(transport, formats) cli.QuickScanPro = quick_scan_pro.New(transport, formats) @@ -362,10 +376,14 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { type CrowdStrikeAPISpecification struct { Aspm a_s_p_m.ClientService + AccessScopes access_scopes.ClientService + AdmissionControlPolicies admission_control_policies.ClientService Alerts alerts.ClientService + APIClients api_clients.ClientService + APIIntegrations api_integrations.ClientService CaoHunting cao_hunting.ClientService @@ -396,6 +414,10 @@ type CrowdStrikeAPISpecification struct { CloudSecurityDetections cloud_security_detections.ClientService + CloudSecurityRegistrationCombined cloud_security_registration_combined.ClientService + + CloudSecurityRisks cloud_security_risks.ClientService + CloudSnapshots cloud_snapshots.ClientService ConfigurationAssessment configuration_assessment.ClientService @@ -468,8 +490,12 @@ type CrowdStrikeAPISpecification struct { FalconContainerImage falcon_container_image.ClientService + FalconID falcon_id.ClientService + FalconxSandbox falconx_sandbox.ClientService + FederatedConnections federated_connections.ClientService + FieldSchema field_schema.ClientService Filevantage filevantage.ClientService @@ -480,6 +506,8 @@ type CrowdStrikeAPISpecification struct { FoundryLogscale foundry_logscale.ClientService + FoundryLookupFiles foundry_lookup_files.ClientService + HostGroup host_group.ClientService HostMigration host_migration.ClientService @@ -522,8 +550,6 @@ type CrowdStrikeAPISpecification struct { KubernetesProtection kubernetes_protection.ClientService - LookupFiles lookup_files.ClientService - MaintenanceToken maintenance_token.ClientService Malquery malquery.ClientService @@ -562,6 +588,8 @@ type CrowdStrikeAPISpecification struct { PreventionPolicies prevention_policies.ClientService + ProfileGroups profile_groups.ClientService + Quarantine quarantine.ClientService QuickScan quick_scan.ClientService @@ -629,8 +657,10 @@ type CrowdStrikeAPISpecification struct { func (c *CrowdStrikeAPISpecification) SetTransport(transport runtime.ClientTransport) { c.Transport = transport c.Aspm.SetTransport(transport) + c.AccessScopes.SetTransport(transport) c.AdmissionControlPolicies.SetTransport(transport) c.Alerts.SetTransport(transport) + c.APIClients.SetTransport(transport) c.APIIntegrations.SetTransport(transport) c.CaoHunting.SetTransport(transport) c.CaseFiles.SetTransport(transport) @@ -646,6 +676,8 @@ func (c *CrowdStrikeAPISpecification) SetTransport(transport runtime.ClientTrans c.CloudSecurityAssets.SetTransport(transport) c.CloudSecurityCompliance.SetTransport(transport) c.CloudSecurityDetections.SetTransport(transport) + c.CloudSecurityRegistrationCombined.SetTransport(transport) + c.CloudSecurityRisks.SetTransport(transport) c.CloudSnapshots.SetTransport(transport) c.ConfigurationAssessment.SetTransport(transport) c.ConfigurationAssessmentEvaluationLogic.SetTransport(transport) @@ -682,12 +714,15 @@ func (c *CrowdStrikeAPISpecification) SetTransport(transport runtime.ClientTrans c.FalconContainer.SetTransport(transport) c.FalconContainerCli.SetTransport(transport) c.FalconContainerImage.SetTransport(transport) + c.FalconID.SetTransport(transport) c.FalconxSandbox.SetTransport(transport) + c.FederatedConnections.SetTransport(transport) c.FieldSchema.SetTransport(transport) c.Filevantage.SetTransport(transport) c.FirewallManagement.SetTransport(transport) c.FirewallPolicies.SetTransport(transport) c.FoundryLogscale.SetTransport(transport) + c.FoundryLookupFiles.SetTransport(transport) c.HostGroup.SetTransport(transport) c.HostMigration.SetTransport(transport) c.Hosts.SetTransport(transport) @@ -709,7 +744,6 @@ func (c *CrowdStrikeAPISpecification) SetTransport(transport runtime.ClientTrans c.KnowledgeBases.SetTransport(transport) c.KubernetesContainerCompliance.SetTransport(transport) c.KubernetesProtection.SetTransport(transport) - c.LookupFiles.SetTransport(transport) c.MaintenanceToken.SetTransport(transport) c.Malquery.SetTransport(transport) c.MessageCenter.SetTransport(transport) @@ -729,6 +763,7 @@ func (c *CrowdStrikeAPISpecification) SetTransport(transport runtime.ClientTrans c.Ods.SetTransport(transport) c.Operations.SetTransport(transport) c.PreventionPolicies.SetTransport(transport) + c.ProfileGroups.SetTransport(transport) c.Quarantine.SetTransport(transport) c.QuickScan.SetTransport(transport) c.QuickScanPro.SetTransport(transport) diff --git a/falcon/client/data_protection_configuration/data_protection_configuration_client.go b/falcon/client/data_protection_configuration/data_protection_configuration_client.go index 7a796a7b1..7e749e751 100644 --- a/falcon/client/data_protection_configuration/data_protection_configuration_client.go +++ b/falcon/client/data_protection_configuration/data_protection_configuration_client.go @@ -850,7 +850,7 @@ func (a *Client) EntitiesLocalApplicationGroupDelete(params *EntitiesLocalApplic } /* -EntitiesLocalApplicationGroupGet gets particular local application groups +EntitiesLocalApplicationGroupGet gets specific local application groups */ func (a *Client) EntitiesLocalApplicationGroupGet(params *EntitiesLocalApplicationGroupGetParams, opts ...ClientOption) (*EntitiesLocalApplicationGroupGetOK, error) { // TODO: Validate the params before sending diff --git a/falcon/client/data_protection_configuration/entities_web_location_delete_v2_parameters.go b/falcon/client/data_protection_configuration/entities_web_location_delete_v2_parameters.go index d12781b99..d20d6c04e 100644 --- a/falcon/client/data_protection_configuration/entities_web_location_delete_v2_parameters.go +++ b/falcon/client/data_protection_configuration/entities_web_location_delete_v2_parameters.go @@ -168,8 +168,8 @@ func (o *EntitiesWebLocationDeleteV2Params) bindParamIds(formats strfmt.Registry idsIC = append(idsIC, idsIIV) } - // items.CollectionFormat: "csv" - idsIS := swag.JoinByFormat(idsIC, "csv") + // items.CollectionFormat: "multi" + idsIS := swag.JoinByFormat(idsIC, "multi") return idsIS } diff --git a/falcon/client/data_protection_configuration/queries_classification_get_v2_parameters.go b/falcon/client/data_protection_configuration/queries_classification_get_v2_parameters.go index 010987a37..99a1b9883 100644 --- a/falcon/client/data_protection_configuration/queries_classification_get_v2_parameters.go +++ b/falcon/client/data_protection_configuration/queries_classification_get_v2_parameters.go @@ -64,7 +64,7 @@ type QueriesClassificationGetV2Params struct { /* Filter. - Filter results by specific attributes , allowed attributes are [created_at modified_by modified_at properties.content_patterns properties.content_patterns_operator properties.evidence_duplication_enabled name created_by properties.file_types properties.protection_mode properties.sensitivity_labels properties.web_sources] + Filter results by specific attributes , allowed attributes are [name created_at modified_at properties.content_patterns properties.evidence_duplication_enabled properties.protection_mode properties.web_sources created_by modified_by properties.content_patterns_operator properties.file_types properties.sensitivity_labels] */ Filter *string @@ -84,7 +84,7 @@ type QueriesClassificationGetV2Params struct { /* Sort. - The property to sort by, allowed fields are :[modified_at name created_at] + The property to sort by, allowed fields are :[created_at modified_at name] */ Sort *string diff --git a/falcon/client/data_protection_configuration/queries_policy_get_v2_parameters.go b/falcon/client/data_protection_configuration/queries_policy_get_v2_parameters.go index c0dadf468..19f3c76ec 100644 --- a/falcon/client/data_protection_configuration/queries_policy_get_v2_parameters.go +++ b/falcon/client/data_protection_configuration/queries_policy_get_v2_parameters.go @@ -64,7 +64,7 @@ type QueriesPolicyGetV2Params struct { /* Filter. - Filter results by specific attributes , allowed attributes are [properties.evidence_download_enabled properties.classifications modified_by properties.max_file_size_to_inspect_unit properties.custom_allow_notification properties.besplash_enabled properties.besplash_custom_message properties.be_upload_timeout_response properties.enable_network_inspection properties.evidence_storage_free_disk_perc modified_at properties.min_confidence_level properties.browsers_without_active_extension properties.unsupported_browsers_action properties.enable_clipboard_inspection properties.evidence_duplication_enabled_default properties.besplash_message_source properties.be_paste_clipboard_min_size_unit name precedence properties.enable_content_inspection properties.enable_context_inspection properties.be_exclude_domains properties.be_upload_timeout_duration_seconds properties.be_paste_timeout_response properties.be_paste_clipboard_max_size_unit description created_at properties.block_all_data_access properties.similarity_detection properties.block_notifications properties.custom_block_notification properties.be_paste_clipboard_max_size properties.be_paste_clipboard_over_size_behaviour_block is_enabled is_default created_by properties.similarity_threshold properties.enable_end_user_notifications_unsupported_browser properties.allow_notifications properties.network_inspection_files_exceeding_size_limit properties.max_file_size_to_inspect properties.inspection_depth properties.evidence_encrypted_enabled properties.be_paste_timeout_duration_milliseconds properties.be_paste_clipboard_min_size properties.evidence_storage_max_size] + Filter results by specific attributes , allowed attributes are [is_enabled created_by properties.block_all_data_access properties.enable_network_inspection properties.besplash_custom_message is_default properties.enable_end_user_notifications_unsupported_browser properties.custom_allow_notification properties.besplash_enabled properties.be_paste_timeout_response name properties.max_file_size_to_inspect_unit properties.inspection_depth properties.evidence_encrypted_enabled properties.network_inspection_files_exceeding_size_limit properties.besplash_message_source properties.be_upload_timeout_duration_seconds properties.be_paste_clipboard_min_size_unit properties.enable_context_inspection properties.similarity_threshold properties.allow_notifications properties.block_notifications properties.evidence_download_enabled properties.be_paste_clipboard_max_size_unit properties.evidence_storage_free_disk_perc properties.screen_capture_duration_pre_event description modified_by properties.min_confidence_level properties.similarity_detection properties.custom_block_notification properties.be_paste_clipboard_min_size properties.be_paste_clipboard_over_size_behaviour_block properties.evidence_storage_max_size modified_at properties.evidence_duplication_enabled_default properties.max_file_size_to_inspect properties.enable_screen_capture precedence created_at properties.browsers_without_active_extension properties.enable_clipboard_inspection properties.classifications properties.be_paste_timeout_duration_milliseconds properties.screen_capture_duration_post_event properties.enable_content_inspection properties.be_exclude_domains properties.be_upload_timeout_response properties.be_paste_clipboard_max_size properties.euj_dialog_timeout] */ Filter *string @@ -90,7 +90,7 @@ type QueriesPolicyGetV2Params struct { /* Sort. - The property to sort by, allowed fields are :[name precedence created_at modified_at] + The property to sort by, allowed fields are :[modified_at name precedence created_at] */ Sort *string diff --git a/falcon/client/discover/combined_applications_parameters.go b/falcon/client/discover/combined_applications_parameters.go index a27426c9b..d28652b89 100644 --- a/falcon/client/discover/combined_applications_parameters.go +++ b/falcon/client/discover/combined_applications_parameters.go @@ -72,7 +72,7 @@ type CombinedApplicationsParams struct { Select various details blocks to be returned for each application entity. Supported values: - + */ Facet []string diff --git a/falcon/client/falcon_id/delete_third_party_passkey_registry_parameters.go b/falcon/client/falcon_id/delete_third_party_passkey_registry_parameters.go new file mode 100644 index 000000000..3d2125ea1 --- /dev/null +++ b/falcon/client/falcon_id/delete_third_party_passkey_registry_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package falcon_id + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewDeleteThirdPartyPasskeyRegistryParams creates a new DeleteThirdPartyPasskeyRegistryParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDeleteThirdPartyPasskeyRegistryParams() *DeleteThirdPartyPasskeyRegistryParams { + return &DeleteThirdPartyPasskeyRegistryParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteThirdPartyPasskeyRegistryParamsWithTimeout creates a new DeleteThirdPartyPasskeyRegistryParams object +// with the ability to set a timeout on a request. +func NewDeleteThirdPartyPasskeyRegistryParamsWithTimeout(timeout time.Duration) *DeleteThirdPartyPasskeyRegistryParams { + return &DeleteThirdPartyPasskeyRegistryParams{ + timeout: timeout, + } +} + +// NewDeleteThirdPartyPasskeyRegistryParamsWithContext creates a new DeleteThirdPartyPasskeyRegistryParams object +// with the ability to set a context for a request. +func NewDeleteThirdPartyPasskeyRegistryParamsWithContext(ctx context.Context) *DeleteThirdPartyPasskeyRegistryParams { + return &DeleteThirdPartyPasskeyRegistryParams{ + Context: ctx, + } +} + +// NewDeleteThirdPartyPasskeyRegistryParamsWithHTTPClient creates a new DeleteThirdPartyPasskeyRegistryParams object +// with the ability to set a custom HTTPClient for a request. +func NewDeleteThirdPartyPasskeyRegistryParamsWithHTTPClient(client *http.Client) *DeleteThirdPartyPasskeyRegistryParams { + return &DeleteThirdPartyPasskeyRegistryParams{ + HTTPClient: client, + } +} + +/* +DeleteThirdPartyPasskeyRegistryParams contains all the parameters to send to the API endpoint + + for the delete third party passkey registry operation. + + Typically these are written to a http.Request. +*/ +type DeleteThirdPartyPasskeyRegistryParams struct { + + /* Ids. + + Third party passkey registry IDs to delete + */ + Ids []string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the delete third party passkey registry params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteThirdPartyPasskeyRegistryParams) WithDefaults() *DeleteThirdPartyPasskeyRegistryParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the delete third party passkey registry params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteThirdPartyPasskeyRegistryParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the delete third party passkey registry params +func (o *DeleteThirdPartyPasskeyRegistryParams) WithTimeout(timeout time.Duration) *DeleteThirdPartyPasskeyRegistryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete third party passkey registry params +func (o *DeleteThirdPartyPasskeyRegistryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete third party passkey registry params +func (o *DeleteThirdPartyPasskeyRegistryParams) WithContext(ctx context.Context) *DeleteThirdPartyPasskeyRegistryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete third party passkey registry params +func (o *DeleteThirdPartyPasskeyRegistryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete third party passkey registry params +func (o *DeleteThirdPartyPasskeyRegistryParams) WithHTTPClient(client *http.Client) *DeleteThirdPartyPasskeyRegistryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete third party passkey registry params +func (o *DeleteThirdPartyPasskeyRegistryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIds adds the ids to the delete third party passkey registry params +func (o *DeleteThirdPartyPasskeyRegistryParams) WithIds(ids []string) *DeleteThirdPartyPasskeyRegistryParams { + o.SetIds(ids) + return o +} + +// SetIds adds the ids to the delete third party passkey registry params +func (o *DeleteThirdPartyPasskeyRegistryParams) SetIds(ids []string) { + o.Ids = ids +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteThirdPartyPasskeyRegistryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Ids != nil { + + // binding items for ids + joinedIds := o.bindParamIds(reg) + + // query array param ids + if err := r.SetQueryParam("ids", joinedIds...); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamDeleteThirdPartyPasskeyRegistry binds the parameter ids +func (o *DeleteThirdPartyPasskeyRegistryParams) bindParamIds(formats strfmt.Registry) []string { + idsIR := o.Ids + + var idsIC []string + for _, idsIIR := range idsIR { // explode []string + + idsIIV := idsIIR // string as string + idsIC = append(idsIC, idsIIV) + } + + // items.CollectionFormat: "multi" + idsIS := swag.JoinByFormat(idsIC, "multi") + + return idsIS +} diff --git a/falcon/client/falcon_id/delete_third_party_passkey_registry_responses.go b/falcon/client/falcon_id/delete_third_party_passkey_registry_responses.go new file mode 100644 index 000000000..3a35fa74a --- /dev/null +++ b/falcon/client/falcon_id/delete_third_party_passkey_registry_responses.go @@ -0,0 +1,742 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package falcon_id + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// DeleteThirdPartyPasskeyRegistryReader is a Reader for the DeleteThirdPartyPasskeyRegistry structure. +type DeleteThirdPartyPasskeyRegistryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteThirdPartyPasskeyRegistryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteThirdPartyPasskeyRegistryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewDeleteThirdPartyPasskeyRegistryBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewDeleteThirdPartyPasskeyRegistryUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteThirdPartyPasskeyRegistryForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewDeleteThirdPartyPasskeyRegistryTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteThirdPartyPasskeyRegistryInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[DELETE /falcon-id/entities/third-party-passkeys/v1] DeleteThirdPartyPasskeyRegistry", response, response.Code()) + } +} + +// NewDeleteThirdPartyPasskeyRegistryOK creates a DeleteThirdPartyPasskeyRegistryOK with default headers values +func NewDeleteThirdPartyPasskeyRegistryOK() *DeleteThirdPartyPasskeyRegistryOK { + return &DeleteThirdPartyPasskeyRegistryOK{} +} + +/* +DeleteThirdPartyPasskeyRegistryOK describes a response with status code 200, with default header values. + +OK +*/ +type DeleteThirdPartyPasskeyRegistryOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1 +} + +// IsSuccess returns true when this delete third party passkey registry o k response has a 2xx status code +func (o *DeleteThirdPartyPasskeyRegistryOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete third party passkey registry o k response has a 3xx status code +func (o *DeleteThirdPartyPasskeyRegistryOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete third party passkey registry o k response has a 4xx status code +func (o *DeleteThirdPartyPasskeyRegistryOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete third party passkey registry o k response has a 5xx status code +func (o *DeleteThirdPartyPasskeyRegistryOK) IsServerError() bool { + return false +} + +// IsCode returns true when this delete third party passkey registry o k response a status code equal to that given +func (o *DeleteThirdPartyPasskeyRegistryOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the delete third party passkey registry o k response +func (o *DeleteThirdPartyPasskeyRegistryOK) Code() int { + return 200 +} + +func (o *DeleteThirdPartyPasskeyRegistryOK) Error() string { + return fmt.Sprintf("[DELETE /falcon-id/entities/third-party-passkeys/v1][%d] deleteThirdPartyPasskeyRegistryOK %+v", 200, o.Payload) +} + +func (o *DeleteThirdPartyPasskeyRegistryOK) String() string { + return fmt.Sprintf("[DELETE /falcon-id/entities/third-party-passkeys/v1][%d] deleteThirdPartyPasskeyRegistryOK %+v", 200, o.Payload) +} + +func (o *DeleteThirdPartyPasskeyRegistryOK) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1 { + return o.Payload +} + +func (o *DeleteThirdPartyPasskeyRegistryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteThirdPartyPasskeyRegistryBadRequest creates a DeleteThirdPartyPasskeyRegistryBadRequest with default headers values +func NewDeleteThirdPartyPasskeyRegistryBadRequest() *DeleteThirdPartyPasskeyRegistryBadRequest { + return &DeleteThirdPartyPasskeyRegistryBadRequest{} +} + +/* +DeleteThirdPartyPasskeyRegistryBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type DeleteThirdPartyPasskeyRegistryBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1 +} + +// IsSuccess returns true when this delete third party passkey registry bad request response has a 2xx status code +func (o *DeleteThirdPartyPasskeyRegistryBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete third party passkey registry bad request response has a 3xx status code +func (o *DeleteThirdPartyPasskeyRegistryBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete third party passkey registry bad request response has a 4xx status code +func (o *DeleteThirdPartyPasskeyRegistryBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete third party passkey registry bad request response has a 5xx status code +func (o *DeleteThirdPartyPasskeyRegistryBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this delete third party passkey registry bad request response a status code equal to that given +func (o *DeleteThirdPartyPasskeyRegistryBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the delete third party passkey registry bad request response +func (o *DeleteThirdPartyPasskeyRegistryBadRequest) Code() int { + return 400 +} + +func (o *DeleteThirdPartyPasskeyRegistryBadRequest) Error() string { + return fmt.Sprintf("[DELETE /falcon-id/entities/third-party-passkeys/v1][%d] deleteThirdPartyPasskeyRegistryBadRequest %+v", 400, o.Payload) +} + +func (o *DeleteThirdPartyPasskeyRegistryBadRequest) String() string { + return fmt.Sprintf("[DELETE /falcon-id/entities/third-party-passkeys/v1][%d] deleteThirdPartyPasskeyRegistryBadRequest %+v", 400, o.Payload) +} + +func (o *DeleteThirdPartyPasskeyRegistryBadRequest) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1 { + return o.Payload +} + +func (o *DeleteThirdPartyPasskeyRegistryBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteThirdPartyPasskeyRegistryUnauthorized creates a DeleteThirdPartyPasskeyRegistryUnauthorized with default headers values +func NewDeleteThirdPartyPasskeyRegistryUnauthorized() *DeleteThirdPartyPasskeyRegistryUnauthorized { + return &DeleteThirdPartyPasskeyRegistryUnauthorized{} +} + +/* +DeleteThirdPartyPasskeyRegistryUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type DeleteThirdPartyPasskeyRegistryUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1 +} + +// IsSuccess returns true when this delete third party passkey registry unauthorized response has a 2xx status code +func (o *DeleteThirdPartyPasskeyRegistryUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete third party passkey registry unauthorized response has a 3xx status code +func (o *DeleteThirdPartyPasskeyRegistryUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete third party passkey registry unauthorized response has a 4xx status code +func (o *DeleteThirdPartyPasskeyRegistryUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete third party passkey registry unauthorized response has a 5xx status code +func (o *DeleteThirdPartyPasskeyRegistryUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this delete third party passkey registry unauthorized response a status code equal to that given +func (o *DeleteThirdPartyPasskeyRegistryUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the delete third party passkey registry unauthorized response +func (o *DeleteThirdPartyPasskeyRegistryUnauthorized) Code() int { + return 401 +} + +func (o *DeleteThirdPartyPasskeyRegistryUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /falcon-id/entities/third-party-passkeys/v1][%d] deleteThirdPartyPasskeyRegistryUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteThirdPartyPasskeyRegistryUnauthorized) String() string { + return fmt.Sprintf("[DELETE /falcon-id/entities/third-party-passkeys/v1][%d] deleteThirdPartyPasskeyRegistryUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteThirdPartyPasskeyRegistryUnauthorized) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1 { + return o.Payload +} + +func (o *DeleteThirdPartyPasskeyRegistryUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteThirdPartyPasskeyRegistryForbidden creates a DeleteThirdPartyPasskeyRegistryForbidden with default headers values +func NewDeleteThirdPartyPasskeyRegistryForbidden() *DeleteThirdPartyPasskeyRegistryForbidden { + return &DeleteThirdPartyPasskeyRegistryForbidden{} +} + +/* +DeleteThirdPartyPasskeyRegistryForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type DeleteThirdPartyPasskeyRegistryForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this delete third party passkey registry forbidden response has a 2xx status code +func (o *DeleteThirdPartyPasskeyRegistryForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete third party passkey registry forbidden response has a 3xx status code +func (o *DeleteThirdPartyPasskeyRegistryForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete third party passkey registry forbidden response has a 4xx status code +func (o *DeleteThirdPartyPasskeyRegistryForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete third party passkey registry forbidden response has a 5xx status code +func (o *DeleteThirdPartyPasskeyRegistryForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this delete third party passkey registry forbidden response a status code equal to that given +func (o *DeleteThirdPartyPasskeyRegistryForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the delete third party passkey registry forbidden response +func (o *DeleteThirdPartyPasskeyRegistryForbidden) Code() int { + return 403 +} + +func (o *DeleteThirdPartyPasskeyRegistryForbidden) Error() string { + return fmt.Sprintf("[DELETE /falcon-id/entities/third-party-passkeys/v1][%d] deleteThirdPartyPasskeyRegistryForbidden %+v", 403, o.Payload) +} + +func (o *DeleteThirdPartyPasskeyRegistryForbidden) String() string { + return fmt.Sprintf("[DELETE /falcon-id/entities/third-party-passkeys/v1][%d] deleteThirdPartyPasskeyRegistryForbidden %+v", 403, o.Payload) +} + +func (o *DeleteThirdPartyPasskeyRegistryForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *DeleteThirdPartyPasskeyRegistryForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteThirdPartyPasskeyRegistryTooManyRequests creates a DeleteThirdPartyPasskeyRegistryTooManyRequests with default headers values +func NewDeleteThirdPartyPasskeyRegistryTooManyRequests() *DeleteThirdPartyPasskeyRegistryTooManyRequests { + return &DeleteThirdPartyPasskeyRegistryTooManyRequests{} +} + +/* +DeleteThirdPartyPasskeyRegistryTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type DeleteThirdPartyPasskeyRegistryTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this delete third party passkey registry too many requests response has a 2xx status code +func (o *DeleteThirdPartyPasskeyRegistryTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete third party passkey registry too many requests response has a 3xx status code +func (o *DeleteThirdPartyPasskeyRegistryTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete third party passkey registry too many requests response has a 4xx status code +func (o *DeleteThirdPartyPasskeyRegistryTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete third party passkey registry too many requests response has a 5xx status code +func (o *DeleteThirdPartyPasskeyRegistryTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this delete third party passkey registry too many requests response a status code equal to that given +func (o *DeleteThirdPartyPasskeyRegistryTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the delete third party passkey registry too many requests response +func (o *DeleteThirdPartyPasskeyRegistryTooManyRequests) Code() int { + return 429 +} + +func (o *DeleteThirdPartyPasskeyRegistryTooManyRequests) Error() string { + return fmt.Sprintf("[DELETE /falcon-id/entities/third-party-passkeys/v1][%d] deleteThirdPartyPasskeyRegistryTooManyRequests %+v", 429, o.Payload) +} + +func (o *DeleteThirdPartyPasskeyRegistryTooManyRequests) String() string { + return fmt.Sprintf("[DELETE /falcon-id/entities/third-party-passkeys/v1][%d] deleteThirdPartyPasskeyRegistryTooManyRequests %+v", 429, o.Payload) +} + +func (o *DeleteThirdPartyPasskeyRegistryTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *DeleteThirdPartyPasskeyRegistryTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteThirdPartyPasskeyRegistryInternalServerError creates a DeleteThirdPartyPasskeyRegistryInternalServerError with default headers values +func NewDeleteThirdPartyPasskeyRegistryInternalServerError() *DeleteThirdPartyPasskeyRegistryInternalServerError { + return &DeleteThirdPartyPasskeyRegistryInternalServerError{} +} + +/* +DeleteThirdPartyPasskeyRegistryInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type DeleteThirdPartyPasskeyRegistryInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1 +} + +// IsSuccess returns true when this delete third party passkey registry internal server error response has a 2xx status code +func (o *DeleteThirdPartyPasskeyRegistryInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete third party passkey registry internal server error response has a 3xx status code +func (o *DeleteThirdPartyPasskeyRegistryInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete third party passkey registry internal server error response has a 4xx status code +func (o *DeleteThirdPartyPasskeyRegistryInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete third party passkey registry internal server error response has a 5xx status code +func (o *DeleteThirdPartyPasskeyRegistryInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this delete third party passkey registry internal server error response a status code equal to that given +func (o *DeleteThirdPartyPasskeyRegistryInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the delete third party passkey registry internal server error response +func (o *DeleteThirdPartyPasskeyRegistryInternalServerError) Code() int { + return 500 +} + +func (o *DeleteThirdPartyPasskeyRegistryInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /falcon-id/entities/third-party-passkeys/v1][%d] deleteThirdPartyPasskeyRegistryInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteThirdPartyPasskeyRegistryInternalServerError) String() string { + return fmt.Sprintf("[DELETE /falcon-id/entities/third-party-passkeys/v1][%d] deleteThirdPartyPasskeyRegistryInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteThirdPartyPasskeyRegistryInternalServerError) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1 { + return o.Payload +} + +func (o *DeleteThirdPartyPasskeyRegistryInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/falcon_id/falcon_id_client.go b/falcon/client/falcon_id/falcon_id_client.go new file mode 100644 index 000000000..5e678bd5f --- /dev/null +++ b/falcon/client/falcon_id/falcon_id_client.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package falcon_id + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new falcon id API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for falcon id API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteThirdPartyPasskeyRegistry(params *DeleteThirdPartyPasskeyRegistryParams, opts ...ClientOption) (*DeleteThirdPartyPasskeyRegistryOK, error) + + GetThirdPartyPasskeyRegistry(params *GetThirdPartyPasskeyRegistryParams, opts ...ClientOption) (*GetThirdPartyPasskeyRegistryOK, error) + + QueryThirdPartyPasskeyRegistry(params *QueryThirdPartyPasskeyRegistryParams, opts ...ClientOption) (*QueryThirdPartyPasskeyRegistryOK, error) + + UpdateThirdPartyPasskeyRegistry(params *UpdateThirdPartyPasskeyRegistryParams, opts ...ClientOption) (*UpdateThirdPartyPasskeyRegistryOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +DeleteThirdPartyPasskeyRegistry deletes third party passkey registries +*/ +func (a *Client) DeleteThirdPartyPasskeyRegistry(params *DeleteThirdPartyPasskeyRegistryParams, opts ...ClientOption) (*DeleteThirdPartyPasskeyRegistryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteThirdPartyPasskeyRegistryParams() + } + op := &runtime.ClientOperation{ + ID: "DeleteThirdPartyPasskeyRegistry", + Method: "DELETE", + PathPattern: "/falcon-id/entities/third-party-passkeys/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &DeleteThirdPartyPasskeyRegistryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteThirdPartyPasskeyRegistryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for DeleteThirdPartyPasskeyRegistry: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +GetThirdPartyPasskeyRegistry fetches third party passkey registries +*/ +func (a *Client) GetThirdPartyPasskeyRegistry(params *GetThirdPartyPasskeyRegistryParams, opts ...ClientOption) (*GetThirdPartyPasskeyRegistryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetThirdPartyPasskeyRegistryParams() + } + op := &runtime.ClientOperation{ + ID: "GetThirdPartyPasskeyRegistry", + Method: "GET", + PathPattern: "/falcon-id/entities/third-party-passkeys/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &GetThirdPartyPasskeyRegistryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetThirdPartyPasskeyRegistryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for GetThirdPartyPasskeyRegistry: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +QueryThirdPartyPasskeyRegistry queries third party passkey registries +*/ +func (a *Client) QueryThirdPartyPasskeyRegistry(params *QueryThirdPartyPasskeyRegistryParams, opts ...ClientOption) (*QueryThirdPartyPasskeyRegistryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewQueryThirdPartyPasskeyRegistryParams() + } + op := &runtime.ClientOperation{ + ID: "QueryThirdPartyPasskeyRegistry", + Method: "GET", + PathPattern: "/falcon-id/queries/third-party-passkeys/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &QueryThirdPartyPasskeyRegistryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*QueryThirdPartyPasskeyRegistryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for QueryThirdPartyPasskeyRegistry: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +UpdateThirdPartyPasskeyRegistry updates third party passkey registries +*/ +func (a *Client) UpdateThirdPartyPasskeyRegistry(params *UpdateThirdPartyPasskeyRegistryParams, opts ...ClientOption) (*UpdateThirdPartyPasskeyRegistryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdateThirdPartyPasskeyRegistryParams() + } + op := &runtime.ClientOperation{ + ID: "UpdateThirdPartyPasskeyRegistry", + Method: "PATCH", + PathPattern: "/falcon-id/entities/third-party-passkeys/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &UpdateThirdPartyPasskeyRegistryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UpdateThirdPartyPasskeyRegistryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for UpdateThirdPartyPasskeyRegistry: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/falcon/client/falcon_id/get_third_party_passkey_registry_parameters.go b/falcon/client/falcon_id/get_third_party_passkey_registry_parameters.go new file mode 100644 index 000000000..36efc2ac9 --- /dev/null +++ b/falcon/client/falcon_id/get_third_party_passkey_registry_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package falcon_id + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetThirdPartyPasskeyRegistryParams creates a new GetThirdPartyPasskeyRegistryParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetThirdPartyPasskeyRegistryParams() *GetThirdPartyPasskeyRegistryParams { + return &GetThirdPartyPasskeyRegistryParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetThirdPartyPasskeyRegistryParamsWithTimeout creates a new GetThirdPartyPasskeyRegistryParams object +// with the ability to set a timeout on a request. +func NewGetThirdPartyPasskeyRegistryParamsWithTimeout(timeout time.Duration) *GetThirdPartyPasskeyRegistryParams { + return &GetThirdPartyPasskeyRegistryParams{ + timeout: timeout, + } +} + +// NewGetThirdPartyPasskeyRegistryParamsWithContext creates a new GetThirdPartyPasskeyRegistryParams object +// with the ability to set a context for a request. +func NewGetThirdPartyPasskeyRegistryParamsWithContext(ctx context.Context) *GetThirdPartyPasskeyRegistryParams { + return &GetThirdPartyPasskeyRegistryParams{ + Context: ctx, + } +} + +// NewGetThirdPartyPasskeyRegistryParamsWithHTTPClient creates a new GetThirdPartyPasskeyRegistryParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetThirdPartyPasskeyRegistryParamsWithHTTPClient(client *http.Client) *GetThirdPartyPasskeyRegistryParams { + return &GetThirdPartyPasskeyRegistryParams{ + HTTPClient: client, + } +} + +/* +GetThirdPartyPasskeyRegistryParams contains all the parameters to send to the API endpoint + + for the get third party passkey registry operation. + + Typically these are written to a http.Request. +*/ +type GetThirdPartyPasskeyRegistryParams struct { + + /* Ids. + + Third party passkey registry IDs to retrieve + */ + Ids []string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get third party passkey registry params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetThirdPartyPasskeyRegistryParams) WithDefaults() *GetThirdPartyPasskeyRegistryParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get third party passkey registry params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetThirdPartyPasskeyRegistryParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get third party passkey registry params +func (o *GetThirdPartyPasskeyRegistryParams) WithTimeout(timeout time.Duration) *GetThirdPartyPasskeyRegistryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get third party passkey registry params +func (o *GetThirdPartyPasskeyRegistryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get third party passkey registry params +func (o *GetThirdPartyPasskeyRegistryParams) WithContext(ctx context.Context) *GetThirdPartyPasskeyRegistryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get third party passkey registry params +func (o *GetThirdPartyPasskeyRegistryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get third party passkey registry params +func (o *GetThirdPartyPasskeyRegistryParams) WithHTTPClient(client *http.Client) *GetThirdPartyPasskeyRegistryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get third party passkey registry params +func (o *GetThirdPartyPasskeyRegistryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIds adds the ids to the get third party passkey registry params +func (o *GetThirdPartyPasskeyRegistryParams) WithIds(ids []string) *GetThirdPartyPasskeyRegistryParams { + o.SetIds(ids) + return o +} + +// SetIds adds the ids to the get third party passkey registry params +func (o *GetThirdPartyPasskeyRegistryParams) SetIds(ids []string) { + o.Ids = ids +} + +// WriteToRequest writes these params to a swagger request +func (o *GetThirdPartyPasskeyRegistryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Ids != nil { + + // binding items for ids + joinedIds := o.bindParamIds(reg) + + // query array param ids + if err := r.SetQueryParam("ids", joinedIds...); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamGetThirdPartyPasskeyRegistry binds the parameter ids +func (o *GetThirdPartyPasskeyRegistryParams) bindParamIds(formats strfmt.Registry) []string { + idsIR := o.Ids + + var idsIC []string + for _, idsIIR := range idsIR { // explode []string + + idsIIV := idsIIR // string as string + idsIC = append(idsIC, idsIIV) + } + + // items.CollectionFormat: "multi" + idsIS := swag.JoinByFormat(idsIC, "multi") + + return idsIS +} diff --git a/falcon/client/falcon_id/get_third_party_passkey_registry_responses.go b/falcon/client/falcon_id/get_third_party_passkey_registry_responses.go new file mode 100644 index 000000000..85f3c1f5a --- /dev/null +++ b/falcon/client/falcon_id/get_third_party_passkey_registry_responses.go @@ -0,0 +1,742 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package falcon_id + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// GetThirdPartyPasskeyRegistryReader is a Reader for the GetThirdPartyPasskeyRegistry structure. +type GetThirdPartyPasskeyRegistryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetThirdPartyPasskeyRegistryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetThirdPartyPasskeyRegistryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGetThirdPartyPasskeyRegistryBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewGetThirdPartyPasskeyRegistryUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetThirdPartyPasskeyRegistryForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewGetThirdPartyPasskeyRegistryTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetThirdPartyPasskeyRegistryInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /falcon-id/entities/third-party-passkeys/v1] GetThirdPartyPasskeyRegistry", response, response.Code()) + } +} + +// NewGetThirdPartyPasskeyRegistryOK creates a GetThirdPartyPasskeyRegistryOK with default headers values +func NewGetThirdPartyPasskeyRegistryOK() *GetThirdPartyPasskeyRegistryOK { + return &GetThirdPartyPasskeyRegistryOK{} +} + +/* +GetThirdPartyPasskeyRegistryOK describes a response with status code 200, with default header values. + +OK +*/ +type GetThirdPartyPasskeyRegistryOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryGetResponseV1 +} + +// IsSuccess returns true when this get third party passkey registry o k response has a 2xx status code +func (o *GetThirdPartyPasskeyRegistryOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get third party passkey registry o k response has a 3xx status code +func (o *GetThirdPartyPasskeyRegistryOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get third party passkey registry o k response has a 4xx status code +func (o *GetThirdPartyPasskeyRegistryOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get third party passkey registry o k response has a 5xx status code +func (o *GetThirdPartyPasskeyRegistryOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get third party passkey registry o k response a status code equal to that given +func (o *GetThirdPartyPasskeyRegistryOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get third party passkey registry o k response +func (o *GetThirdPartyPasskeyRegistryOK) Code() int { + return 200 +} + +func (o *GetThirdPartyPasskeyRegistryOK) Error() string { + return fmt.Sprintf("[GET /falcon-id/entities/third-party-passkeys/v1][%d] getThirdPartyPasskeyRegistryOK %+v", 200, o.Payload) +} + +func (o *GetThirdPartyPasskeyRegistryOK) String() string { + return fmt.Sprintf("[GET /falcon-id/entities/third-party-passkeys/v1][%d] getThirdPartyPasskeyRegistryOK %+v", 200, o.Payload) +} + +func (o *GetThirdPartyPasskeyRegistryOK) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryGetResponseV1 { + return o.Payload +} + +func (o *GetThirdPartyPasskeyRegistryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryGetResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetThirdPartyPasskeyRegistryBadRequest creates a GetThirdPartyPasskeyRegistryBadRequest with default headers values +func NewGetThirdPartyPasskeyRegistryBadRequest() *GetThirdPartyPasskeyRegistryBadRequest { + return &GetThirdPartyPasskeyRegistryBadRequest{} +} + +/* +GetThirdPartyPasskeyRegistryBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GetThirdPartyPasskeyRegistryBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryGetResponseV1 +} + +// IsSuccess returns true when this get third party passkey registry bad request response has a 2xx status code +func (o *GetThirdPartyPasskeyRegistryBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get third party passkey registry bad request response has a 3xx status code +func (o *GetThirdPartyPasskeyRegistryBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get third party passkey registry bad request response has a 4xx status code +func (o *GetThirdPartyPasskeyRegistryBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this get third party passkey registry bad request response has a 5xx status code +func (o *GetThirdPartyPasskeyRegistryBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this get third party passkey registry bad request response a status code equal to that given +func (o *GetThirdPartyPasskeyRegistryBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the get third party passkey registry bad request response +func (o *GetThirdPartyPasskeyRegistryBadRequest) Code() int { + return 400 +} + +func (o *GetThirdPartyPasskeyRegistryBadRequest) Error() string { + return fmt.Sprintf("[GET /falcon-id/entities/third-party-passkeys/v1][%d] getThirdPartyPasskeyRegistryBadRequest %+v", 400, o.Payload) +} + +func (o *GetThirdPartyPasskeyRegistryBadRequest) String() string { + return fmt.Sprintf("[GET /falcon-id/entities/third-party-passkeys/v1][%d] getThirdPartyPasskeyRegistryBadRequest %+v", 400, o.Payload) +} + +func (o *GetThirdPartyPasskeyRegistryBadRequest) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryGetResponseV1 { + return o.Payload +} + +func (o *GetThirdPartyPasskeyRegistryBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryGetResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetThirdPartyPasskeyRegistryUnauthorized creates a GetThirdPartyPasskeyRegistryUnauthorized with default headers values +func NewGetThirdPartyPasskeyRegistryUnauthorized() *GetThirdPartyPasskeyRegistryUnauthorized { + return &GetThirdPartyPasskeyRegistryUnauthorized{} +} + +/* +GetThirdPartyPasskeyRegistryUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type GetThirdPartyPasskeyRegistryUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryGetResponseV1 +} + +// IsSuccess returns true when this get third party passkey registry unauthorized response has a 2xx status code +func (o *GetThirdPartyPasskeyRegistryUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get third party passkey registry unauthorized response has a 3xx status code +func (o *GetThirdPartyPasskeyRegistryUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get third party passkey registry unauthorized response has a 4xx status code +func (o *GetThirdPartyPasskeyRegistryUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get third party passkey registry unauthorized response has a 5xx status code +func (o *GetThirdPartyPasskeyRegistryUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get third party passkey registry unauthorized response a status code equal to that given +func (o *GetThirdPartyPasskeyRegistryUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get third party passkey registry unauthorized response +func (o *GetThirdPartyPasskeyRegistryUnauthorized) Code() int { + return 401 +} + +func (o *GetThirdPartyPasskeyRegistryUnauthorized) Error() string { + return fmt.Sprintf("[GET /falcon-id/entities/third-party-passkeys/v1][%d] getThirdPartyPasskeyRegistryUnauthorized %+v", 401, o.Payload) +} + +func (o *GetThirdPartyPasskeyRegistryUnauthorized) String() string { + return fmt.Sprintf("[GET /falcon-id/entities/third-party-passkeys/v1][%d] getThirdPartyPasskeyRegistryUnauthorized %+v", 401, o.Payload) +} + +func (o *GetThirdPartyPasskeyRegistryUnauthorized) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryGetResponseV1 { + return o.Payload +} + +func (o *GetThirdPartyPasskeyRegistryUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryGetResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetThirdPartyPasskeyRegistryForbidden creates a GetThirdPartyPasskeyRegistryForbidden with default headers values +func NewGetThirdPartyPasskeyRegistryForbidden() *GetThirdPartyPasskeyRegistryForbidden { + return &GetThirdPartyPasskeyRegistryForbidden{} +} + +/* +GetThirdPartyPasskeyRegistryForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GetThirdPartyPasskeyRegistryForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get third party passkey registry forbidden response has a 2xx status code +func (o *GetThirdPartyPasskeyRegistryForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get third party passkey registry forbidden response has a 3xx status code +func (o *GetThirdPartyPasskeyRegistryForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get third party passkey registry forbidden response has a 4xx status code +func (o *GetThirdPartyPasskeyRegistryForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get third party passkey registry forbidden response has a 5xx status code +func (o *GetThirdPartyPasskeyRegistryForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get third party passkey registry forbidden response a status code equal to that given +func (o *GetThirdPartyPasskeyRegistryForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get third party passkey registry forbidden response +func (o *GetThirdPartyPasskeyRegistryForbidden) Code() int { + return 403 +} + +func (o *GetThirdPartyPasskeyRegistryForbidden) Error() string { + return fmt.Sprintf("[GET /falcon-id/entities/third-party-passkeys/v1][%d] getThirdPartyPasskeyRegistryForbidden %+v", 403, o.Payload) +} + +func (o *GetThirdPartyPasskeyRegistryForbidden) String() string { + return fmt.Sprintf("[GET /falcon-id/entities/third-party-passkeys/v1][%d] getThirdPartyPasskeyRegistryForbidden %+v", 403, o.Payload) +} + +func (o *GetThirdPartyPasskeyRegistryForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetThirdPartyPasskeyRegistryForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetThirdPartyPasskeyRegistryTooManyRequests creates a GetThirdPartyPasskeyRegistryTooManyRequests with default headers values +func NewGetThirdPartyPasskeyRegistryTooManyRequests() *GetThirdPartyPasskeyRegistryTooManyRequests { + return &GetThirdPartyPasskeyRegistryTooManyRequests{} +} + +/* +GetThirdPartyPasskeyRegistryTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type GetThirdPartyPasskeyRegistryTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get third party passkey registry too many requests response has a 2xx status code +func (o *GetThirdPartyPasskeyRegistryTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get third party passkey registry too many requests response has a 3xx status code +func (o *GetThirdPartyPasskeyRegistryTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get third party passkey registry too many requests response has a 4xx status code +func (o *GetThirdPartyPasskeyRegistryTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this get third party passkey registry too many requests response has a 5xx status code +func (o *GetThirdPartyPasskeyRegistryTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this get third party passkey registry too many requests response a status code equal to that given +func (o *GetThirdPartyPasskeyRegistryTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the get third party passkey registry too many requests response +func (o *GetThirdPartyPasskeyRegistryTooManyRequests) Code() int { + return 429 +} + +func (o *GetThirdPartyPasskeyRegistryTooManyRequests) Error() string { + return fmt.Sprintf("[GET /falcon-id/entities/third-party-passkeys/v1][%d] getThirdPartyPasskeyRegistryTooManyRequests %+v", 429, o.Payload) +} + +func (o *GetThirdPartyPasskeyRegistryTooManyRequests) String() string { + return fmt.Sprintf("[GET /falcon-id/entities/third-party-passkeys/v1][%d] getThirdPartyPasskeyRegistryTooManyRequests %+v", 429, o.Payload) +} + +func (o *GetThirdPartyPasskeyRegistryTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetThirdPartyPasskeyRegistryTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetThirdPartyPasskeyRegistryInternalServerError creates a GetThirdPartyPasskeyRegistryInternalServerError with default headers values +func NewGetThirdPartyPasskeyRegistryInternalServerError() *GetThirdPartyPasskeyRegistryInternalServerError { + return &GetThirdPartyPasskeyRegistryInternalServerError{} +} + +/* +GetThirdPartyPasskeyRegistryInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GetThirdPartyPasskeyRegistryInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryGetResponseV1 +} + +// IsSuccess returns true when this get third party passkey registry internal server error response has a 2xx status code +func (o *GetThirdPartyPasskeyRegistryInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get third party passkey registry internal server error response has a 3xx status code +func (o *GetThirdPartyPasskeyRegistryInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get third party passkey registry internal server error response has a 4xx status code +func (o *GetThirdPartyPasskeyRegistryInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get third party passkey registry internal server error response has a 5xx status code +func (o *GetThirdPartyPasskeyRegistryInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get third party passkey registry internal server error response a status code equal to that given +func (o *GetThirdPartyPasskeyRegistryInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get third party passkey registry internal server error response +func (o *GetThirdPartyPasskeyRegistryInternalServerError) Code() int { + return 500 +} + +func (o *GetThirdPartyPasskeyRegistryInternalServerError) Error() string { + return fmt.Sprintf("[GET /falcon-id/entities/third-party-passkeys/v1][%d] getThirdPartyPasskeyRegistryInternalServerError %+v", 500, o.Payload) +} + +func (o *GetThirdPartyPasskeyRegistryInternalServerError) String() string { + return fmt.Sprintf("[GET /falcon-id/entities/third-party-passkeys/v1][%d] getThirdPartyPasskeyRegistryInternalServerError %+v", 500, o.Payload) +} + +func (o *GetThirdPartyPasskeyRegistryInternalServerError) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryGetResponseV1 { + return o.Payload +} + +func (o *GetThirdPartyPasskeyRegistryInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryGetResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/falcon_id/query_third_party_passkey_registry_parameters.go b/falcon/client/falcon_id/query_third_party_passkey_registry_parameters.go new file mode 100644 index 000000000..be7343e74 --- /dev/null +++ b/falcon/client/falcon_id/query_third_party_passkey_registry_parameters.go @@ -0,0 +1,266 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package falcon_id + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewQueryThirdPartyPasskeyRegistryParams creates a new QueryThirdPartyPasskeyRegistryParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewQueryThirdPartyPasskeyRegistryParams() *QueryThirdPartyPasskeyRegistryParams { + return &QueryThirdPartyPasskeyRegistryParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewQueryThirdPartyPasskeyRegistryParamsWithTimeout creates a new QueryThirdPartyPasskeyRegistryParams object +// with the ability to set a timeout on a request. +func NewQueryThirdPartyPasskeyRegistryParamsWithTimeout(timeout time.Duration) *QueryThirdPartyPasskeyRegistryParams { + return &QueryThirdPartyPasskeyRegistryParams{ + timeout: timeout, + } +} + +// NewQueryThirdPartyPasskeyRegistryParamsWithContext creates a new QueryThirdPartyPasskeyRegistryParams object +// with the ability to set a context for a request. +func NewQueryThirdPartyPasskeyRegistryParamsWithContext(ctx context.Context) *QueryThirdPartyPasskeyRegistryParams { + return &QueryThirdPartyPasskeyRegistryParams{ + Context: ctx, + } +} + +// NewQueryThirdPartyPasskeyRegistryParamsWithHTTPClient creates a new QueryThirdPartyPasskeyRegistryParams object +// with the ability to set a custom HTTPClient for a request. +func NewQueryThirdPartyPasskeyRegistryParamsWithHTTPClient(client *http.Client) *QueryThirdPartyPasskeyRegistryParams { + return &QueryThirdPartyPasskeyRegistryParams{ + HTTPClient: client, + } +} + +/* +QueryThirdPartyPasskeyRegistryParams contains all the parameters to send to the API endpoint + + for the query third party passkey registry operation. + + Typically these are written to a http.Request. +*/ +type QueryThirdPartyPasskeyRegistryParams struct { + + /* Filter. + + FQL filter + */ + Filter *string + + /* Limit. + + Paging limit + */ + Limit *int64 + + /* Offset. + + Paging offset + */ + Offset *int64 + + /* Sort. + + Sorting field and direction + */ + Sort *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the query third party passkey registry params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *QueryThirdPartyPasskeyRegistryParams) WithDefaults() *QueryThirdPartyPasskeyRegistryParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the query third party passkey registry params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *QueryThirdPartyPasskeyRegistryParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) WithTimeout(timeout time.Duration) *QueryThirdPartyPasskeyRegistryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) WithContext(ctx context.Context) *QueryThirdPartyPasskeyRegistryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) WithHTTPClient(client *http.Client) *QueryThirdPartyPasskeyRegistryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilter adds the filter to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) WithFilter(filter *string) *QueryThirdPartyPasskeyRegistryParams { + o.SetFilter(filter) + return o +} + +// SetFilter adds the filter to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) SetFilter(filter *string) { + o.Filter = filter +} + +// WithLimit adds the limit to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) WithLimit(limit *int64) *QueryThirdPartyPasskeyRegistryParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) WithOffset(offset *int64) *QueryThirdPartyPasskeyRegistryParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithSort adds the sort to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) WithSort(sort *string) *QueryThirdPartyPasskeyRegistryParams { + o.SetSort(sort) + return o +} + +// SetSort adds the sort to the query third party passkey registry params +func (o *QueryThirdPartyPasskeyRegistryParams) SetSort(sort *string) { + o.Sort = sort +} + +// WriteToRequest writes these params to a swagger request +func (o *QueryThirdPartyPasskeyRegistryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filter != nil { + + // query param filter + var qrFilter string + + if o.Filter != nil { + qrFilter = *o.Filter + } + qFilter := qrFilter + if qFilter != "" { + + if err := r.SetQueryParam("filter", qFilter); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Sort != nil { + + // query param sort + var qrSort string + + if o.Sort != nil { + qrSort = *o.Sort + } + qSort := qrSort + if qSort != "" { + + if err := r.SetQueryParam("sort", qSort); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/falcon_id/query_third_party_passkey_registry_responses.go b/falcon/client/falcon_id/query_third_party_passkey_registry_responses.go new file mode 100644 index 000000000..d6852a9cf --- /dev/null +++ b/falcon/client/falcon_id/query_third_party_passkey_registry_responses.go @@ -0,0 +1,742 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package falcon_id + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// QueryThirdPartyPasskeyRegistryReader is a Reader for the QueryThirdPartyPasskeyRegistry structure. +type QueryThirdPartyPasskeyRegistryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *QueryThirdPartyPasskeyRegistryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewQueryThirdPartyPasskeyRegistryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewQueryThirdPartyPasskeyRegistryBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewQueryThirdPartyPasskeyRegistryUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewQueryThirdPartyPasskeyRegistryForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewQueryThirdPartyPasskeyRegistryTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewQueryThirdPartyPasskeyRegistryInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /falcon-id/queries/third-party-passkeys/v1] QueryThirdPartyPasskeyRegistry", response, response.Code()) + } +} + +// NewQueryThirdPartyPasskeyRegistryOK creates a QueryThirdPartyPasskeyRegistryOK with default headers values +func NewQueryThirdPartyPasskeyRegistryOK() *QueryThirdPartyPasskeyRegistryOK { + return &QueryThirdPartyPasskeyRegistryOK{} +} + +/* +QueryThirdPartyPasskeyRegistryOK describes a response with status code 200, with default header values. + +OK +*/ +type QueryThirdPartyPasskeyRegistryOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryQueryResponseV1 +} + +// IsSuccess returns true when this query third party passkey registry o k response has a 2xx status code +func (o *QueryThirdPartyPasskeyRegistryOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this query third party passkey registry o k response has a 3xx status code +func (o *QueryThirdPartyPasskeyRegistryOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query third party passkey registry o k response has a 4xx status code +func (o *QueryThirdPartyPasskeyRegistryOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this query third party passkey registry o k response has a 5xx status code +func (o *QueryThirdPartyPasskeyRegistryOK) IsServerError() bool { + return false +} + +// IsCode returns true when this query third party passkey registry o k response a status code equal to that given +func (o *QueryThirdPartyPasskeyRegistryOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the query third party passkey registry o k response +func (o *QueryThirdPartyPasskeyRegistryOK) Code() int { + return 200 +} + +func (o *QueryThirdPartyPasskeyRegistryOK) Error() string { + return fmt.Sprintf("[GET /falcon-id/queries/third-party-passkeys/v1][%d] queryThirdPartyPasskeyRegistryOK %+v", 200, o.Payload) +} + +func (o *QueryThirdPartyPasskeyRegistryOK) String() string { + return fmt.Sprintf("[GET /falcon-id/queries/third-party-passkeys/v1][%d] queryThirdPartyPasskeyRegistryOK %+v", 200, o.Payload) +} + +func (o *QueryThirdPartyPasskeyRegistryOK) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryQueryResponseV1 { + return o.Payload +} + +func (o *QueryThirdPartyPasskeyRegistryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryThirdPartyPasskeyRegistryBadRequest creates a QueryThirdPartyPasskeyRegistryBadRequest with default headers values +func NewQueryThirdPartyPasskeyRegistryBadRequest() *QueryThirdPartyPasskeyRegistryBadRequest { + return &QueryThirdPartyPasskeyRegistryBadRequest{} +} + +/* +QueryThirdPartyPasskeyRegistryBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type QueryThirdPartyPasskeyRegistryBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryQueryResponseV1 +} + +// IsSuccess returns true when this query third party passkey registry bad request response has a 2xx status code +func (o *QueryThirdPartyPasskeyRegistryBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query third party passkey registry bad request response has a 3xx status code +func (o *QueryThirdPartyPasskeyRegistryBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query third party passkey registry bad request response has a 4xx status code +func (o *QueryThirdPartyPasskeyRegistryBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this query third party passkey registry bad request response has a 5xx status code +func (o *QueryThirdPartyPasskeyRegistryBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this query third party passkey registry bad request response a status code equal to that given +func (o *QueryThirdPartyPasskeyRegistryBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the query third party passkey registry bad request response +func (o *QueryThirdPartyPasskeyRegistryBadRequest) Code() int { + return 400 +} + +func (o *QueryThirdPartyPasskeyRegistryBadRequest) Error() string { + return fmt.Sprintf("[GET /falcon-id/queries/third-party-passkeys/v1][%d] queryThirdPartyPasskeyRegistryBadRequest %+v", 400, o.Payload) +} + +func (o *QueryThirdPartyPasskeyRegistryBadRequest) String() string { + return fmt.Sprintf("[GET /falcon-id/queries/third-party-passkeys/v1][%d] queryThirdPartyPasskeyRegistryBadRequest %+v", 400, o.Payload) +} + +func (o *QueryThirdPartyPasskeyRegistryBadRequest) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryQueryResponseV1 { + return o.Payload +} + +func (o *QueryThirdPartyPasskeyRegistryBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryThirdPartyPasskeyRegistryUnauthorized creates a QueryThirdPartyPasskeyRegistryUnauthorized with default headers values +func NewQueryThirdPartyPasskeyRegistryUnauthorized() *QueryThirdPartyPasskeyRegistryUnauthorized { + return &QueryThirdPartyPasskeyRegistryUnauthorized{} +} + +/* +QueryThirdPartyPasskeyRegistryUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type QueryThirdPartyPasskeyRegistryUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryQueryResponseV1 +} + +// IsSuccess returns true when this query third party passkey registry unauthorized response has a 2xx status code +func (o *QueryThirdPartyPasskeyRegistryUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query third party passkey registry unauthorized response has a 3xx status code +func (o *QueryThirdPartyPasskeyRegistryUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query third party passkey registry unauthorized response has a 4xx status code +func (o *QueryThirdPartyPasskeyRegistryUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this query third party passkey registry unauthorized response has a 5xx status code +func (o *QueryThirdPartyPasskeyRegistryUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this query third party passkey registry unauthorized response a status code equal to that given +func (o *QueryThirdPartyPasskeyRegistryUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the query third party passkey registry unauthorized response +func (o *QueryThirdPartyPasskeyRegistryUnauthorized) Code() int { + return 401 +} + +func (o *QueryThirdPartyPasskeyRegistryUnauthorized) Error() string { + return fmt.Sprintf("[GET /falcon-id/queries/third-party-passkeys/v1][%d] queryThirdPartyPasskeyRegistryUnauthorized %+v", 401, o.Payload) +} + +func (o *QueryThirdPartyPasskeyRegistryUnauthorized) String() string { + return fmt.Sprintf("[GET /falcon-id/queries/third-party-passkeys/v1][%d] queryThirdPartyPasskeyRegistryUnauthorized %+v", 401, o.Payload) +} + +func (o *QueryThirdPartyPasskeyRegistryUnauthorized) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryQueryResponseV1 { + return o.Payload +} + +func (o *QueryThirdPartyPasskeyRegistryUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryThirdPartyPasskeyRegistryForbidden creates a QueryThirdPartyPasskeyRegistryForbidden with default headers values +func NewQueryThirdPartyPasskeyRegistryForbidden() *QueryThirdPartyPasskeyRegistryForbidden { + return &QueryThirdPartyPasskeyRegistryForbidden{} +} + +/* +QueryThirdPartyPasskeyRegistryForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type QueryThirdPartyPasskeyRegistryForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this query third party passkey registry forbidden response has a 2xx status code +func (o *QueryThirdPartyPasskeyRegistryForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query third party passkey registry forbidden response has a 3xx status code +func (o *QueryThirdPartyPasskeyRegistryForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query third party passkey registry forbidden response has a 4xx status code +func (o *QueryThirdPartyPasskeyRegistryForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this query third party passkey registry forbidden response has a 5xx status code +func (o *QueryThirdPartyPasskeyRegistryForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this query third party passkey registry forbidden response a status code equal to that given +func (o *QueryThirdPartyPasskeyRegistryForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the query third party passkey registry forbidden response +func (o *QueryThirdPartyPasskeyRegistryForbidden) Code() int { + return 403 +} + +func (o *QueryThirdPartyPasskeyRegistryForbidden) Error() string { + return fmt.Sprintf("[GET /falcon-id/queries/third-party-passkeys/v1][%d] queryThirdPartyPasskeyRegistryForbidden %+v", 403, o.Payload) +} + +func (o *QueryThirdPartyPasskeyRegistryForbidden) String() string { + return fmt.Sprintf("[GET /falcon-id/queries/third-party-passkeys/v1][%d] queryThirdPartyPasskeyRegistryForbidden %+v", 403, o.Payload) +} + +func (o *QueryThirdPartyPasskeyRegistryForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *QueryThirdPartyPasskeyRegistryForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryThirdPartyPasskeyRegistryTooManyRequests creates a QueryThirdPartyPasskeyRegistryTooManyRequests with default headers values +func NewQueryThirdPartyPasskeyRegistryTooManyRequests() *QueryThirdPartyPasskeyRegistryTooManyRequests { + return &QueryThirdPartyPasskeyRegistryTooManyRequests{} +} + +/* +QueryThirdPartyPasskeyRegistryTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type QueryThirdPartyPasskeyRegistryTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this query third party passkey registry too many requests response has a 2xx status code +func (o *QueryThirdPartyPasskeyRegistryTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query third party passkey registry too many requests response has a 3xx status code +func (o *QueryThirdPartyPasskeyRegistryTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query third party passkey registry too many requests response has a 4xx status code +func (o *QueryThirdPartyPasskeyRegistryTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this query third party passkey registry too many requests response has a 5xx status code +func (o *QueryThirdPartyPasskeyRegistryTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this query third party passkey registry too many requests response a status code equal to that given +func (o *QueryThirdPartyPasskeyRegistryTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the query third party passkey registry too many requests response +func (o *QueryThirdPartyPasskeyRegistryTooManyRequests) Code() int { + return 429 +} + +func (o *QueryThirdPartyPasskeyRegistryTooManyRequests) Error() string { + return fmt.Sprintf("[GET /falcon-id/queries/third-party-passkeys/v1][%d] queryThirdPartyPasskeyRegistryTooManyRequests %+v", 429, o.Payload) +} + +func (o *QueryThirdPartyPasskeyRegistryTooManyRequests) String() string { + return fmt.Sprintf("[GET /falcon-id/queries/third-party-passkeys/v1][%d] queryThirdPartyPasskeyRegistryTooManyRequests %+v", 429, o.Payload) +} + +func (o *QueryThirdPartyPasskeyRegistryTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *QueryThirdPartyPasskeyRegistryTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryThirdPartyPasskeyRegistryInternalServerError creates a QueryThirdPartyPasskeyRegistryInternalServerError with default headers values +func NewQueryThirdPartyPasskeyRegistryInternalServerError() *QueryThirdPartyPasskeyRegistryInternalServerError { + return &QueryThirdPartyPasskeyRegistryInternalServerError{} +} + +/* +QueryThirdPartyPasskeyRegistryInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type QueryThirdPartyPasskeyRegistryInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryQueryResponseV1 +} + +// IsSuccess returns true when this query third party passkey registry internal server error response has a 2xx status code +func (o *QueryThirdPartyPasskeyRegistryInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query third party passkey registry internal server error response has a 3xx status code +func (o *QueryThirdPartyPasskeyRegistryInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query third party passkey registry internal server error response has a 4xx status code +func (o *QueryThirdPartyPasskeyRegistryInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this query third party passkey registry internal server error response has a 5xx status code +func (o *QueryThirdPartyPasskeyRegistryInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this query third party passkey registry internal server error response a status code equal to that given +func (o *QueryThirdPartyPasskeyRegistryInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the query third party passkey registry internal server error response +func (o *QueryThirdPartyPasskeyRegistryInternalServerError) Code() int { + return 500 +} + +func (o *QueryThirdPartyPasskeyRegistryInternalServerError) Error() string { + return fmt.Sprintf("[GET /falcon-id/queries/third-party-passkeys/v1][%d] queryThirdPartyPasskeyRegistryInternalServerError %+v", 500, o.Payload) +} + +func (o *QueryThirdPartyPasskeyRegistryInternalServerError) String() string { + return fmt.Sprintf("[GET /falcon-id/queries/third-party-passkeys/v1][%d] queryThirdPartyPasskeyRegistryInternalServerError %+v", 500, o.Payload) +} + +func (o *QueryThirdPartyPasskeyRegistryInternalServerError) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryQueryResponseV1 { + return o.Payload +} + +func (o *QueryThirdPartyPasskeyRegistryInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/falcon_id/update_third_party_passkey_registry_parameters.go b/falcon/client/falcon_id/update_third_party_passkey_registry_parameters.go new file mode 100644 index 000000000..2e8673186 --- /dev/null +++ b/falcon/client/falcon_id/update_third_party_passkey_registry_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package falcon_id + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewUpdateThirdPartyPasskeyRegistryParams creates a new UpdateThirdPartyPasskeyRegistryParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUpdateThirdPartyPasskeyRegistryParams() *UpdateThirdPartyPasskeyRegistryParams { + return &UpdateThirdPartyPasskeyRegistryParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUpdateThirdPartyPasskeyRegistryParamsWithTimeout creates a new UpdateThirdPartyPasskeyRegistryParams object +// with the ability to set a timeout on a request. +func NewUpdateThirdPartyPasskeyRegistryParamsWithTimeout(timeout time.Duration) *UpdateThirdPartyPasskeyRegistryParams { + return &UpdateThirdPartyPasskeyRegistryParams{ + timeout: timeout, + } +} + +// NewUpdateThirdPartyPasskeyRegistryParamsWithContext creates a new UpdateThirdPartyPasskeyRegistryParams object +// with the ability to set a context for a request. +func NewUpdateThirdPartyPasskeyRegistryParamsWithContext(ctx context.Context) *UpdateThirdPartyPasskeyRegistryParams { + return &UpdateThirdPartyPasskeyRegistryParams{ + Context: ctx, + } +} + +// NewUpdateThirdPartyPasskeyRegistryParamsWithHTTPClient creates a new UpdateThirdPartyPasskeyRegistryParams object +// with the ability to set a custom HTTPClient for a request. +func NewUpdateThirdPartyPasskeyRegistryParamsWithHTTPClient(client *http.Client) *UpdateThirdPartyPasskeyRegistryParams { + return &UpdateThirdPartyPasskeyRegistryParams{ + HTTPClient: client, + } +} + +/* +UpdateThirdPartyPasskeyRegistryParams contains all the parameters to send to the API endpoint + + for the update third party passkey registry operation. + + Typically these are written to a http.Request. +*/ +type UpdateThirdPartyPasskeyRegistryParams struct { + + // Body. + Body []*models.FalconidapiThirdPartyPasskeyRegistryPatchRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the update third party passkey registry params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateThirdPartyPasskeyRegistryParams) WithDefaults() *UpdateThirdPartyPasskeyRegistryParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the update third party passkey registry params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateThirdPartyPasskeyRegistryParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the update third party passkey registry params +func (o *UpdateThirdPartyPasskeyRegistryParams) WithTimeout(timeout time.Duration) *UpdateThirdPartyPasskeyRegistryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the update third party passkey registry params +func (o *UpdateThirdPartyPasskeyRegistryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the update third party passkey registry params +func (o *UpdateThirdPartyPasskeyRegistryParams) WithContext(ctx context.Context) *UpdateThirdPartyPasskeyRegistryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the update third party passkey registry params +func (o *UpdateThirdPartyPasskeyRegistryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the update third party passkey registry params +func (o *UpdateThirdPartyPasskeyRegistryParams) WithHTTPClient(client *http.Client) *UpdateThirdPartyPasskeyRegistryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the update third party passkey registry params +func (o *UpdateThirdPartyPasskeyRegistryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the update third party passkey registry params +func (o *UpdateThirdPartyPasskeyRegistryParams) WithBody(body []*models.FalconidapiThirdPartyPasskeyRegistryPatchRequestV1) *UpdateThirdPartyPasskeyRegistryParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the update third party passkey registry params +func (o *UpdateThirdPartyPasskeyRegistryParams) SetBody(body []*models.FalconidapiThirdPartyPasskeyRegistryPatchRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *UpdateThirdPartyPasskeyRegistryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/falcon_id/update_third_party_passkey_registry_responses.go b/falcon/client/falcon_id/update_third_party_passkey_registry_responses.go new file mode 100644 index 000000000..ed8185494 --- /dev/null +++ b/falcon/client/falcon_id/update_third_party_passkey_registry_responses.go @@ -0,0 +1,742 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package falcon_id + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// UpdateThirdPartyPasskeyRegistryReader is a Reader for the UpdateThirdPartyPasskeyRegistry structure. +type UpdateThirdPartyPasskeyRegistryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateThirdPartyPasskeyRegistryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUpdateThirdPartyPasskeyRegistryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewUpdateThirdPartyPasskeyRegistryBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewUpdateThirdPartyPasskeyRegistryUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewUpdateThirdPartyPasskeyRegistryForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewUpdateThirdPartyPasskeyRegistryTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUpdateThirdPartyPasskeyRegistryInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[PATCH /falcon-id/entities/third-party-passkeys/v1] UpdateThirdPartyPasskeyRegistry", response, response.Code()) + } +} + +// NewUpdateThirdPartyPasskeyRegistryOK creates a UpdateThirdPartyPasskeyRegistryOK with default headers values +func NewUpdateThirdPartyPasskeyRegistryOK() *UpdateThirdPartyPasskeyRegistryOK { + return &UpdateThirdPartyPasskeyRegistryOK{} +} + +/* +UpdateThirdPartyPasskeyRegistryOK describes a response with status code 200, with default header values. + +OK +*/ +type UpdateThirdPartyPasskeyRegistryOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryPatchResponseV1 +} + +// IsSuccess returns true when this update third party passkey registry o k response has a 2xx status code +func (o *UpdateThirdPartyPasskeyRegistryOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update third party passkey registry o k response has a 3xx status code +func (o *UpdateThirdPartyPasskeyRegistryOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update third party passkey registry o k response has a 4xx status code +func (o *UpdateThirdPartyPasskeyRegistryOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update third party passkey registry o k response has a 5xx status code +func (o *UpdateThirdPartyPasskeyRegistryOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update third party passkey registry o k response a status code equal to that given +func (o *UpdateThirdPartyPasskeyRegistryOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the update third party passkey registry o k response +func (o *UpdateThirdPartyPasskeyRegistryOK) Code() int { + return 200 +} + +func (o *UpdateThirdPartyPasskeyRegistryOK) Error() string { + return fmt.Sprintf("[PATCH /falcon-id/entities/third-party-passkeys/v1][%d] updateThirdPartyPasskeyRegistryOK %+v", 200, o.Payload) +} + +func (o *UpdateThirdPartyPasskeyRegistryOK) String() string { + return fmt.Sprintf("[PATCH /falcon-id/entities/third-party-passkeys/v1][%d] updateThirdPartyPasskeyRegistryOK %+v", 200, o.Payload) +} + +func (o *UpdateThirdPartyPasskeyRegistryOK) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryPatchResponseV1 { + return o.Payload +} + +func (o *UpdateThirdPartyPasskeyRegistryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateThirdPartyPasskeyRegistryBadRequest creates a UpdateThirdPartyPasskeyRegistryBadRequest with default headers values +func NewUpdateThirdPartyPasskeyRegistryBadRequest() *UpdateThirdPartyPasskeyRegistryBadRequest { + return &UpdateThirdPartyPasskeyRegistryBadRequest{} +} + +/* +UpdateThirdPartyPasskeyRegistryBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type UpdateThirdPartyPasskeyRegistryBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryPatchResponseV1 +} + +// IsSuccess returns true when this update third party passkey registry bad request response has a 2xx status code +func (o *UpdateThirdPartyPasskeyRegistryBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update third party passkey registry bad request response has a 3xx status code +func (o *UpdateThirdPartyPasskeyRegistryBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update third party passkey registry bad request response has a 4xx status code +func (o *UpdateThirdPartyPasskeyRegistryBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this update third party passkey registry bad request response has a 5xx status code +func (o *UpdateThirdPartyPasskeyRegistryBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this update third party passkey registry bad request response a status code equal to that given +func (o *UpdateThirdPartyPasskeyRegistryBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the update third party passkey registry bad request response +func (o *UpdateThirdPartyPasskeyRegistryBadRequest) Code() int { + return 400 +} + +func (o *UpdateThirdPartyPasskeyRegistryBadRequest) Error() string { + return fmt.Sprintf("[PATCH /falcon-id/entities/third-party-passkeys/v1][%d] updateThirdPartyPasskeyRegistryBadRequest %+v", 400, o.Payload) +} + +func (o *UpdateThirdPartyPasskeyRegistryBadRequest) String() string { + return fmt.Sprintf("[PATCH /falcon-id/entities/third-party-passkeys/v1][%d] updateThirdPartyPasskeyRegistryBadRequest %+v", 400, o.Payload) +} + +func (o *UpdateThirdPartyPasskeyRegistryBadRequest) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryPatchResponseV1 { + return o.Payload +} + +func (o *UpdateThirdPartyPasskeyRegistryBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateThirdPartyPasskeyRegistryUnauthorized creates a UpdateThirdPartyPasskeyRegistryUnauthorized with default headers values +func NewUpdateThirdPartyPasskeyRegistryUnauthorized() *UpdateThirdPartyPasskeyRegistryUnauthorized { + return &UpdateThirdPartyPasskeyRegistryUnauthorized{} +} + +/* +UpdateThirdPartyPasskeyRegistryUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type UpdateThirdPartyPasskeyRegistryUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryPatchResponseV1 +} + +// IsSuccess returns true when this update third party passkey registry unauthorized response has a 2xx status code +func (o *UpdateThirdPartyPasskeyRegistryUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update third party passkey registry unauthorized response has a 3xx status code +func (o *UpdateThirdPartyPasskeyRegistryUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update third party passkey registry unauthorized response has a 4xx status code +func (o *UpdateThirdPartyPasskeyRegistryUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this update third party passkey registry unauthorized response has a 5xx status code +func (o *UpdateThirdPartyPasskeyRegistryUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this update third party passkey registry unauthorized response a status code equal to that given +func (o *UpdateThirdPartyPasskeyRegistryUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the update third party passkey registry unauthorized response +func (o *UpdateThirdPartyPasskeyRegistryUnauthorized) Code() int { + return 401 +} + +func (o *UpdateThirdPartyPasskeyRegistryUnauthorized) Error() string { + return fmt.Sprintf("[PATCH /falcon-id/entities/third-party-passkeys/v1][%d] updateThirdPartyPasskeyRegistryUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateThirdPartyPasskeyRegistryUnauthorized) String() string { + return fmt.Sprintf("[PATCH /falcon-id/entities/third-party-passkeys/v1][%d] updateThirdPartyPasskeyRegistryUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateThirdPartyPasskeyRegistryUnauthorized) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryPatchResponseV1 { + return o.Payload +} + +func (o *UpdateThirdPartyPasskeyRegistryUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateThirdPartyPasskeyRegistryForbidden creates a UpdateThirdPartyPasskeyRegistryForbidden with default headers values +func NewUpdateThirdPartyPasskeyRegistryForbidden() *UpdateThirdPartyPasskeyRegistryForbidden { + return &UpdateThirdPartyPasskeyRegistryForbidden{} +} + +/* +UpdateThirdPartyPasskeyRegistryForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type UpdateThirdPartyPasskeyRegistryForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this update third party passkey registry forbidden response has a 2xx status code +func (o *UpdateThirdPartyPasskeyRegistryForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update third party passkey registry forbidden response has a 3xx status code +func (o *UpdateThirdPartyPasskeyRegistryForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update third party passkey registry forbidden response has a 4xx status code +func (o *UpdateThirdPartyPasskeyRegistryForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this update third party passkey registry forbidden response has a 5xx status code +func (o *UpdateThirdPartyPasskeyRegistryForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this update third party passkey registry forbidden response a status code equal to that given +func (o *UpdateThirdPartyPasskeyRegistryForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the update third party passkey registry forbidden response +func (o *UpdateThirdPartyPasskeyRegistryForbidden) Code() int { + return 403 +} + +func (o *UpdateThirdPartyPasskeyRegistryForbidden) Error() string { + return fmt.Sprintf("[PATCH /falcon-id/entities/third-party-passkeys/v1][%d] updateThirdPartyPasskeyRegistryForbidden %+v", 403, o.Payload) +} + +func (o *UpdateThirdPartyPasskeyRegistryForbidden) String() string { + return fmt.Sprintf("[PATCH /falcon-id/entities/third-party-passkeys/v1][%d] updateThirdPartyPasskeyRegistryForbidden %+v", 403, o.Payload) +} + +func (o *UpdateThirdPartyPasskeyRegistryForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *UpdateThirdPartyPasskeyRegistryForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateThirdPartyPasskeyRegistryTooManyRequests creates a UpdateThirdPartyPasskeyRegistryTooManyRequests with default headers values +func NewUpdateThirdPartyPasskeyRegistryTooManyRequests() *UpdateThirdPartyPasskeyRegistryTooManyRequests { + return &UpdateThirdPartyPasskeyRegistryTooManyRequests{} +} + +/* +UpdateThirdPartyPasskeyRegistryTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type UpdateThirdPartyPasskeyRegistryTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this update third party passkey registry too many requests response has a 2xx status code +func (o *UpdateThirdPartyPasskeyRegistryTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update third party passkey registry too many requests response has a 3xx status code +func (o *UpdateThirdPartyPasskeyRegistryTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update third party passkey registry too many requests response has a 4xx status code +func (o *UpdateThirdPartyPasskeyRegistryTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this update third party passkey registry too many requests response has a 5xx status code +func (o *UpdateThirdPartyPasskeyRegistryTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this update third party passkey registry too many requests response a status code equal to that given +func (o *UpdateThirdPartyPasskeyRegistryTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the update third party passkey registry too many requests response +func (o *UpdateThirdPartyPasskeyRegistryTooManyRequests) Code() int { + return 429 +} + +func (o *UpdateThirdPartyPasskeyRegistryTooManyRequests) Error() string { + return fmt.Sprintf("[PATCH /falcon-id/entities/third-party-passkeys/v1][%d] updateThirdPartyPasskeyRegistryTooManyRequests %+v", 429, o.Payload) +} + +func (o *UpdateThirdPartyPasskeyRegistryTooManyRequests) String() string { + return fmt.Sprintf("[PATCH /falcon-id/entities/third-party-passkeys/v1][%d] updateThirdPartyPasskeyRegistryTooManyRequests %+v", 429, o.Payload) +} + +func (o *UpdateThirdPartyPasskeyRegistryTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *UpdateThirdPartyPasskeyRegistryTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateThirdPartyPasskeyRegistryInternalServerError creates a UpdateThirdPartyPasskeyRegistryInternalServerError with default headers values +func NewUpdateThirdPartyPasskeyRegistryInternalServerError() *UpdateThirdPartyPasskeyRegistryInternalServerError { + return &UpdateThirdPartyPasskeyRegistryInternalServerError{} +} + +/* +UpdateThirdPartyPasskeyRegistryInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type UpdateThirdPartyPasskeyRegistryInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FalconidapiThirdPartyPasskeyRegistryPatchResponseV1 +} + +// IsSuccess returns true when this update third party passkey registry internal server error response has a 2xx status code +func (o *UpdateThirdPartyPasskeyRegistryInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update third party passkey registry internal server error response has a 3xx status code +func (o *UpdateThirdPartyPasskeyRegistryInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update third party passkey registry internal server error response has a 4xx status code +func (o *UpdateThirdPartyPasskeyRegistryInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this update third party passkey registry internal server error response has a 5xx status code +func (o *UpdateThirdPartyPasskeyRegistryInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this update third party passkey registry internal server error response a status code equal to that given +func (o *UpdateThirdPartyPasskeyRegistryInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the update third party passkey registry internal server error response +func (o *UpdateThirdPartyPasskeyRegistryInternalServerError) Code() int { + return 500 +} + +func (o *UpdateThirdPartyPasskeyRegistryInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /falcon-id/entities/third-party-passkeys/v1][%d] updateThirdPartyPasskeyRegistryInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateThirdPartyPasskeyRegistryInternalServerError) String() string { + return fmt.Sprintf("[PATCH /falcon-id/entities/third-party-passkeys/v1][%d] updateThirdPartyPasskeyRegistryInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateThirdPartyPasskeyRegistryInternalServerError) GetPayload() *models.FalconidapiThirdPartyPasskeyRegistryPatchResponseV1 { + return o.Payload +} + +func (o *UpdateThirdPartyPasskeyRegistryInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/falconx_sandbox/submit_parameters.go b/falcon/client/falconx_sandbox/submit_parameters.go index 70e55358f..2333e41f0 100644 --- a/falcon/client/falconx_sandbox/submit_parameters.go +++ b/falcon/client/falconx_sandbox/submit_parameters.go @@ -73,11 +73,12 @@ type SubmitParams struct { Submit either a URL or a sample SHA256 for sandbox analysis. The sample file must have been previously uploaded through `/samples/entities/samples/v2`. You must specify a JSON object that includes the `falconx.SubmissionParametersV1` key/value pairs shown below. - **`environment_id`**: Specifies the sandbox environment used for analysis. Values: + **`environment_id`**: Specifies the sandbox environment used for analysis. Note: Deprecated platform values are still accepted to maintain backward compatibility; however, they will be automatically mapped to their recommended equivalents. It is strongly advised to update any integration scripts to use the current supported platform versions. Values: - - `400`: MacOS Catalina 10.15 - - `300`: Linux Ubuntu 16.04, 64-bit - deprecated - - `310`: Linux Ubuntu 20, 64-bit + - `430`: MacOS Tahoe ARM + - `400`: MacOS Catalina 10.15 - deprecated, will fallback to MacOS Tahoe ARM + - `330`: Linux Ubuntu 24, 64-bit + - `310`: Linux Ubuntu 20, 64-bit - deprecated, will fallback to Linux Ubuntu 24 - `200`: Android (static analysis) - `160`: Windows 10, 64-bit - `140`: Windows 11, 64-bit diff --git a/falcon/client/federated_connections/delete_federated_connections_config_parameters.go b/falcon/client/federated_connections/delete_federated_connections_config_parameters.go new file mode 100644 index 000000000..b060c8e06 --- /dev/null +++ b/falcon/client/federated_connections/delete_federated_connections_config_parameters.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package federated_connections + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteFederatedConnectionsConfigParams creates a new DeleteFederatedConnectionsConfigParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDeleteFederatedConnectionsConfigParams() *DeleteFederatedConnectionsConfigParams { + return &DeleteFederatedConnectionsConfigParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteFederatedConnectionsConfigParamsWithTimeout creates a new DeleteFederatedConnectionsConfigParams object +// with the ability to set a timeout on a request. +func NewDeleteFederatedConnectionsConfigParamsWithTimeout(timeout time.Duration) *DeleteFederatedConnectionsConfigParams { + return &DeleteFederatedConnectionsConfigParams{ + timeout: timeout, + } +} + +// NewDeleteFederatedConnectionsConfigParamsWithContext creates a new DeleteFederatedConnectionsConfigParams object +// with the ability to set a context for a request. +func NewDeleteFederatedConnectionsConfigParamsWithContext(ctx context.Context) *DeleteFederatedConnectionsConfigParams { + return &DeleteFederatedConnectionsConfigParams{ + Context: ctx, + } +} + +// NewDeleteFederatedConnectionsConfigParamsWithHTTPClient creates a new DeleteFederatedConnectionsConfigParams object +// with the ability to set a custom HTTPClient for a request. +func NewDeleteFederatedConnectionsConfigParamsWithHTTPClient(client *http.Client) *DeleteFederatedConnectionsConfigParams { + return &DeleteFederatedConnectionsConfigParams{ + HTTPClient: client, + } +} + +/* +DeleteFederatedConnectionsConfigParams contains all the parameters to send to the API endpoint + + for the delete federated connections config operation. + + Typically these are written to a http.Request. +*/ +type DeleteFederatedConnectionsConfigParams struct { + + /* ConnectionID. + + Connection ID to delete configuration for + */ + ConnectionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the delete federated connections config params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteFederatedConnectionsConfigParams) WithDefaults() *DeleteFederatedConnectionsConfigParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the delete federated connections config params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteFederatedConnectionsConfigParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the delete federated connections config params +func (o *DeleteFederatedConnectionsConfigParams) WithTimeout(timeout time.Duration) *DeleteFederatedConnectionsConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete federated connections config params +func (o *DeleteFederatedConnectionsConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete federated connections config params +func (o *DeleteFederatedConnectionsConfigParams) WithContext(ctx context.Context) *DeleteFederatedConnectionsConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete federated connections config params +func (o *DeleteFederatedConnectionsConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete federated connections config params +func (o *DeleteFederatedConnectionsConfigParams) WithHTTPClient(client *http.Client) *DeleteFederatedConnectionsConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete federated connections config params +func (o *DeleteFederatedConnectionsConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConnectionID adds the connectionID to the delete federated connections config params +func (o *DeleteFederatedConnectionsConfigParams) WithConnectionID(connectionID string) *DeleteFederatedConnectionsConfigParams { + o.SetConnectionID(connectionID) + return o +} + +// SetConnectionID adds the connectionId to the delete federated connections config params +func (o *DeleteFederatedConnectionsConfigParams) SetConnectionID(connectionID string) { + o.ConnectionID = connectionID +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteFederatedConnectionsConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param connection_id + qrConnectionID := o.ConnectionID + qConnectionID := qrConnectionID + if qConnectionID != "" { + + if err := r.SetQueryParam("connection_id", qConnectionID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/federated_connections/delete_federated_connections_config_responses.go b/falcon/client/federated_connections/delete_federated_connections_config_responses.go new file mode 100644 index 000000000..3307d641f --- /dev/null +++ b/falcon/client/federated_connections/delete_federated_connections_config_responses.go @@ -0,0 +1,729 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package federated_connections + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// DeleteFederatedConnectionsConfigReader is a Reader for the DeleteFederatedConnectionsConfig structure. +type DeleteFederatedConnectionsConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteFederatedConnectionsConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDeleteFederatedConnectionsConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewDeleteFederatedConnectionsConfigBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteFederatedConnectionsConfigForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteFederatedConnectionsConfigNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewDeleteFederatedConnectionsConfigTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteFederatedConnectionsConfigInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[DELETE /ngsiem/entities/federated-connections-config/v1] DeleteFederatedConnectionsConfig", response, response.Code()) + } +} + +// NewDeleteFederatedConnectionsConfigNoContent creates a DeleteFederatedConnectionsConfigNoContent with default headers values +func NewDeleteFederatedConnectionsConfigNoContent() *DeleteFederatedConnectionsConfigNoContent { + return &DeleteFederatedConnectionsConfigNoContent{} +} + +/* +DeleteFederatedConnectionsConfigNoContent describes a response with status code 204, with default header values. + +No Content +*/ +type DeleteFederatedConnectionsConfigNoContent struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 +} + +// IsSuccess returns true when this delete federated connections config no content response has a 2xx status code +func (o *DeleteFederatedConnectionsConfigNoContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete federated connections config no content response has a 3xx status code +func (o *DeleteFederatedConnectionsConfigNoContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete federated connections config no content response has a 4xx status code +func (o *DeleteFederatedConnectionsConfigNoContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete federated connections config no content response has a 5xx status code +func (o *DeleteFederatedConnectionsConfigNoContent) IsServerError() bool { + return false +} + +// IsCode returns true when this delete federated connections config no content response a status code equal to that given +func (o *DeleteFederatedConnectionsConfigNoContent) IsCode(code int) bool { + return code == 204 +} + +// Code gets the status code for the delete federated connections config no content response +func (o *DeleteFederatedConnectionsConfigNoContent) Code() int { + return 204 +} + +func (o *DeleteFederatedConnectionsConfigNoContent) Error() string { + return fmt.Sprintf("[DELETE /ngsiem/entities/federated-connections-config/v1][%d] deleteFederatedConnectionsConfigNoContent ", 204) +} + +func (o *DeleteFederatedConnectionsConfigNoContent) String() string { + return fmt.Sprintf("[DELETE /ngsiem/entities/federated-connections-config/v1][%d] deleteFederatedConnectionsConfigNoContent ", 204) +} + +func (o *DeleteFederatedConnectionsConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + return nil +} + +// NewDeleteFederatedConnectionsConfigBadRequest creates a DeleteFederatedConnectionsConfigBadRequest with default headers values +func NewDeleteFederatedConnectionsConfigBadRequest() *DeleteFederatedConnectionsConfigBadRequest { + return &DeleteFederatedConnectionsConfigBadRequest{} +} + +/* +DeleteFederatedConnectionsConfigBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type DeleteFederatedConnectionsConfigBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this delete federated connections config bad request response has a 2xx status code +func (o *DeleteFederatedConnectionsConfigBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete federated connections config bad request response has a 3xx status code +func (o *DeleteFederatedConnectionsConfigBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete federated connections config bad request response has a 4xx status code +func (o *DeleteFederatedConnectionsConfigBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete federated connections config bad request response has a 5xx status code +func (o *DeleteFederatedConnectionsConfigBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this delete federated connections config bad request response a status code equal to that given +func (o *DeleteFederatedConnectionsConfigBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the delete federated connections config bad request response +func (o *DeleteFederatedConnectionsConfigBadRequest) Code() int { + return 400 +} + +func (o *DeleteFederatedConnectionsConfigBadRequest) Error() string { + return fmt.Sprintf("[DELETE /ngsiem/entities/federated-connections-config/v1][%d] deleteFederatedConnectionsConfigBadRequest %+v", 400, o.Payload) +} + +func (o *DeleteFederatedConnectionsConfigBadRequest) String() string { + return fmt.Sprintf("[DELETE /ngsiem/entities/federated-connections-config/v1][%d] deleteFederatedConnectionsConfigBadRequest %+v", 400, o.Payload) +} + +func (o *DeleteFederatedConnectionsConfigBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *DeleteFederatedConnectionsConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteFederatedConnectionsConfigForbidden creates a DeleteFederatedConnectionsConfigForbidden with default headers values +func NewDeleteFederatedConnectionsConfigForbidden() *DeleteFederatedConnectionsConfigForbidden { + return &DeleteFederatedConnectionsConfigForbidden{} +} + +/* +DeleteFederatedConnectionsConfigForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type DeleteFederatedConnectionsConfigForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this delete federated connections config forbidden response has a 2xx status code +func (o *DeleteFederatedConnectionsConfigForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete federated connections config forbidden response has a 3xx status code +func (o *DeleteFederatedConnectionsConfigForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete federated connections config forbidden response has a 4xx status code +func (o *DeleteFederatedConnectionsConfigForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete federated connections config forbidden response has a 5xx status code +func (o *DeleteFederatedConnectionsConfigForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this delete federated connections config forbidden response a status code equal to that given +func (o *DeleteFederatedConnectionsConfigForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the delete federated connections config forbidden response +func (o *DeleteFederatedConnectionsConfigForbidden) Code() int { + return 403 +} + +func (o *DeleteFederatedConnectionsConfigForbidden) Error() string { + return fmt.Sprintf("[DELETE /ngsiem/entities/federated-connections-config/v1][%d] deleteFederatedConnectionsConfigForbidden %+v", 403, o.Payload) +} + +func (o *DeleteFederatedConnectionsConfigForbidden) String() string { + return fmt.Sprintf("[DELETE /ngsiem/entities/federated-connections-config/v1][%d] deleteFederatedConnectionsConfigForbidden %+v", 403, o.Payload) +} + +func (o *DeleteFederatedConnectionsConfigForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *DeleteFederatedConnectionsConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteFederatedConnectionsConfigNotFound creates a DeleteFederatedConnectionsConfigNotFound with default headers values +func NewDeleteFederatedConnectionsConfigNotFound() *DeleteFederatedConnectionsConfigNotFound { + return &DeleteFederatedConnectionsConfigNotFound{} +} + +/* +DeleteFederatedConnectionsConfigNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type DeleteFederatedConnectionsConfigNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this delete federated connections config not found response has a 2xx status code +func (o *DeleteFederatedConnectionsConfigNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete federated connections config not found response has a 3xx status code +func (o *DeleteFederatedConnectionsConfigNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete federated connections config not found response has a 4xx status code +func (o *DeleteFederatedConnectionsConfigNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete federated connections config not found response has a 5xx status code +func (o *DeleteFederatedConnectionsConfigNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this delete federated connections config not found response a status code equal to that given +func (o *DeleteFederatedConnectionsConfigNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the delete federated connections config not found response +func (o *DeleteFederatedConnectionsConfigNotFound) Code() int { + return 404 +} + +func (o *DeleteFederatedConnectionsConfigNotFound) Error() string { + return fmt.Sprintf("[DELETE /ngsiem/entities/federated-connections-config/v1][%d] deleteFederatedConnectionsConfigNotFound %+v", 404, o.Payload) +} + +func (o *DeleteFederatedConnectionsConfigNotFound) String() string { + return fmt.Sprintf("[DELETE /ngsiem/entities/federated-connections-config/v1][%d] deleteFederatedConnectionsConfigNotFound %+v", 404, o.Payload) +} + +func (o *DeleteFederatedConnectionsConfigNotFound) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *DeleteFederatedConnectionsConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteFederatedConnectionsConfigTooManyRequests creates a DeleteFederatedConnectionsConfigTooManyRequests with default headers values +func NewDeleteFederatedConnectionsConfigTooManyRequests() *DeleteFederatedConnectionsConfigTooManyRequests { + return &DeleteFederatedConnectionsConfigTooManyRequests{} +} + +/* +DeleteFederatedConnectionsConfigTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type DeleteFederatedConnectionsConfigTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this delete federated connections config too many requests response has a 2xx status code +func (o *DeleteFederatedConnectionsConfigTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete federated connections config too many requests response has a 3xx status code +func (o *DeleteFederatedConnectionsConfigTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete federated connections config too many requests response has a 4xx status code +func (o *DeleteFederatedConnectionsConfigTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete federated connections config too many requests response has a 5xx status code +func (o *DeleteFederatedConnectionsConfigTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this delete federated connections config too many requests response a status code equal to that given +func (o *DeleteFederatedConnectionsConfigTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the delete federated connections config too many requests response +func (o *DeleteFederatedConnectionsConfigTooManyRequests) Code() int { + return 429 +} + +func (o *DeleteFederatedConnectionsConfigTooManyRequests) Error() string { + return fmt.Sprintf("[DELETE /ngsiem/entities/federated-connections-config/v1][%d] deleteFederatedConnectionsConfigTooManyRequests %+v", 429, o.Payload) +} + +func (o *DeleteFederatedConnectionsConfigTooManyRequests) String() string { + return fmt.Sprintf("[DELETE /ngsiem/entities/federated-connections-config/v1][%d] deleteFederatedConnectionsConfigTooManyRequests %+v", 429, o.Payload) +} + +func (o *DeleteFederatedConnectionsConfigTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *DeleteFederatedConnectionsConfigTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteFederatedConnectionsConfigInternalServerError creates a DeleteFederatedConnectionsConfigInternalServerError with default headers values +func NewDeleteFederatedConnectionsConfigInternalServerError() *DeleteFederatedConnectionsConfigInternalServerError { + return &DeleteFederatedConnectionsConfigInternalServerError{} +} + +/* +DeleteFederatedConnectionsConfigInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type DeleteFederatedConnectionsConfigInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this delete federated connections config internal server error response has a 2xx status code +func (o *DeleteFederatedConnectionsConfigInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete federated connections config internal server error response has a 3xx status code +func (o *DeleteFederatedConnectionsConfigInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete federated connections config internal server error response has a 4xx status code +func (o *DeleteFederatedConnectionsConfigInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete federated connections config internal server error response has a 5xx status code +func (o *DeleteFederatedConnectionsConfigInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this delete federated connections config internal server error response a status code equal to that given +func (o *DeleteFederatedConnectionsConfigInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the delete federated connections config internal server error response +func (o *DeleteFederatedConnectionsConfigInternalServerError) Code() int { + return 500 +} + +func (o *DeleteFederatedConnectionsConfigInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /ngsiem/entities/federated-connections-config/v1][%d] deleteFederatedConnectionsConfigInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteFederatedConnectionsConfigInternalServerError) String() string { + return fmt.Sprintf("[DELETE /ngsiem/entities/federated-connections-config/v1][%d] deleteFederatedConnectionsConfigInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteFederatedConnectionsConfigInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *DeleteFederatedConnectionsConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/federated_connections/federated_connections_client.go b/falcon/client/federated_connections/federated_connections_client.go new file mode 100644 index 000000000..a96750d24 --- /dev/null +++ b/falcon/client/federated_connections/federated_connections_client.go @@ -0,0 +1,159 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package federated_connections + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new federated connections API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for federated connections API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteFederatedConnectionsConfig(params *DeleteFederatedConnectionsConfigParams, opts ...ClientOption) (*DeleteFederatedConnectionsConfigNoContent, error) + + PatchFederatedConnectionsConfig(params *PatchFederatedConnectionsConfigParams, opts ...ClientOption) (*PatchFederatedConnectionsConfigOK, error) + + PostFederatedConnectionsConfig(params *PostFederatedConnectionsConfigParams, opts ...ClientOption) (*PostFederatedConnectionsConfigOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +DeleteFederatedConnectionsConfig deletes configuration for a federated connection +*/ +func (a *Client) DeleteFederatedConnectionsConfig(params *DeleteFederatedConnectionsConfigParams, opts ...ClientOption) (*DeleteFederatedConnectionsConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteFederatedConnectionsConfigParams() + } + op := &runtime.ClientOperation{ + ID: "DeleteFederatedConnectionsConfig", + Method: "DELETE", + PathPattern: "/ngsiem/entities/federated-connections-config/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &DeleteFederatedConnectionsConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteFederatedConnectionsConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for DeleteFederatedConnectionsConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PatchFederatedConnectionsConfig updates configuration for a federated connection +*/ +func (a *Client) PatchFederatedConnectionsConfig(params *PatchFederatedConnectionsConfigParams, opts ...ClientOption) (*PatchFederatedConnectionsConfigOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPatchFederatedConnectionsConfigParams() + } + op := &runtime.ClientOperation{ + ID: "PatchFederatedConnectionsConfig", + Method: "PATCH", + PathPattern: "/ngsiem/entities/federated-connections-config/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &PatchFederatedConnectionsConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PatchFederatedConnectionsConfigOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for PatchFederatedConnectionsConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PostFederatedConnectionsConfig creates configuration for a federated connection +*/ +func (a *Client) PostFederatedConnectionsConfig(params *PostFederatedConnectionsConfigParams, opts ...ClientOption) (*PostFederatedConnectionsConfigOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostFederatedConnectionsConfigParams() + } + op := &runtime.ClientOperation{ + ID: "PostFederatedConnectionsConfig", + Method: "POST", + PathPattern: "/ngsiem/entities/federated-connections-config/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &PostFederatedConnectionsConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostFederatedConnectionsConfigOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for PostFederatedConnectionsConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/falcon/client/federated_connections/patch_federated_connections_config_parameters.go b/falcon/client/federated_connections/patch_federated_connections_config_parameters.go new file mode 100644 index 000000000..4479b108b --- /dev/null +++ b/falcon/client/federated_connections/patch_federated_connections_config_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package federated_connections + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewPatchFederatedConnectionsConfigParams creates a new PatchFederatedConnectionsConfigParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPatchFederatedConnectionsConfigParams() *PatchFederatedConnectionsConfigParams { + return &PatchFederatedConnectionsConfigParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPatchFederatedConnectionsConfigParamsWithTimeout creates a new PatchFederatedConnectionsConfigParams object +// with the ability to set a timeout on a request. +func NewPatchFederatedConnectionsConfigParamsWithTimeout(timeout time.Duration) *PatchFederatedConnectionsConfigParams { + return &PatchFederatedConnectionsConfigParams{ + timeout: timeout, + } +} + +// NewPatchFederatedConnectionsConfigParamsWithContext creates a new PatchFederatedConnectionsConfigParams object +// with the ability to set a context for a request. +func NewPatchFederatedConnectionsConfigParamsWithContext(ctx context.Context) *PatchFederatedConnectionsConfigParams { + return &PatchFederatedConnectionsConfigParams{ + Context: ctx, + } +} + +// NewPatchFederatedConnectionsConfigParamsWithHTTPClient creates a new PatchFederatedConnectionsConfigParams object +// with the ability to set a custom HTTPClient for a request. +func NewPatchFederatedConnectionsConfigParamsWithHTTPClient(client *http.Client) *PatchFederatedConnectionsConfigParams { + return &PatchFederatedConnectionsConfigParams{ + HTTPClient: client, + } +} + +/* +PatchFederatedConnectionsConfigParams contains all the parameters to send to the API endpoint + + for the patch federated connections config operation. + + Typically these are written to a http.Request. +*/ +type PatchFederatedConnectionsConfigParams struct { + + // Body. + Body *models.ClientFederatedConnectionConfigPatchRequestV1 + + /* ConnectionID. + + Connection ID to update configuration for + */ + ConnectionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the patch federated connections config params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PatchFederatedConnectionsConfigParams) WithDefaults() *PatchFederatedConnectionsConfigParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the patch federated connections config params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PatchFederatedConnectionsConfigParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the patch federated connections config params +func (o *PatchFederatedConnectionsConfigParams) WithTimeout(timeout time.Duration) *PatchFederatedConnectionsConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the patch federated connections config params +func (o *PatchFederatedConnectionsConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the patch federated connections config params +func (o *PatchFederatedConnectionsConfigParams) WithContext(ctx context.Context) *PatchFederatedConnectionsConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the patch federated connections config params +func (o *PatchFederatedConnectionsConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the patch federated connections config params +func (o *PatchFederatedConnectionsConfigParams) WithHTTPClient(client *http.Client) *PatchFederatedConnectionsConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the patch federated connections config params +func (o *PatchFederatedConnectionsConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the patch federated connections config params +func (o *PatchFederatedConnectionsConfigParams) WithBody(body *models.ClientFederatedConnectionConfigPatchRequestV1) *PatchFederatedConnectionsConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the patch federated connections config params +func (o *PatchFederatedConnectionsConfigParams) SetBody(body *models.ClientFederatedConnectionConfigPatchRequestV1) { + o.Body = body +} + +// WithConnectionID adds the connectionID to the patch federated connections config params +func (o *PatchFederatedConnectionsConfigParams) WithConnectionID(connectionID string) *PatchFederatedConnectionsConfigParams { + o.SetConnectionID(connectionID) + return o +} + +// SetConnectionID adds the connectionId to the patch federated connections config params +func (o *PatchFederatedConnectionsConfigParams) SetConnectionID(connectionID string) { + o.ConnectionID = connectionID +} + +// WriteToRequest writes these params to a swagger request +func (o *PatchFederatedConnectionsConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // query param connection_id + qrConnectionID := o.ConnectionID + qConnectionID := qrConnectionID + if qConnectionID != "" { + + if err := r.SetQueryParam("connection_id", qConnectionID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/federated_connections/patch_federated_connections_config_responses.go b/falcon/client/federated_connections/patch_federated_connections_config_responses.go new file mode 100644 index 000000000..d8bb6060f --- /dev/null +++ b/falcon/client/federated_connections/patch_federated_connections_config_responses.go @@ -0,0 +1,742 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package federated_connections + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// PatchFederatedConnectionsConfigReader is a Reader for the PatchFederatedConnectionsConfig structure. +type PatchFederatedConnectionsConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PatchFederatedConnectionsConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPatchFederatedConnectionsConfigOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewPatchFederatedConnectionsConfigBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPatchFederatedConnectionsConfigForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPatchFederatedConnectionsConfigNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewPatchFederatedConnectionsConfigTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPatchFederatedConnectionsConfigInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[PATCH /ngsiem/entities/federated-connections-config/v1] PatchFederatedConnectionsConfig", response, response.Code()) + } +} + +// NewPatchFederatedConnectionsConfigOK creates a PatchFederatedConnectionsConfigOK with default headers values +func NewPatchFederatedConnectionsConfigOK() *PatchFederatedConnectionsConfigOK { + return &PatchFederatedConnectionsConfigOK{} +} + +/* +PatchFederatedConnectionsConfigOK describes a response with status code 200, with default header values. + +OK +*/ +type PatchFederatedConnectionsConfigOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.ClientFederatedConnectionConfigResponseV1 +} + +// IsSuccess returns true when this patch federated connections config o k response has a 2xx status code +func (o *PatchFederatedConnectionsConfigOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this patch federated connections config o k response has a 3xx status code +func (o *PatchFederatedConnectionsConfigOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch federated connections config o k response has a 4xx status code +func (o *PatchFederatedConnectionsConfigOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this patch federated connections config o k response has a 5xx status code +func (o *PatchFederatedConnectionsConfigOK) IsServerError() bool { + return false +} + +// IsCode returns true when this patch federated connections config o k response a status code equal to that given +func (o *PatchFederatedConnectionsConfigOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the patch federated connections config o k response +func (o *PatchFederatedConnectionsConfigOK) Code() int { + return 200 +} + +func (o *PatchFederatedConnectionsConfigOK) Error() string { + return fmt.Sprintf("[PATCH /ngsiem/entities/federated-connections-config/v1][%d] patchFederatedConnectionsConfigOK %+v", 200, o.Payload) +} + +func (o *PatchFederatedConnectionsConfigOK) String() string { + return fmt.Sprintf("[PATCH /ngsiem/entities/federated-connections-config/v1][%d] patchFederatedConnectionsConfigOK %+v", 200, o.Payload) +} + +func (o *PatchFederatedConnectionsConfigOK) GetPayload() *models.ClientFederatedConnectionConfigResponseV1 { + return o.Payload +} + +func (o *PatchFederatedConnectionsConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.ClientFederatedConnectionConfigResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPatchFederatedConnectionsConfigBadRequest creates a PatchFederatedConnectionsConfigBadRequest with default headers values +func NewPatchFederatedConnectionsConfigBadRequest() *PatchFederatedConnectionsConfigBadRequest { + return &PatchFederatedConnectionsConfigBadRequest{} +} + +/* +PatchFederatedConnectionsConfigBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PatchFederatedConnectionsConfigBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this patch federated connections config bad request response has a 2xx status code +func (o *PatchFederatedConnectionsConfigBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch federated connections config bad request response has a 3xx status code +func (o *PatchFederatedConnectionsConfigBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch federated connections config bad request response has a 4xx status code +func (o *PatchFederatedConnectionsConfigBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch federated connections config bad request response has a 5xx status code +func (o *PatchFederatedConnectionsConfigBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this patch federated connections config bad request response a status code equal to that given +func (o *PatchFederatedConnectionsConfigBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the patch federated connections config bad request response +func (o *PatchFederatedConnectionsConfigBadRequest) Code() int { + return 400 +} + +func (o *PatchFederatedConnectionsConfigBadRequest) Error() string { + return fmt.Sprintf("[PATCH /ngsiem/entities/federated-connections-config/v1][%d] patchFederatedConnectionsConfigBadRequest %+v", 400, o.Payload) +} + +func (o *PatchFederatedConnectionsConfigBadRequest) String() string { + return fmt.Sprintf("[PATCH /ngsiem/entities/federated-connections-config/v1][%d] patchFederatedConnectionsConfigBadRequest %+v", 400, o.Payload) +} + +func (o *PatchFederatedConnectionsConfigBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *PatchFederatedConnectionsConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPatchFederatedConnectionsConfigForbidden creates a PatchFederatedConnectionsConfigForbidden with default headers values +func NewPatchFederatedConnectionsConfigForbidden() *PatchFederatedConnectionsConfigForbidden { + return &PatchFederatedConnectionsConfigForbidden{} +} + +/* +PatchFederatedConnectionsConfigForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PatchFederatedConnectionsConfigForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this patch federated connections config forbidden response has a 2xx status code +func (o *PatchFederatedConnectionsConfigForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch federated connections config forbidden response has a 3xx status code +func (o *PatchFederatedConnectionsConfigForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch federated connections config forbidden response has a 4xx status code +func (o *PatchFederatedConnectionsConfigForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch federated connections config forbidden response has a 5xx status code +func (o *PatchFederatedConnectionsConfigForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this patch federated connections config forbidden response a status code equal to that given +func (o *PatchFederatedConnectionsConfigForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the patch federated connections config forbidden response +func (o *PatchFederatedConnectionsConfigForbidden) Code() int { + return 403 +} + +func (o *PatchFederatedConnectionsConfigForbidden) Error() string { + return fmt.Sprintf("[PATCH /ngsiem/entities/federated-connections-config/v1][%d] patchFederatedConnectionsConfigForbidden %+v", 403, o.Payload) +} + +func (o *PatchFederatedConnectionsConfigForbidden) String() string { + return fmt.Sprintf("[PATCH /ngsiem/entities/federated-connections-config/v1][%d] patchFederatedConnectionsConfigForbidden %+v", 403, o.Payload) +} + +func (o *PatchFederatedConnectionsConfigForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *PatchFederatedConnectionsConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPatchFederatedConnectionsConfigNotFound creates a PatchFederatedConnectionsConfigNotFound with default headers values +func NewPatchFederatedConnectionsConfigNotFound() *PatchFederatedConnectionsConfigNotFound { + return &PatchFederatedConnectionsConfigNotFound{} +} + +/* +PatchFederatedConnectionsConfigNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PatchFederatedConnectionsConfigNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this patch federated connections config not found response has a 2xx status code +func (o *PatchFederatedConnectionsConfigNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch federated connections config not found response has a 3xx status code +func (o *PatchFederatedConnectionsConfigNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch federated connections config not found response has a 4xx status code +func (o *PatchFederatedConnectionsConfigNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch federated connections config not found response has a 5xx status code +func (o *PatchFederatedConnectionsConfigNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this patch federated connections config not found response a status code equal to that given +func (o *PatchFederatedConnectionsConfigNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the patch federated connections config not found response +func (o *PatchFederatedConnectionsConfigNotFound) Code() int { + return 404 +} + +func (o *PatchFederatedConnectionsConfigNotFound) Error() string { + return fmt.Sprintf("[PATCH /ngsiem/entities/federated-connections-config/v1][%d] patchFederatedConnectionsConfigNotFound %+v", 404, o.Payload) +} + +func (o *PatchFederatedConnectionsConfigNotFound) String() string { + return fmt.Sprintf("[PATCH /ngsiem/entities/federated-connections-config/v1][%d] patchFederatedConnectionsConfigNotFound %+v", 404, o.Payload) +} + +func (o *PatchFederatedConnectionsConfigNotFound) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *PatchFederatedConnectionsConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPatchFederatedConnectionsConfigTooManyRequests creates a PatchFederatedConnectionsConfigTooManyRequests with default headers values +func NewPatchFederatedConnectionsConfigTooManyRequests() *PatchFederatedConnectionsConfigTooManyRequests { + return &PatchFederatedConnectionsConfigTooManyRequests{} +} + +/* +PatchFederatedConnectionsConfigTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type PatchFederatedConnectionsConfigTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this patch federated connections config too many requests response has a 2xx status code +func (o *PatchFederatedConnectionsConfigTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch federated connections config too many requests response has a 3xx status code +func (o *PatchFederatedConnectionsConfigTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch federated connections config too many requests response has a 4xx status code +func (o *PatchFederatedConnectionsConfigTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this patch federated connections config too many requests response has a 5xx status code +func (o *PatchFederatedConnectionsConfigTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this patch federated connections config too many requests response a status code equal to that given +func (o *PatchFederatedConnectionsConfigTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the patch federated connections config too many requests response +func (o *PatchFederatedConnectionsConfigTooManyRequests) Code() int { + return 429 +} + +func (o *PatchFederatedConnectionsConfigTooManyRequests) Error() string { + return fmt.Sprintf("[PATCH /ngsiem/entities/federated-connections-config/v1][%d] patchFederatedConnectionsConfigTooManyRequests %+v", 429, o.Payload) +} + +func (o *PatchFederatedConnectionsConfigTooManyRequests) String() string { + return fmt.Sprintf("[PATCH /ngsiem/entities/federated-connections-config/v1][%d] patchFederatedConnectionsConfigTooManyRequests %+v", 429, o.Payload) +} + +func (o *PatchFederatedConnectionsConfigTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *PatchFederatedConnectionsConfigTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPatchFederatedConnectionsConfigInternalServerError creates a PatchFederatedConnectionsConfigInternalServerError with default headers values +func NewPatchFederatedConnectionsConfigInternalServerError() *PatchFederatedConnectionsConfigInternalServerError { + return &PatchFederatedConnectionsConfigInternalServerError{} +} + +/* +PatchFederatedConnectionsConfigInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type PatchFederatedConnectionsConfigInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this patch federated connections config internal server error response has a 2xx status code +func (o *PatchFederatedConnectionsConfigInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this patch federated connections config internal server error response has a 3xx status code +func (o *PatchFederatedConnectionsConfigInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this patch federated connections config internal server error response has a 4xx status code +func (o *PatchFederatedConnectionsConfigInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this patch federated connections config internal server error response has a 5xx status code +func (o *PatchFederatedConnectionsConfigInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this patch federated connections config internal server error response a status code equal to that given +func (o *PatchFederatedConnectionsConfigInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the patch federated connections config internal server error response +func (o *PatchFederatedConnectionsConfigInternalServerError) Code() int { + return 500 +} + +func (o *PatchFederatedConnectionsConfigInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /ngsiem/entities/federated-connections-config/v1][%d] patchFederatedConnectionsConfigInternalServerError %+v", 500, o.Payload) +} + +func (o *PatchFederatedConnectionsConfigInternalServerError) String() string { + return fmt.Sprintf("[PATCH /ngsiem/entities/federated-connections-config/v1][%d] patchFederatedConnectionsConfigInternalServerError %+v", 500, o.Payload) +} + +func (o *PatchFederatedConnectionsConfigInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *PatchFederatedConnectionsConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/federated_connections/post_federated_connections_config_parameters.go b/falcon/client/federated_connections/post_federated_connections_config_parameters.go new file mode 100644 index 000000000..d57ee752f --- /dev/null +++ b/falcon/client/federated_connections/post_federated_connections_config_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package federated_connections + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewPostFederatedConnectionsConfigParams creates a new PostFederatedConnectionsConfigParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPostFederatedConnectionsConfigParams() *PostFederatedConnectionsConfigParams { + return &PostFederatedConnectionsConfigParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostFederatedConnectionsConfigParamsWithTimeout creates a new PostFederatedConnectionsConfigParams object +// with the ability to set a timeout on a request. +func NewPostFederatedConnectionsConfigParamsWithTimeout(timeout time.Duration) *PostFederatedConnectionsConfigParams { + return &PostFederatedConnectionsConfigParams{ + timeout: timeout, + } +} + +// NewPostFederatedConnectionsConfigParamsWithContext creates a new PostFederatedConnectionsConfigParams object +// with the ability to set a context for a request. +func NewPostFederatedConnectionsConfigParamsWithContext(ctx context.Context) *PostFederatedConnectionsConfigParams { + return &PostFederatedConnectionsConfigParams{ + Context: ctx, + } +} + +// NewPostFederatedConnectionsConfigParamsWithHTTPClient creates a new PostFederatedConnectionsConfigParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostFederatedConnectionsConfigParamsWithHTTPClient(client *http.Client) *PostFederatedConnectionsConfigParams { + return &PostFederatedConnectionsConfigParams{ + HTTPClient: client, + } +} + +/* +PostFederatedConnectionsConfigParams contains all the parameters to send to the API endpoint + + for the post federated connections config operation. + + Typically these are written to a http.Request. +*/ +type PostFederatedConnectionsConfigParams struct { + + // Body. + Body *models.ClientFederatedConnectionConfigRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post federated connections config params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostFederatedConnectionsConfigParams) WithDefaults() *PostFederatedConnectionsConfigParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post federated connections config params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostFederatedConnectionsConfigParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post federated connections config params +func (o *PostFederatedConnectionsConfigParams) WithTimeout(timeout time.Duration) *PostFederatedConnectionsConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post federated connections config params +func (o *PostFederatedConnectionsConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post federated connections config params +func (o *PostFederatedConnectionsConfigParams) WithContext(ctx context.Context) *PostFederatedConnectionsConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post federated connections config params +func (o *PostFederatedConnectionsConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post federated connections config params +func (o *PostFederatedConnectionsConfigParams) WithHTTPClient(client *http.Client) *PostFederatedConnectionsConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post federated connections config params +func (o *PostFederatedConnectionsConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the post federated connections config params +func (o *PostFederatedConnectionsConfigParams) WithBody(body *models.ClientFederatedConnectionConfigRequestV1) *PostFederatedConnectionsConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the post federated connections config params +func (o *PostFederatedConnectionsConfigParams) SetBody(body *models.ClientFederatedConnectionConfigRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *PostFederatedConnectionsConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/federated_connections/post_federated_connections_config_responses.go b/falcon/client/federated_connections/post_federated_connections_config_responses.go new file mode 100644 index 000000000..a24c35869 --- /dev/null +++ b/falcon/client/federated_connections/post_federated_connections_config_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package federated_connections + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// PostFederatedConnectionsConfigReader is a Reader for the PostFederatedConnectionsConfig structure. +type PostFederatedConnectionsConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostFederatedConnectionsConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostFederatedConnectionsConfigOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewPostFederatedConnectionsConfigBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostFederatedConnectionsConfigForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewPostFederatedConnectionsConfigTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostFederatedConnectionsConfigInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /ngsiem/entities/federated-connections-config/v1] PostFederatedConnectionsConfig", response, response.Code()) + } +} + +// NewPostFederatedConnectionsConfigOK creates a PostFederatedConnectionsConfigOK with default headers values +func NewPostFederatedConnectionsConfigOK() *PostFederatedConnectionsConfigOK { + return &PostFederatedConnectionsConfigOK{} +} + +/* +PostFederatedConnectionsConfigOK describes a response with status code 200, with default header values. + +OK +*/ +type PostFederatedConnectionsConfigOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.ClientFederatedConnectionConfigResponseV1 +} + +// IsSuccess returns true when this post federated connections config o k response has a 2xx status code +func (o *PostFederatedConnectionsConfigOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post federated connections config o k response has a 3xx status code +func (o *PostFederatedConnectionsConfigOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post federated connections config o k response has a 4xx status code +func (o *PostFederatedConnectionsConfigOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this post federated connections config o k response has a 5xx status code +func (o *PostFederatedConnectionsConfigOK) IsServerError() bool { + return false +} + +// IsCode returns true when this post federated connections config o k response a status code equal to that given +func (o *PostFederatedConnectionsConfigOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the post federated connections config o k response +func (o *PostFederatedConnectionsConfigOK) Code() int { + return 200 +} + +func (o *PostFederatedConnectionsConfigOK) Error() string { + return fmt.Sprintf("[POST /ngsiem/entities/federated-connections-config/v1][%d] postFederatedConnectionsConfigOK %+v", 200, o.Payload) +} + +func (o *PostFederatedConnectionsConfigOK) String() string { + return fmt.Sprintf("[POST /ngsiem/entities/federated-connections-config/v1][%d] postFederatedConnectionsConfigOK %+v", 200, o.Payload) +} + +func (o *PostFederatedConnectionsConfigOK) GetPayload() *models.ClientFederatedConnectionConfigResponseV1 { + return o.Payload +} + +func (o *PostFederatedConnectionsConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.ClientFederatedConnectionConfigResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFederatedConnectionsConfigBadRequest creates a PostFederatedConnectionsConfigBadRequest with default headers values +func NewPostFederatedConnectionsConfigBadRequest() *PostFederatedConnectionsConfigBadRequest { + return &PostFederatedConnectionsConfigBadRequest{} +} + +/* +PostFederatedConnectionsConfigBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PostFederatedConnectionsConfigBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this post federated connections config bad request response has a 2xx status code +func (o *PostFederatedConnectionsConfigBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post federated connections config bad request response has a 3xx status code +func (o *PostFederatedConnectionsConfigBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post federated connections config bad request response has a 4xx status code +func (o *PostFederatedConnectionsConfigBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this post federated connections config bad request response has a 5xx status code +func (o *PostFederatedConnectionsConfigBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this post federated connections config bad request response a status code equal to that given +func (o *PostFederatedConnectionsConfigBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the post federated connections config bad request response +func (o *PostFederatedConnectionsConfigBadRequest) Code() int { + return 400 +} + +func (o *PostFederatedConnectionsConfigBadRequest) Error() string { + return fmt.Sprintf("[POST /ngsiem/entities/federated-connections-config/v1][%d] postFederatedConnectionsConfigBadRequest %+v", 400, o.Payload) +} + +func (o *PostFederatedConnectionsConfigBadRequest) String() string { + return fmt.Sprintf("[POST /ngsiem/entities/federated-connections-config/v1][%d] postFederatedConnectionsConfigBadRequest %+v", 400, o.Payload) +} + +func (o *PostFederatedConnectionsConfigBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *PostFederatedConnectionsConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFederatedConnectionsConfigForbidden creates a PostFederatedConnectionsConfigForbidden with default headers values +func NewPostFederatedConnectionsConfigForbidden() *PostFederatedConnectionsConfigForbidden { + return &PostFederatedConnectionsConfigForbidden{} +} + +/* +PostFederatedConnectionsConfigForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PostFederatedConnectionsConfigForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this post federated connections config forbidden response has a 2xx status code +func (o *PostFederatedConnectionsConfigForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post federated connections config forbidden response has a 3xx status code +func (o *PostFederatedConnectionsConfigForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post federated connections config forbidden response has a 4xx status code +func (o *PostFederatedConnectionsConfigForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post federated connections config forbidden response has a 5xx status code +func (o *PostFederatedConnectionsConfigForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post federated connections config forbidden response a status code equal to that given +func (o *PostFederatedConnectionsConfigForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post federated connections config forbidden response +func (o *PostFederatedConnectionsConfigForbidden) Code() int { + return 403 +} + +func (o *PostFederatedConnectionsConfigForbidden) Error() string { + return fmt.Sprintf("[POST /ngsiem/entities/federated-connections-config/v1][%d] postFederatedConnectionsConfigForbidden %+v", 403, o.Payload) +} + +func (o *PostFederatedConnectionsConfigForbidden) String() string { + return fmt.Sprintf("[POST /ngsiem/entities/federated-connections-config/v1][%d] postFederatedConnectionsConfigForbidden %+v", 403, o.Payload) +} + +func (o *PostFederatedConnectionsConfigForbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *PostFederatedConnectionsConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFederatedConnectionsConfigTooManyRequests creates a PostFederatedConnectionsConfigTooManyRequests with default headers values +func NewPostFederatedConnectionsConfigTooManyRequests() *PostFederatedConnectionsConfigTooManyRequests { + return &PostFederatedConnectionsConfigTooManyRequests{} +} + +/* +PostFederatedConnectionsConfigTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type PostFederatedConnectionsConfigTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this post federated connections config too many requests response has a 2xx status code +func (o *PostFederatedConnectionsConfigTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post federated connections config too many requests response has a 3xx status code +func (o *PostFederatedConnectionsConfigTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post federated connections config too many requests response has a 4xx status code +func (o *PostFederatedConnectionsConfigTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this post federated connections config too many requests response has a 5xx status code +func (o *PostFederatedConnectionsConfigTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this post federated connections config too many requests response a status code equal to that given +func (o *PostFederatedConnectionsConfigTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the post federated connections config too many requests response +func (o *PostFederatedConnectionsConfigTooManyRequests) Code() int { + return 429 +} + +func (o *PostFederatedConnectionsConfigTooManyRequests) Error() string { + return fmt.Sprintf("[POST /ngsiem/entities/federated-connections-config/v1][%d] postFederatedConnectionsConfigTooManyRequests %+v", 429, o.Payload) +} + +func (o *PostFederatedConnectionsConfigTooManyRequests) String() string { + return fmt.Sprintf("[POST /ngsiem/entities/federated-connections-config/v1][%d] postFederatedConnectionsConfigTooManyRequests %+v", 429, o.Payload) +} + +func (o *PostFederatedConnectionsConfigTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *PostFederatedConnectionsConfigTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFederatedConnectionsConfigInternalServerError creates a PostFederatedConnectionsConfigInternalServerError with default headers values +func NewPostFederatedConnectionsConfigInternalServerError() *PostFederatedConnectionsConfigInternalServerError { + return &PostFederatedConnectionsConfigInternalServerError{} +} + +/* +PostFederatedConnectionsConfigInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type PostFederatedConnectionsConfigInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this post federated connections config internal server error response has a 2xx status code +func (o *PostFederatedConnectionsConfigInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post federated connections config internal server error response has a 3xx status code +func (o *PostFederatedConnectionsConfigInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post federated connections config internal server error response has a 4xx status code +func (o *PostFederatedConnectionsConfigInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post federated connections config internal server error response has a 5xx status code +func (o *PostFederatedConnectionsConfigInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post federated connections config internal server error response a status code equal to that given +func (o *PostFederatedConnectionsConfigInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post federated connections config internal server error response +func (o *PostFederatedConnectionsConfigInternalServerError) Code() int { + return 500 +} + +func (o *PostFederatedConnectionsConfigInternalServerError) Error() string { + return fmt.Sprintf("[POST /ngsiem/entities/federated-connections-config/v1][%d] postFederatedConnectionsConfigInternalServerError %+v", 500, o.Payload) +} + +func (o *PostFederatedConnectionsConfigInternalServerError) String() string { + return fmt.Sprintf("[POST /ngsiem/entities/federated-connections-config/v1][%d] postFederatedConnectionsConfigInternalServerError %+v", 500, o.Payload) +} + +func (o *PostFederatedConnectionsConfigInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *PostFederatedConnectionsConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/foundry_logscale/foundry_logscale_client.go b/falcon/client/foundry_logscale/foundry_logscale_client.go index 449dfca40..73841e4e8 100644 --- a/falcon/client/foundry_logscale/foundry_logscale_client.go +++ b/falcon/client/foundry_logscale/foundry_logscale_client.go @@ -481,7 +481,7 @@ func (a *Client) IngestDataAsyncV1(params *IngestDataAsyncV1Params, opts ...Clie } /* -ListRepos lists available repositories and views +ListRepos lists available repositories */ func (a *Client) ListRepos(params *ListReposParams, opts ...ClientOption) (*ListReposOK, error) { // TODO: Validate the params before sending @@ -519,7 +519,7 @@ func (a *Client) ListRepos(params *ListReposParams, opts ...ClientOption) (*List } /* -ListViews lists views +ListViews lists available views */ func (a *Client) ListViews(params *ListViewsParams, opts ...ClientOption) (*ListViewsOK, error) { // TODO: Validate the params before sending diff --git a/falcon/client/lookup_files/create_file_v1_parameters.go b/falcon/client/foundry_lookup_files/create_file_v1_parameters.go similarity index 99% rename from falcon/client/lookup_files/create_file_v1_parameters.go rename to falcon/client/foundry_lookup_files/create_file_v1_parameters.go index 2b07a09b3..bde98d751 100644 --- a/falcon/client/lookup_files/create_file_v1_parameters.go +++ b/falcon/client/foundry_lookup_files/create_file_v1_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package lookup_files +package foundry_lookup_files // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/falcon/client/lookup_files/create_file_v1_responses.go b/falcon/client/foundry_lookup_files/create_file_v1_responses.go similarity index 99% rename from falcon/client/lookup_files/create_file_v1_responses.go rename to falcon/client/foundry_lookup_files/create_file_v1_responses.go index 90fa1c2ca..e0cd76c72 100644 --- a/falcon/client/lookup_files/create_file_v1_responses.go +++ b/falcon/client/foundry_lookup_files/create_file_v1_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package lookup_files +package foundry_lookup_files // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/falcon/client/lookup_files/lookup_files_client.go b/falcon/client/foundry_lookup_files/foundry_lookup_files_client.go similarity index 93% rename from falcon/client/lookup_files/lookup_files_client.go rename to falcon/client/foundry_lookup_files/foundry_lookup_files_client.go index 6fbaf4b43..f07c248b2 100644 --- a/falcon/client/lookup_files/lookup_files_client.go +++ b/falcon/client/foundry_lookup_files/foundry_lookup_files_client.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package lookup_files +package foundry_lookup_files // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -12,13 +12,13 @@ import ( "github.com/go-openapi/strfmt" ) -// New creates a new lookup files API client. +// New creates a new foundry lookup files API client. func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } /* -Client for lookup files API +Client for foundry lookup files API */ type Client struct { transport runtime.ClientTransport @@ -38,7 +38,7 @@ type ClientService interface { } /* -CreateFileV1 creates a lookup file +CreateFileV1 creates a lookup file within a foundry app */ func (a *Client) CreateFileV1(params *CreateFileV1Params, opts ...ClientOption) (*CreateFileV1OK, error) { // TODO: Validate the params before sending @@ -76,7 +76,7 @@ func (a *Client) CreateFileV1(params *CreateFileV1Params, opts ...ClientOption) } /* -UpdateFileV1 updates a lookup file +UpdateFileV1 updates a lookup file within a foundry app */ func (a *Client) UpdateFileV1(params *UpdateFileV1Params, opts ...ClientOption) (*UpdateFileV1OK, error) { // TODO: Validate the params before sending diff --git a/falcon/client/lookup_files/update_file_v1_parameters.go b/falcon/client/foundry_lookup_files/update_file_v1_parameters.go similarity index 99% rename from falcon/client/lookup_files/update_file_v1_parameters.go rename to falcon/client/foundry_lookup_files/update_file_v1_parameters.go index cfaa2056b..26f92a50e 100644 --- a/falcon/client/lookup_files/update_file_v1_parameters.go +++ b/falcon/client/foundry_lookup_files/update_file_v1_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package lookup_files +package foundry_lookup_files // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/falcon/client/lookup_files/update_file_v1_responses.go b/falcon/client/foundry_lookup_files/update_file_v1_responses.go similarity index 99% rename from falcon/client/lookup_files/update_file_v1_responses.go rename to falcon/client/foundry_lookup_files/update_file_v1_responses.go index d4456d6ac..a7e0beeed 100644 --- a/falcon/client/lookup_files/update_file_v1_responses.go +++ b/falcon/client/foundry_lookup_files/update_file_v1_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package lookup_files +package foundry_lookup_files // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/falcon/client/host_migration/get_host_migration_i_ds_v1_parameters.go b/falcon/client/host_migration/get_host_migration_i_ds_v1_parameters.go index 0b131f7de..08ae83fca 100644 --- a/falcon/client/host_migration/get_host_migration_i_ds_v1_parameters.go +++ b/falcon/client/host_migration/get_host_migration_i_ds_v1_parameters.go @@ -64,7 +64,7 @@ type GetHostMigrationIDsV1Params struct { /* Filter. - The filter expression that should be used to limit the results. Valid fields: static_host_groups, hostname, status, source_cid, hostgroups, target_cid, migration_id, id, created_time, host_migration_id, groups + The filter expression that should be used to limit the results. Valid fields: target_cid, host_migration_id, groups, hostgroups, source_cid, migration_id, id, created_time, static_host_groups, hostname, status */ Filter *string diff --git a/falcon/client/host_migration/get_migration_i_ds_v1_parameters.go b/falcon/client/host_migration/get_migration_i_ds_v1_parameters.go index 8e8d54c42..5fad596ca 100644 --- a/falcon/client/host_migration/get_migration_i_ds_v1_parameters.go +++ b/falcon/client/host_migration/get_migration_i_ds_v1_parameters.go @@ -64,7 +64,7 @@ type GetMigrationIDsV1Params struct { /* Filter. - The filter expression that should be used to limit the results. Valid fields: target_cid, status, migration_status, created_by, created_time, name, id, migration_id + The filter expression that should be used to limit the results. Valid fields: id, migration_id, target_cid, status, migration_status, created_by, created_time, name */ Filter *string diff --git a/falcon/client/hosts/devices_actions_delete_v1_parameters.go b/falcon/client/hosts/devices_actions_delete_v1_parameters.go new file mode 100644 index 000000000..47e78fbdd --- /dev/null +++ b/falcon/client/hosts/devices_actions_delete_v1_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package hosts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewDevicesActionsDeleteV1Params creates a new DevicesActionsDeleteV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDevicesActionsDeleteV1Params() *DevicesActionsDeleteV1Params { + return &DevicesActionsDeleteV1Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewDevicesActionsDeleteV1ParamsWithTimeout creates a new DevicesActionsDeleteV1Params object +// with the ability to set a timeout on a request. +func NewDevicesActionsDeleteV1ParamsWithTimeout(timeout time.Duration) *DevicesActionsDeleteV1Params { + return &DevicesActionsDeleteV1Params{ + timeout: timeout, + } +} + +// NewDevicesActionsDeleteV1ParamsWithContext creates a new DevicesActionsDeleteV1Params object +// with the ability to set a context for a request. +func NewDevicesActionsDeleteV1ParamsWithContext(ctx context.Context) *DevicesActionsDeleteV1Params { + return &DevicesActionsDeleteV1Params{ + Context: ctx, + } +} + +// NewDevicesActionsDeleteV1ParamsWithHTTPClient creates a new DevicesActionsDeleteV1Params object +// with the ability to set a custom HTTPClient for a request. +func NewDevicesActionsDeleteV1ParamsWithHTTPClient(client *http.Client) *DevicesActionsDeleteV1Params { + return &DevicesActionsDeleteV1Params{ + HTTPClient: client, + } +} + +/* +DevicesActionsDeleteV1Params contains all the parameters to send to the API endpoint + + for the devices actions delete v1 operation. + + Typically these are written to a http.Request. +*/ +type DevicesActionsDeleteV1Params struct { + + /* Body. + + The host agent IDs (AIDs) of the hosts to permanently delete. + + Provide the IDs in JSON format with the key `ids` and the value in square brackets, such as: + + `"ids": ["123456789"]` + */ + Body *models.MsaEntityActionRequestV3 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the devices actions delete v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DevicesActionsDeleteV1Params) WithDefaults() *DevicesActionsDeleteV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the devices actions delete v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DevicesActionsDeleteV1Params) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the devices actions delete v1 params +func (o *DevicesActionsDeleteV1Params) WithTimeout(timeout time.Duration) *DevicesActionsDeleteV1Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the devices actions delete v1 params +func (o *DevicesActionsDeleteV1Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the devices actions delete v1 params +func (o *DevicesActionsDeleteV1Params) WithContext(ctx context.Context) *DevicesActionsDeleteV1Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the devices actions delete v1 params +func (o *DevicesActionsDeleteV1Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the devices actions delete v1 params +func (o *DevicesActionsDeleteV1Params) WithHTTPClient(client *http.Client) *DevicesActionsDeleteV1Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the devices actions delete v1 params +func (o *DevicesActionsDeleteV1Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the devices actions delete v1 params +func (o *DevicesActionsDeleteV1Params) WithBody(body *models.MsaEntityActionRequestV3) *DevicesActionsDeleteV1Params { + o.SetBody(body) + return o +} + +// SetBody adds the body to the devices actions delete v1 params +func (o *DevicesActionsDeleteV1Params) SetBody(body *models.MsaEntityActionRequestV3) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *DevicesActionsDeleteV1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/hosts/devices_actions_delete_v1_responses.go b/falcon/client/hosts/devices_actions_delete_v1_responses.go new file mode 100644 index 000000000..94bc7eded --- /dev/null +++ b/falcon/client/hosts/devices_actions_delete_v1_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package hosts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// DevicesActionsDeleteV1Reader is a Reader for the DevicesActionsDeleteV1 structure. +type DevicesActionsDeleteV1Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DevicesActionsDeleteV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 202: + result := NewDevicesActionsDeleteV1Accepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewDevicesActionsDeleteV1BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDevicesActionsDeleteV1Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewDevicesActionsDeleteV1TooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDevicesActionsDeleteV1InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /devices/entities/devices-actions-delete/v1] DevicesActionsDeleteV1", response, response.Code()) + } +} + +// NewDevicesActionsDeleteV1Accepted creates a DevicesActionsDeleteV1Accepted with default headers values +func NewDevicesActionsDeleteV1Accepted() *DevicesActionsDeleteV1Accepted { + return &DevicesActionsDeleteV1Accepted{} +} + +/* +DevicesActionsDeleteV1Accepted describes a response with status code 202, with default header values. + +Accepted +*/ +type DevicesActionsDeleteV1Accepted struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyAffectedEntities +} + +// IsSuccess returns true when this devices actions delete v1 accepted response has a 2xx status code +func (o *DevicesActionsDeleteV1Accepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this devices actions delete v1 accepted response has a 3xx status code +func (o *DevicesActionsDeleteV1Accepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this devices actions delete v1 accepted response has a 4xx status code +func (o *DevicesActionsDeleteV1Accepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this devices actions delete v1 accepted response has a 5xx status code +func (o *DevicesActionsDeleteV1Accepted) IsServerError() bool { + return false +} + +// IsCode returns true when this devices actions delete v1 accepted response a status code equal to that given +func (o *DevicesActionsDeleteV1Accepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the devices actions delete v1 accepted response +func (o *DevicesActionsDeleteV1Accepted) Code() int { + return 202 +} + +func (o *DevicesActionsDeleteV1Accepted) Error() string { + return fmt.Sprintf("[POST /devices/entities/devices-actions-delete/v1][%d] devicesActionsDeleteV1Accepted %+v", 202, o.Payload) +} + +func (o *DevicesActionsDeleteV1Accepted) String() string { + return fmt.Sprintf("[POST /devices/entities/devices-actions-delete/v1][%d] devicesActionsDeleteV1Accepted %+v", 202, o.Payload) +} + +func (o *DevicesActionsDeleteV1Accepted) GetPayload() *models.MsaReplyAffectedEntities { + return o.Payload +} + +func (o *DevicesActionsDeleteV1Accepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyAffectedEntities) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDevicesActionsDeleteV1BadRequest creates a DevicesActionsDeleteV1BadRequest with default headers values +func NewDevicesActionsDeleteV1BadRequest() *DevicesActionsDeleteV1BadRequest { + return &DevicesActionsDeleteV1BadRequest{} +} + +/* +DevicesActionsDeleteV1BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type DevicesActionsDeleteV1BadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyAffectedEntities +} + +// IsSuccess returns true when this devices actions delete v1 bad request response has a 2xx status code +func (o *DevicesActionsDeleteV1BadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this devices actions delete v1 bad request response has a 3xx status code +func (o *DevicesActionsDeleteV1BadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this devices actions delete v1 bad request response has a 4xx status code +func (o *DevicesActionsDeleteV1BadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this devices actions delete v1 bad request response has a 5xx status code +func (o *DevicesActionsDeleteV1BadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this devices actions delete v1 bad request response a status code equal to that given +func (o *DevicesActionsDeleteV1BadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the devices actions delete v1 bad request response +func (o *DevicesActionsDeleteV1BadRequest) Code() int { + return 400 +} + +func (o *DevicesActionsDeleteV1BadRequest) Error() string { + return fmt.Sprintf("[POST /devices/entities/devices-actions-delete/v1][%d] devicesActionsDeleteV1BadRequest %+v", 400, o.Payload) +} + +func (o *DevicesActionsDeleteV1BadRequest) String() string { + return fmt.Sprintf("[POST /devices/entities/devices-actions-delete/v1][%d] devicesActionsDeleteV1BadRequest %+v", 400, o.Payload) +} + +func (o *DevicesActionsDeleteV1BadRequest) GetPayload() *models.MsaReplyAffectedEntities { + return o.Payload +} + +func (o *DevicesActionsDeleteV1BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyAffectedEntities) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDevicesActionsDeleteV1Forbidden creates a DevicesActionsDeleteV1Forbidden with default headers values +func NewDevicesActionsDeleteV1Forbidden() *DevicesActionsDeleteV1Forbidden { + return &DevicesActionsDeleteV1Forbidden{} +} + +/* +DevicesActionsDeleteV1Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type DevicesActionsDeleteV1Forbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this devices actions delete v1 forbidden response has a 2xx status code +func (o *DevicesActionsDeleteV1Forbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this devices actions delete v1 forbidden response has a 3xx status code +func (o *DevicesActionsDeleteV1Forbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this devices actions delete v1 forbidden response has a 4xx status code +func (o *DevicesActionsDeleteV1Forbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this devices actions delete v1 forbidden response has a 5xx status code +func (o *DevicesActionsDeleteV1Forbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this devices actions delete v1 forbidden response a status code equal to that given +func (o *DevicesActionsDeleteV1Forbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the devices actions delete v1 forbidden response +func (o *DevicesActionsDeleteV1Forbidden) Code() int { + return 403 +} + +func (o *DevicesActionsDeleteV1Forbidden) Error() string { + return fmt.Sprintf("[POST /devices/entities/devices-actions-delete/v1][%d] devicesActionsDeleteV1Forbidden %+v", 403, o.Payload) +} + +func (o *DevicesActionsDeleteV1Forbidden) String() string { + return fmt.Sprintf("[POST /devices/entities/devices-actions-delete/v1][%d] devicesActionsDeleteV1Forbidden %+v", 403, o.Payload) +} + +func (o *DevicesActionsDeleteV1Forbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *DevicesActionsDeleteV1Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDevicesActionsDeleteV1TooManyRequests creates a DevicesActionsDeleteV1TooManyRequests with default headers values +func NewDevicesActionsDeleteV1TooManyRequests() *DevicesActionsDeleteV1TooManyRequests { + return &DevicesActionsDeleteV1TooManyRequests{} +} + +/* +DevicesActionsDeleteV1TooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type DevicesActionsDeleteV1TooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this devices actions delete v1 too many requests response has a 2xx status code +func (o *DevicesActionsDeleteV1TooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this devices actions delete v1 too many requests response has a 3xx status code +func (o *DevicesActionsDeleteV1TooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this devices actions delete v1 too many requests response has a 4xx status code +func (o *DevicesActionsDeleteV1TooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this devices actions delete v1 too many requests response has a 5xx status code +func (o *DevicesActionsDeleteV1TooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this devices actions delete v1 too many requests response a status code equal to that given +func (o *DevicesActionsDeleteV1TooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the devices actions delete v1 too many requests response +func (o *DevicesActionsDeleteV1TooManyRequests) Code() int { + return 429 +} + +func (o *DevicesActionsDeleteV1TooManyRequests) Error() string { + return fmt.Sprintf("[POST /devices/entities/devices-actions-delete/v1][%d] devicesActionsDeleteV1TooManyRequests %+v", 429, o.Payload) +} + +func (o *DevicesActionsDeleteV1TooManyRequests) String() string { + return fmt.Sprintf("[POST /devices/entities/devices-actions-delete/v1][%d] devicesActionsDeleteV1TooManyRequests %+v", 429, o.Payload) +} + +func (o *DevicesActionsDeleteV1TooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *DevicesActionsDeleteV1TooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDevicesActionsDeleteV1InternalServerError creates a DevicesActionsDeleteV1InternalServerError with default headers values +func NewDevicesActionsDeleteV1InternalServerError() *DevicesActionsDeleteV1InternalServerError { + return &DevicesActionsDeleteV1InternalServerError{} +} + +/* +DevicesActionsDeleteV1InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type DevicesActionsDeleteV1InternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyAffectedEntities +} + +// IsSuccess returns true when this devices actions delete v1 internal server error response has a 2xx status code +func (o *DevicesActionsDeleteV1InternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this devices actions delete v1 internal server error response has a 3xx status code +func (o *DevicesActionsDeleteV1InternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this devices actions delete v1 internal server error response has a 4xx status code +func (o *DevicesActionsDeleteV1InternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this devices actions delete v1 internal server error response has a 5xx status code +func (o *DevicesActionsDeleteV1InternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this devices actions delete v1 internal server error response a status code equal to that given +func (o *DevicesActionsDeleteV1InternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the devices actions delete v1 internal server error response +func (o *DevicesActionsDeleteV1InternalServerError) Code() int { + return 500 +} + +func (o *DevicesActionsDeleteV1InternalServerError) Error() string { + return fmt.Sprintf("[POST /devices/entities/devices-actions-delete/v1][%d] devicesActionsDeleteV1InternalServerError %+v", 500, o.Payload) +} + +func (o *DevicesActionsDeleteV1InternalServerError) String() string { + return fmt.Sprintf("[POST /devices/entities/devices-actions-delete/v1][%d] devicesActionsDeleteV1InternalServerError %+v", 500, o.Payload) +} + +func (o *DevicesActionsDeleteV1InternalServerError) GetPayload() *models.MsaReplyAffectedEntities { + return o.Payload +} + +func (o *DevicesActionsDeleteV1InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyAffectedEntities) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/hosts/hosts_client.go b/falcon/client/hosts/hosts_client.go index 16e8914d4..967791801 100644 --- a/falcon/client/hosts/hosts_client.go +++ b/falcon/client/hosts/hosts_client.go @@ -34,6 +34,8 @@ type ClientService interface { CombinedHiddenDevicesByFilter(params *CombinedHiddenDevicesByFilterParams, opts ...ClientOption) (*CombinedHiddenDevicesByFilterOK, error) + DevicesActionsDeleteV1(params *DevicesActionsDeleteV1Params, opts ...ClientOption) (*DevicesActionsDeleteV1Accepted, error) + GetDeviceDetailsV2(params *GetDeviceDetailsV2Params, opts ...ClientOption) (*GetDeviceDetailsV2OK, error) GetOnlineStateV1(params *GetOnlineStateV1Params, opts ...ClientOption) (*GetOnlineStateV1OK, error) @@ -137,6 +139,44 @@ func (a *Client) CombinedHiddenDevicesByFilter(params *CombinedHiddenDevicesByFi panic(msg) } +/* +DevicesActionsDeleteV1 permanentlies delete hosts from the system +*/ +func (a *Client) DevicesActionsDeleteV1(params *DevicesActionsDeleteV1Params, opts ...ClientOption) (*DevicesActionsDeleteV1Accepted, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDevicesActionsDeleteV1Params() + } + op := &runtime.ClientOperation{ + ID: "DevicesActionsDeleteV1", + Method: "POST", + PathPattern: "/devices/entities/devices-actions-delete/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &DevicesActionsDeleteV1Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DevicesActionsDeleteV1Accepted) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for DevicesActionsDeleteV1: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* GetDeviceDetailsV2 gets details on one or more hosts by providing host i ds as a query parameter supports up to a maximum 100 i ds */ @@ -214,7 +254,7 @@ func (a *Client) GetOnlineStateV1(params *GetOnlineStateV1Params, opts ...Client } /* -PerformActionV2 takes various actions on the hosts in your environment contain or lift containment on a host delete or restore a host +PerformActionV2 takes various actions on the hosts in your environment contain or lift containment on a host hide or unhide a host */ func (a *Client) PerformActionV2(params *PerformActionV2Params, opts ...ClientOption) (*PerformActionV2Accepted, error) { // TODO: Validate the params before sending diff --git a/falcon/client/intel/cao_incidents_queries_v1_parameters.go b/falcon/client/intel/cao_incidents_queries_v1_parameters.go index 3363e7653..759242b8b 100644 --- a/falcon/client/intel/cao_incidents_queries_v1_parameters.go +++ b/falcon/client/intel/cao_incidents_queries_v1_parameters.go @@ -65,7 +65,7 @@ type CaoIncidentsQueriesV1Params struct { /* Filter. Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). - Available filters: ReferencesNotableEvents.Title, InvolvesIndicators.Value, LastModifiedAt, ActivityEnd, InvolvesAdversaries.Slug, MitreAttack.TacticId, All, Title, ActivityStart, InvolvesAdversaries.Name, InvolvesAdversaries.AnimalClassifier, TargetsVulnerabilities.CVE, Motivations.Slug, TargetingProfile.Slug, PublishDate, InvolvesThreats.FamilyName, MitreAttack.Id, MitreAttack.TacticName, MitreAttack.TechniqueId, TargetCountries.Slug, TargetRegions.Slug, TargetIndustries.Slug, Id, InvolvesAdversaries.Id, Objectives.Slug, MitreAttack.TechniqueName. 'All' can be used for text queries on all attributes. + Available filters: MitreAttack.TacticName, All, Title, InvolvesAdversaries.Id, InvolvesAdversaries.Name, MitreAttack.Id, MitreAttack.TacticId, ReferencesNotableEvents.Title, ActivityStart, PublishDate, InvolvesAdversaries.Slug, Objectives.Slug, Motivations.Slug, MitreAttack.TechniqueName, LastModifiedAt, InvolvesAdversaries.AnimalClassifier, TargetsVulnerabilities.CVE, TargetingProfile.Slug, MitreAttack.TechniqueId, TargetCountries.Slug, TargetRegions.Slug, TargetIndustries.Slug, InvolvesIndicators.Value, Id, ActivityEnd, InvolvesThreats.FamilyName. 'All' can be used for text queries on all attributes. */ Filter *string diff --git a/falcon/client/intel/get_intel_actor_entities_responses.go b/falcon/client/intel/get_intel_actor_entities_responses.go index d6fdc2a29..903d834e1 100644 --- a/falcon/client/intel/get_intel_actor_entities_responses.go +++ b/falcon/client/intel/get_intel_actor_entities_responses.go @@ -78,7 +78,7 @@ type GetIntelActorEntitiesOK struct { */ XRateLimitRemaining int64 - Payload *models.DomainActorsResponse + Payload *models.ActorActorResponse } // IsSuccess returns true when this get intel actor entities o k response has a 2xx status code @@ -119,7 +119,7 @@ func (o *GetIntelActorEntitiesOK) String() string { return fmt.Sprintf("[GET /intel/entities/actors/v1][%d] getIntelActorEntitiesOK %+v", 200, o.Payload) } -func (o *GetIntelActorEntitiesOK) GetPayload() *models.DomainActorsResponse { +func (o *GetIntelActorEntitiesOK) GetPayload() *models.ActorActorResponse { return o.Payload } @@ -154,7 +154,7 @@ func (o *GetIntelActorEntitiesOK) readResponse(response runtime.ClientResponse, o.XRateLimitRemaining = valxRateLimitRemaining } - o.Payload = new(models.DomainActorsResponse) + o.Payload = new(models.ActorActorResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/falcon/client/intel/intel_client.go b/falcon/client/intel/intel_client.go index 30f259d9e..b25c84992 100644 --- a/falcon/client/intel/intel_client.go +++ b/falcon/client/intel/intel_client.go @@ -1001,7 +1001,7 @@ func (a *Client) QueryVulnerabilities(params *QueryVulnerabilitiesParams, opts . } /* -CaoIncidentsAggregatesV1 performs statistical aggregations over incident data available aggregation properties target countries name Id involves adversaries animal classifier target industries name target regions slug mitre attack tactic name mitre attack technique Id mitre attack technique name target countries slug target regions name mitre attack tactic Id publish date activity start activity end objectives slug motivations slug involves adversaries slug involves threats family name target industries slug +CaoIncidentsAggregatesV1 performs statistical aggregations over incident data available aggregation properties target industries name mitre attack tactic Id mitre attack technique Id mitre attack technique name publish date activity start activity end Id motivations slug involves adversaries slug target regions slug objectives slug involves adversaries animal classifier involves threats family name target countries slug target countries name target industries slug target regions name mitre attack tactic name */ func (a *Client) CaoIncidentsAggregatesV1(params *CaoIncidentsAggregatesV1Params, opts ...ClientOption) (*CaoIncidentsAggregatesV1OK, error) { // TODO: Validate the params before sending diff --git a/falcon/client/intel/query_intel_actor_entities_parameters.go b/falcon/client/intel/query_intel_actor_entities_parameters.go index 7c4e1bc34..90ef6dac2 100644 --- a/falcon/client/intel/query_intel_actor_entities_parameters.go +++ b/falcon/client/intel/query_intel_actor_entities_parameters.go @@ -78,7 +78,7 @@ type QueryIntelActorEntitiesParams struct { Filter your query by specifying FQL filter parameters. Filter parameters include: - actor_type, animal_classifier, capabilities, capability, capability.id, capability.slug, capability.value, created_date, description, ecrime_kill_chain.attribution, ecrime_kill_chain.crimes, ecrime_kill_chain.customers, ecrime_kill_chain.marketing, ecrime_kill_chain.monetization, ecrime_kill_chain.services_offered, ecrime_kill_chain.services_used, ecrime_kill_chain.technical_tradecraft, ecrime_kill_chain.victims, first_activity_date, group, group.id, group.slug, group.value, id, kill_chain.actions_and_objectives, kill_chain.actions_on_objectives, kill_chain.command_and_control, kill_chain.delivery, kill_chain.exploitation, kill_chain.installation, kill_chain.objectives, kill_chain.reconnaissance, kill_chain.weaponization, known_as, last_activity_date, last_modified_date, motivations, motivations.id, motivations.slug, motivations.value, name, objectives, origins, origins.id, origins.slug, origins.value, region, region.id, region.slug, region.value, short_description, slug, status, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, target_regions, target_regions.id, target_regions.slug, target_regions.value. + actor_type, animal_classifier, capabilities, capability, capability.id, capability.slug, capability.value, created_date, description, ecrime_kill_chain.attribution, ecrime_kill_chain.crimes, ecrime_kill_chain.customers, ecrime_kill_chain.marketing, ecrime_kill_chain.monetization, ecrime_kill_chain.services_offered, ecrime_kill_chain.services_used, ecrime_kill_chain.technical_tradecraft, ecrime_kill_chain.victims, first_activity_date, group, group.id, group.slug, group.value, id, kill_chain.actions_and_objectives, kill_chain.actions_on_objectives, kill_chain.command_and_control, kill_chain.delivery, kill_chain.exploitation, kill_chain.installation, kill_chain.objectives, kill_chain.reconnaissance, kill_chain.weaponization, known_as, last_activity_date, last_modified_date, mitre_attack.id, mitre_attack.tactic_id, mitre_attack.tactic_name, mitre_attack.technique_id, mitre_attack.technique_name, motivations, motivations.id, motivations.slug, motivations.value, name, objectives, origins, origins.id, origins.slug, origins.value, region, region.id, region.slug, region.value, short_description, slug, status, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, target_regions, target_regions.id, target_regions.slug, target_regions.value. */ Filter *string diff --git a/falcon/client/intel/query_intel_actor_entities_responses.go b/falcon/client/intel/query_intel_actor_entities_responses.go index d7f5b031c..fd7db716b 100644 --- a/falcon/client/intel/query_intel_actor_entities_responses.go +++ b/falcon/client/intel/query_intel_actor_entities_responses.go @@ -84,7 +84,7 @@ type QueryIntelActorEntitiesOK struct { */ XRateLimitRemaining int64 - Payload *models.DomainActorsResponse + Payload *models.ActorActorPaginatedResponse } // IsSuccess returns true when this query intel actor entities o k response has a 2xx status code @@ -125,7 +125,7 @@ func (o *QueryIntelActorEntitiesOK) String() string { return fmt.Sprintf("[GET /intel/combined/actors/v1][%d] queryIntelActorEntitiesOK %+v", 200, o.Payload) } -func (o *QueryIntelActorEntitiesOK) GetPayload() *models.DomainActorsResponse { +func (o *QueryIntelActorEntitiesOK) GetPayload() *models.ActorActorPaginatedResponse { return o.Payload } @@ -160,7 +160,7 @@ func (o *QueryIntelActorEntitiesOK) readResponse(response runtime.ClientResponse o.XRateLimitRemaining = valxRateLimitRemaining } - o.Payload = new(models.DomainActorsResponse) + o.Payload = new(models.ActorActorPaginatedResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/falcon/client/intel/query_intel_actor_ids_parameters.go b/falcon/client/intel/query_intel_actor_ids_parameters.go index 5391c9344..447ff65ea 100644 --- a/falcon/client/intel/query_intel_actor_ids_parameters.go +++ b/falcon/client/intel/query_intel_actor_ids_parameters.go @@ -66,7 +66,7 @@ type QueryIntelActorIdsParams struct { Filter your query by specifying FQL filter parameters. Filter parameters include: - actor_type, animal_classifier, capabilities, capability, capability.id, capability.slug, capability.value, created_date, description, ecrime_kill_chain.attribution, ecrime_kill_chain.crimes, ecrime_kill_chain.customers, ecrime_kill_chain.marketing, ecrime_kill_chain.monetization, ecrime_kill_chain.services_offered, ecrime_kill_chain.services_used, ecrime_kill_chain.technical_tradecraft, ecrime_kill_chain.victims, first_activity_date, group, group.id, group.slug, group.value, id, kill_chain.actions_and_objectives, kill_chain.actions_on_objectives, kill_chain.command_and_control, kill_chain.delivery, kill_chain.exploitation, kill_chain.installation, kill_chain.objectives, kill_chain.reconnaissance, kill_chain.weaponization, known_as, last_activity_date, last_modified_date, motivations, motivations.id, motivations.slug, motivations.value, name, objectives, origins, origins.id, origins.slug, origins.value, region, region.id, region.slug, region.value, short_description, slug, status, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, target_regions, target_regions.id, target_regions.slug, target_regions.value. + actor_type, animal_classifier, capabilities, capability, capability.id, capability.slug, capability.value, created_date, description, ecrime_kill_chain.attribution, ecrime_kill_chain.crimes, ecrime_kill_chain.customers, ecrime_kill_chain.marketing, ecrime_kill_chain.monetization, ecrime_kill_chain.services_offered, ecrime_kill_chain.services_used, ecrime_kill_chain.technical_tradecraft, ecrime_kill_chain.victims, first_activity_date, group, group.id, group.slug, group.value, id, kill_chain.actions_and_objectives, kill_chain.actions_on_objectives, kill_chain.command_and_control, kill_chain.delivery, kill_chain.exploitation, kill_chain.installation, kill_chain.objectives, kill_chain.reconnaissance, kill_chain.weaponization, known_as, last_activity_date, last_modified_date, mitre_attack.id, mitre_attack.tactic_id, mitre_attack.tactic_name, mitre_attack.technique_id, mitre_attack.technique_name, motivations, motivations.id, motivations.slug, motivations.value, name, objectives, origins, origins.id, origins.slug, origins.value, region, region.id, region.slug, region.value, short_description, slug, status, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, target_regions, target_regions.id, target_regions.slug, target_regions.value. */ Filter *string diff --git a/falcon/client/intel/query_intel_report_entities_parameters.go b/falcon/client/intel/query_intel_report_entities_parameters.go index eccec636b..526ca26fc 100644 --- a/falcon/client/intel/query_intel_report_entities_parameters.go +++ b/falcon/client/intel/query_intel_report_entities_parameters.go @@ -78,7 +78,7 @@ type QueryIntelReportEntitiesParams struct { Filter your query by specifying FQL filter parameters. Filter parameters include: - actors, actors.animal_classifier, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, summary, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. + actors, actors.animal_classifier, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, mitre_attack.id, mitre_attack.tactic_id, mitre_attack.tactic_name, mitre_attack.technique_id, mitre_attack.technique_name, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, summary, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. */ Filter *string diff --git a/falcon/client/intel/query_intel_report_ids_parameters.go b/falcon/client/intel/query_intel_report_ids_parameters.go index 4895f6ce9..5b95121b1 100644 --- a/falcon/client/intel/query_intel_report_ids_parameters.go +++ b/falcon/client/intel/query_intel_report_ids_parameters.go @@ -66,7 +66,7 @@ type QueryIntelReportIdsParams struct { Filter your query by specifying FQL filter parameters. Filter parameters include: - actors, actors.animal_classifier, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, summary, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. + actors, actors.animal_classifier, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, mitre_attack.id, mitre_attack.tactic_id, mitre_attack.tactic_name, mitre_attack.technique_id, mitre_attack.technique_name, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, summary, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. */ Filter *string diff --git a/falcon/client/intelligence_indicator_graph/lookup_indicators_responses.go b/falcon/client/intelligence_indicator_graph/lookup_indicators_responses.go index 9a0a6fd16..57abf94a9 100644 --- a/falcon/client/intelligence_indicator_graph/lookup_indicators_responses.go +++ b/falcon/client/intelligence_indicator_graph/lookup_indicators_responses.go @@ -507,8 +507,6 @@ type LookupIndicatorsTooManyRequests struct { /* Too many requests, retry after this time (as milliseconds since epoch) */ XRateLimitRetryAfter int64 - - Payload *models.MsaReplyMetaOnly } // IsSuccess returns true when this lookup indicators too many requests response has a 2xx status code @@ -542,15 +540,11 @@ func (o *LookupIndicatorsTooManyRequests) Code() int { } func (o *LookupIndicatorsTooManyRequests) Error() string { - return fmt.Sprintf("[POST /intelligence/combined/lookup-indicators/v1][%d] lookupIndicatorsTooManyRequests %+v", 429, o.Payload) + return fmt.Sprintf("[POST /intelligence/combined/lookup-indicators/v1][%d] lookupIndicatorsTooManyRequests ", 429) } func (o *LookupIndicatorsTooManyRequests) String() string { - return fmt.Sprintf("[POST /intelligence/combined/lookup-indicators/v1][%d] lookupIndicatorsTooManyRequests %+v", 429, o.Payload) -} - -func (o *LookupIndicatorsTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { - return o.Payload + return fmt.Sprintf("[POST /intelligence/combined/lookup-indicators/v1][%d] lookupIndicatorsTooManyRequests ", 429) } func (o *LookupIndicatorsTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -595,13 +589,6 @@ func (o *LookupIndicatorsTooManyRequests) readResponse(response runtime.ClientRe o.XRateLimitRetryAfter = valxRateLimitRetryAfter } - o.Payload = new(models.MsaReplyMetaOnly) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - return nil } diff --git a/falcon/client/intelligence_indicator_graph/search_indicators_responses.go b/falcon/client/intelligence_indicator_graph/search_indicators_responses.go index 393206f65..fb63656ec 100644 --- a/falcon/client/intelligence_indicator_graph/search_indicators_responses.go +++ b/falcon/client/intelligence_indicator_graph/search_indicators_responses.go @@ -507,8 +507,6 @@ type SearchIndicatorsTooManyRequests struct { /* Too many requests, retry after this time (as milliseconds since epoch) */ XRateLimitRetryAfter int64 - - Payload *models.MsaReplyMetaOnly } // IsSuccess returns true when this search indicators too many requests response has a 2xx status code @@ -542,15 +540,11 @@ func (o *SearchIndicatorsTooManyRequests) Code() int { } func (o *SearchIndicatorsTooManyRequests) Error() string { - return fmt.Sprintf("[POST /intelligence/combined/indicators/v1][%d] searchIndicatorsTooManyRequests %+v", 429, o.Payload) + return fmt.Sprintf("[POST /intelligence/combined/indicators/v1][%d] searchIndicatorsTooManyRequests ", 429) } func (o *SearchIndicatorsTooManyRequests) String() string { - return fmt.Sprintf("[POST /intelligence/combined/indicators/v1][%d] searchIndicatorsTooManyRequests %+v", 429, o.Payload) -} - -func (o *SearchIndicatorsTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { - return o.Payload + return fmt.Sprintf("[POST /intelligence/combined/indicators/v1][%d] searchIndicatorsTooManyRequests ", 429) } func (o *SearchIndicatorsTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -595,13 +589,6 @@ func (o *SearchIndicatorsTooManyRequests) readResponse(response runtime.ClientRe o.XRateLimitRetryAfter = valxRateLimitRetryAfter } - o.Payload = new(models.MsaReplyMetaOnly) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - return nil } diff --git a/falcon/client/it_automation/i_t_automation_update_scheduled_task_responses.go b/falcon/client/it_automation/i_t_automation_update_scheduled_task_responses.go index 102dcd291..89f522816 100644 --- a/falcon/client/it_automation/i_t_automation_update_scheduled_task_responses.go +++ b/falcon/client/it_automation/i_t_automation_update_scheduled_task_responses.go @@ -310,7 +310,7 @@ type ITAutomationUpdateScheduledTaskForbidden struct { */ XRateLimitRemaining int64 - Payload *models.MsaReplyMetaOnly + Payload *models.MsaspecResponseFields } // IsSuccess returns true when this i t automation update scheduled task forbidden response has a 2xx status code @@ -351,7 +351,7 @@ func (o *ITAutomationUpdateScheduledTaskForbidden) String() string { return fmt.Sprintf("[PATCH /it-automation/entities/scheduled-tasks/v1][%d] iTAutomationUpdateScheduledTaskForbidden %+v", 403, o.Payload) } -func (o *ITAutomationUpdateScheduledTaskForbidden) GetPayload() *models.MsaReplyMetaOnly { +func (o *ITAutomationUpdateScheduledTaskForbidden) GetPayload() *models.MsaspecResponseFields { return o.Payload } @@ -386,7 +386,7 @@ func (o *ITAutomationUpdateScheduledTaskForbidden) readResponse(response runtime o.XRateLimitRemaining = valxRateLimitRemaining } - o.Payload = new(models.MsaReplyMetaOnly) + o.Payload = new(models.MsaspecResponseFields) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/falcon/client/knowledge_base_files/entities_knowledge_base_files_create_v1_responses.go b/falcon/client/knowledge_base_files/entities_knowledge_base_files_create_v1_responses.go index e12206aa0..4603994bb 100644 --- a/falcon/client/knowledge_base_files/entities_knowledge_base_files_create_v1_responses.go +++ b/falcon/client/knowledge_base_files/entities_knowledge_base_files_create_v1_responses.go @@ -43,6 +43,12 @@ func (o *EntitiesKnowledgeBaseFilesCreateV1Reader) ReadResponse(response runtime return nil, err } return nil, result + case 409: + result := NewEntitiesKnowledgeBaseFilesCreateV1Conflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 429: result := NewEntitiesKnowledgeBaseFilesCreateV1TooManyRequests() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -390,6 +396,116 @@ func (o *EntitiesKnowledgeBaseFilesCreateV1Forbidden) readResponse(response runt return nil } +// NewEntitiesKnowledgeBaseFilesCreateV1Conflict creates a EntitiesKnowledgeBaseFilesCreateV1Conflict with default headers values +func NewEntitiesKnowledgeBaseFilesCreateV1Conflict() *EntitiesKnowledgeBaseFilesCreateV1Conflict { + return &EntitiesKnowledgeBaseFilesCreateV1Conflict{} +} + +/* +EntitiesKnowledgeBaseFilesCreateV1Conflict describes a response with status code 409, with default header values. + +File with this name already exists in the knowledge base +*/ +type EntitiesKnowledgeBaseFilesCreateV1Conflict struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APIErrorResponse +} + +// IsSuccess returns true when this entities knowledge base files create v1 conflict response has a 2xx status code +func (o *EntitiesKnowledgeBaseFilesCreateV1Conflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this entities knowledge base files create v1 conflict response has a 3xx status code +func (o *EntitiesKnowledgeBaseFilesCreateV1Conflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this entities knowledge base files create v1 conflict response has a 4xx status code +func (o *EntitiesKnowledgeBaseFilesCreateV1Conflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this entities knowledge base files create v1 conflict response has a 5xx status code +func (o *EntitiesKnowledgeBaseFilesCreateV1Conflict) IsServerError() bool { + return false +} + +// IsCode returns true when this entities knowledge base files create v1 conflict response a status code equal to that given +func (o *EntitiesKnowledgeBaseFilesCreateV1Conflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the entities knowledge base files create v1 conflict response +func (o *EntitiesKnowledgeBaseFilesCreateV1Conflict) Code() int { + return 409 +} + +func (o *EntitiesKnowledgeBaseFilesCreateV1Conflict) Error() string { + return fmt.Sprintf("[POST /agentic-studio/entities/knowledge_base_files/v1][%d] entitiesKnowledgeBaseFilesCreateV1Conflict %+v", 409, o.Payload) +} + +func (o *EntitiesKnowledgeBaseFilesCreateV1Conflict) String() string { + return fmt.Sprintf("[POST /agentic-studio/entities/knowledge_base_files/v1][%d] entitiesKnowledgeBaseFilesCreateV1Conflict %+v", 409, o.Payload) +} + +func (o *EntitiesKnowledgeBaseFilesCreateV1Conflict) GetPayload() *models.APIErrorResponse { + return o.Payload +} + +func (o *EntitiesKnowledgeBaseFilesCreateV1Conflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APIErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + // NewEntitiesKnowledgeBaseFilesCreateV1TooManyRequests creates a EntitiesKnowledgeBaseFilesCreateV1TooManyRequests with default headers values func NewEntitiesKnowledgeBaseFilesCreateV1TooManyRequests() *EntitiesKnowledgeBaseFilesCreateV1TooManyRequests { return &EntitiesKnowledgeBaseFilesCreateV1TooManyRequests{} diff --git a/falcon/client/knowledge_base_files/entities_knowledge_base_files_update_v1_responses.go b/falcon/client/knowledge_base_files/entities_knowledge_base_files_update_v1_responses.go index 88490f28b..6e1953da5 100644 --- a/falcon/client/knowledge_base_files/entities_knowledge_base_files_update_v1_responses.go +++ b/falcon/client/knowledge_base_files/entities_knowledge_base_files_update_v1_responses.go @@ -49,6 +49,12 @@ func (o *EntitiesKnowledgeBaseFilesUpdateV1Reader) ReadResponse(response runtime return nil, err } return nil, result + case 409: + result := NewEntitiesKnowledgeBaseFilesUpdateV1Conflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 429: result := NewEntitiesKnowledgeBaseFilesUpdateV1TooManyRequests() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -506,6 +512,116 @@ func (o *EntitiesKnowledgeBaseFilesUpdateV1NotFound) readResponse(response runti return nil } +// NewEntitiesKnowledgeBaseFilesUpdateV1Conflict creates a EntitiesKnowledgeBaseFilesUpdateV1Conflict with default headers values +func NewEntitiesKnowledgeBaseFilesUpdateV1Conflict() *EntitiesKnowledgeBaseFilesUpdateV1Conflict { + return &EntitiesKnowledgeBaseFilesUpdateV1Conflict{} +} + +/* +EntitiesKnowledgeBaseFilesUpdateV1Conflict describes a response with status code 409, with default header values. + +File with this name already exists in the knowledge base +*/ +type EntitiesKnowledgeBaseFilesUpdateV1Conflict struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APIErrorResponse +} + +// IsSuccess returns true when this entities knowledge base files update v1 conflict response has a 2xx status code +func (o *EntitiesKnowledgeBaseFilesUpdateV1Conflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this entities knowledge base files update v1 conflict response has a 3xx status code +func (o *EntitiesKnowledgeBaseFilesUpdateV1Conflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this entities knowledge base files update v1 conflict response has a 4xx status code +func (o *EntitiesKnowledgeBaseFilesUpdateV1Conflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this entities knowledge base files update v1 conflict response has a 5xx status code +func (o *EntitiesKnowledgeBaseFilesUpdateV1Conflict) IsServerError() bool { + return false +} + +// IsCode returns true when this entities knowledge base files update v1 conflict response a status code equal to that given +func (o *EntitiesKnowledgeBaseFilesUpdateV1Conflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the entities knowledge base files update v1 conflict response +func (o *EntitiesKnowledgeBaseFilesUpdateV1Conflict) Code() int { + return 409 +} + +func (o *EntitiesKnowledgeBaseFilesUpdateV1Conflict) Error() string { + return fmt.Sprintf("[PUT /agentic-studio/entities/knowledge_base_files/v1][%d] entitiesKnowledgeBaseFilesUpdateV1Conflict %+v", 409, o.Payload) +} + +func (o *EntitiesKnowledgeBaseFilesUpdateV1Conflict) String() string { + return fmt.Sprintf("[PUT /agentic-studio/entities/knowledge_base_files/v1][%d] entitiesKnowledgeBaseFilesUpdateV1Conflict %+v", 409, o.Payload) +} + +func (o *EntitiesKnowledgeBaseFilesUpdateV1Conflict) GetPayload() *models.APIErrorResponse { + return o.Payload +} + +func (o *EntitiesKnowledgeBaseFilesUpdateV1Conflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APIErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + // NewEntitiesKnowledgeBaseFilesUpdateV1TooManyRequests creates a EntitiesKnowledgeBaseFilesUpdateV1TooManyRequests with default headers values func NewEntitiesKnowledgeBaseFilesUpdateV1TooManyRequests() *EntitiesKnowledgeBaseFilesUpdateV1TooManyRequests { return &EntitiesKnowledgeBaseFilesUpdateV1TooManyRequests{} diff --git a/falcon/client/knowledge_bases/combined_knowledge_bases_v1_parameters.go b/falcon/client/knowledge_bases/combined_knowledge_bases_v1_parameters.go new file mode 100644 index 000000000..1515bcead --- /dev/null +++ b/falcon/client/knowledge_bases/combined_knowledge_bases_v1_parameters.go @@ -0,0 +1,316 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package knowledge_bases + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewCombinedKnowledgeBasesV1Params creates a new CombinedKnowledgeBasesV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCombinedKnowledgeBasesV1Params() *CombinedKnowledgeBasesV1Params { + return &CombinedKnowledgeBasesV1Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewCombinedKnowledgeBasesV1ParamsWithTimeout creates a new CombinedKnowledgeBasesV1Params object +// with the ability to set a timeout on a request. +func NewCombinedKnowledgeBasesV1ParamsWithTimeout(timeout time.Duration) *CombinedKnowledgeBasesV1Params { + return &CombinedKnowledgeBasesV1Params{ + timeout: timeout, + } +} + +// NewCombinedKnowledgeBasesV1ParamsWithContext creates a new CombinedKnowledgeBasesV1Params object +// with the ability to set a context for a request. +func NewCombinedKnowledgeBasesV1ParamsWithContext(ctx context.Context) *CombinedKnowledgeBasesV1Params { + return &CombinedKnowledgeBasesV1Params{ + Context: ctx, + } +} + +// NewCombinedKnowledgeBasesV1ParamsWithHTTPClient creates a new CombinedKnowledgeBasesV1Params object +// with the ability to set a custom HTTPClient for a request. +func NewCombinedKnowledgeBasesV1ParamsWithHTTPClient(client *http.Client) *CombinedKnowledgeBasesV1Params { + return &CombinedKnowledgeBasesV1Params{ + HTTPClient: client, + } +} + +/* +CombinedKnowledgeBasesV1Params contains all the parameters to send to the API endpoint + + for the combined knowledge bases v1 operation. + + Typically these are written to a http.Request. +*/ +type CombinedKnowledgeBasesV1Params struct { + + /* Filter. + + FQL query specifying the filter parameters. + */ + Filter *string + + /* IncludeDeleted. + + Include deleted knowledge bases in the result. Defaults to false. + */ + IncludeDeleted *bool + + /* Limit. + + Number of ids to return. Offset + limit should NOT be above 10K. + + Default: 10 + */ + Limit *int64 + + /* Offset. + + Starting index of overall result set from which to return ids. + */ + Offset *int64 + + /* Sort. + + Possible order by fields: name, created_at. Ex: 'created_at|desc' or 'name|asc'. + */ + Sort *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the combined knowledge bases v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CombinedKnowledgeBasesV1Params) WithDefaults() *CombinedKnowledgeBasesV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the combined knowledge bases v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CombinedKnowledgeBasesV1Params) SetDefaults() { + var ( + includeDeletedDefault = bool(false) + + limitDefault = int64(10) + ) + + val := CombinedKnowledgeBasesV1Params{ + IncludeDeleted: &includeDeletedDefault, + Limit: &limitDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) WithTimeout(timeout time.Duration) *CombinedKnowledgeBasesV1Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) WithContext(ctx context.Context) *CombinedKnowledgeBasesV1Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) WithHTTPClient(client *http.Client) *CombinedKnowledgeBasesV1Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilter adds the filter to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) WithFilter(filter *string) *CombinedKnowledgeBasesV1Params { + o.SetFilter(filter) + return o +} + +// SetFilter adds the filter to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) SetFilter(filter *string) { + o.Filter = filter +} + +// WithIncludeDeleted adds the includeDeleted to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) WithIncludeDeleted(includeDeleted *bool) *CombinedKnowledgeBasesV1Params { + o.SetIncludeDeleted(includeDeleted) + return o +} + +// SetIncludeDeleted adds the includeDeleted to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) SetIncludeDeleted(includeDeleted *bool) { + o.IncludeDeleted = includeDeleted +} + +// WithLimit adds the limit to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) WithLimit(limit *int64) *CombinedKnowledgeBasesV1Params { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) WithOffset(offset *int64) *CombinedKnowledgeBasesV1Params { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithSort adds the sort to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) WithSort(sort *string) *CombinedKnowledgeBasesV1Params { + o.SetSort(sort) + return o +} + +// SetSort adds the sort to the combined knowledge bases v1 params +func (o *CombinedKnowledgeBasesV1Params) SetSort(sort *string) { + o.Sort = sort +} + +// WriteToRequest writes these params to a swagger request +func (o *CombinedKnowledgeBasesV1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filter != nil { + + // query param filter + var qrFilter string + + if o.Filter != nil { + qrFilter = *o.Filter + } + qFilter := qrFilter + if qFilter != "" { + + if err := r.SetQueryParam("filter", qFilter); err != nil { + return err + } + } + } + + if o.IncludeDeleted != nil { + + // query param include_deleted + var qrIncludeDeleted bool + + if o.IncludeDeleted != nil { + qrIncludeDeleted = *o.IncludeDeleted + } + qIncludeDeleted := swag.FormatBool(qrIncludeDeleted) + if qIncludeDeleted != "" { + + if err := r.SetQueryParam("include_deleted", qIncludeDeleted); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Sort != nil { + + // query param sort + var qrSort string + + if o.Sort != nil { + qrSort = *o.Sort + } + qSort := qrSort + if qSort != "" { + + if err := r.SetQueryParam("sort", qSort); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/knowledge_bases/combined_knowledge_bases_v1_responses.go b/falcon/client/knowledge_bases/combined_knowledge_bases_v1_responses.go new file mode 100644 index 000000000..355110491 --- /dev/null +++ b/falcon/client/knowledge_bases/combined_knowledge_bases_v1_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package knowledge_bases + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CombinedKnowledgeBasesV1Reader is a Reader for the CombinedKnowledgeBasesV1 structure. +type CombinedKnowledgeBasesV1Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CombinedKnowledgeBasesV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCombinedKnowledgeBasesV1OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCombinedKnowledgeBasesV1BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCombinedKnowledgeBasesV1Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCombinedKnowledgeBasesV1TooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCombinedKnowledgeBasesV1InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /agentic-studio/combined/knowledge_bases/v1] CombinedKnowledgeBasesV1", response, response.Code()) + } +} + +// NewCombinedKnowledgeBasesV1OK creates a CombinedKnowledgeBasesV1OK with default headers values +func NewCombinedKnowledgeBasesV1OK() *CombinedKnowledgeBasesV1OK { + return &CombinedKnowledgeBasesV1OK{} +} + +/* +CombinedKnowledgeBasesV1OK describes a response with status code 200, with default header values. + +Successfully retrieved +*/ +type CombinedKnowledgeBasesV1OK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.DomainReplyEntitiesKnowledgeBasesResponse +} + +// IsSuccess returns true when this combined knowledge bases v1 o k response has a 2xx status code +func (o *CombinedKnowledgeBasesV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this combined knowledge bases v1 o k response has a 3xx status code +func (o *CombinedKnowledgeBasesV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this combined knowledge bases v1 o k response has a 4xx status code +func (o *CombinedKnowledgeBasesV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this combined knowledge bases v1 o k response has a 5xx status code +func (o *CombinedKnowledgeBasesV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this combined knowledge bases v1 o k response a status code equal to that given +func (o *CombinedKnowledgeBasesV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the combined knowledge bases v1 o k response +func (o *CombinedKnowledgeBasesV1OK) Code() int { + return 200 +} + +func (o *CombinedKnowledgeBasesV1OK) Error() string { + return fmt.Sprintf("[GET /agentic-studio/combined/knowledge_bases/v1][%d] combinedKnowledgeBasesV1OK %+v", 200, o.Payload) +} + +func (o *CombinedKnowledgeBasesV1OK) String() string { + return fmt.Sprintf("[GET /agentic-studio/combined/knowledge_bases/v1][%d] combinedKnowledgeBasesV1OK %+v", 200, o.Payload) +} + +func (o *CombinedKnowledgeBasesV1OK) GetPayload() *models.DomainReplyEntitiesKnowledgeBasesResponse { + return o.Payload +} + +func (o *CombinedKnowledgeBasesV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.DomainReplyEntitiesKnowledgeBasesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCombinedKnowledgeBasesV1BadRequest creates a CombinedKnowledgeBasesV1BadRequest with default headers values +func NewCombinedKnowledgeBasesV1BadRequest() *CombinedKnowledgeBasesV1BadRequest { + return &CombinedKnowledgeBasesV1BadRequest{} +} + +/* +CombinedKnowledgeBasesV1BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CombinedKnowledgeBasesV1BadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APIErrorResponse +} + +// IsSuccess returns true when this combined knowledge bases v1 bad request response has a 2xx status code +func (o *CombinedKnowledgeBasesV1BadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this combined knowledge bases v1 bad request response has a 3xx status code +func (o *CombinedKnowledgeBasesV1BadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this combined knowledge bases v1 bad request response has a 4xx status code +func (o *CombinedKnowledgeBasesV1BadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this combined knowledge bases v1 bad request response has a 5xx status code +func (o *CombinedKnowledgeBasesV1BadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this combined knowledge bases v1 bad request response a status code equal to that given +func (o *CombinedKnowledgeBasesV1BadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the combined knowledge bases v1 bad request response +func (o *CombinedKnowledgeBasesV1BadRequest) Code() int { + return 400 +} + +func (o *CombinedKnowledgeBasesV1BadRequest) Error() string { + return fmt.Sprintf("[GET /agentic-studio/combined/knowledge_bases/v1][%d] combinedKnowledgeBasesV1BadRequest %+v", 400, o.Payload) +} + +func (o *CombinedKnowledgeBasesV1BadRequest) String() string { + return fmt.Sprintf("[GET /agentic-studio/combined/knowledge_bases/v1][%d] combinedKnowledgeBasesV1BadRequest %+v", 400, o.Payload) +} + +func (o *CombinedKnowledgeBasesV1BadRequest) GetPayload() *models.APIErrorResponse { + return o.Payload +} + +func (o *CombinedKnowledgeBasesV1BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APIErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCombinedKnowledgeBasesV1Forbidden creates a CombinedKnowledgeBasesV1Forbidden with default headers values +func NewCombinedKnowledgeBasesV1Forbidden() *CombinedKnowledgeBasesV1Forbidden { + return &CombinedKnowledgeBasesV1Forbidden{} +} + +/* +CombinedKnowledgeBasesV1Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CombinedKnowledgeBasesV1Forbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this combined knowledge bases v1 forbidden response has a 2xx status code +func (o *CombinedKnowledgeBasesV1Forbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this combined knowledge bases v1 forbidden response has a 3xx status code +func (o *CombinedKnowledgeBasesV1Forbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this combined knowledge bases v1 forbidden response has a 4xx status code +func (o *CombinedKnowledgeBasesV1Forbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this combined knowledge bases v1 forbidden response has a 5xx status code +func (o *CombinedKnowledgeBasesV1Forbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this combined knowledge bases v1 forbidden response a status code equal to that given +func (o *CombinedKnowledgeBasesV1Forbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the combined knowledge bases v1 forbidden response +func (o *CombinedKnowledgeBasesV1Forbidden) Code() int { + return 403 +} + +func (o *CombinedKnowledgeBasesV1Forbidden) Error() string { + return fmt.Sprintf("[GET /agentic-studio/combined/knowledge_bases/v1][%d] combinedKnowledgeBasesV1Forbidden %+v", 403, o.Payload) +} + +func (o *CombinedKnowledgeBasesV1Forbidden) String() string { + return fmt.Sprintf("[GET /agentic-studio/combined/knowledge_bases/v1][%d] combinedKnowledgeBasesV1Forbidden %+v", 403, o.Payload) +} + +func (o *CombinedKnowledgeBasesV1Forbidden) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CombinedKnowledgeBasesV1Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCombinedKnowledgeBasesV1TooManyRequests creates a CombinedKnowledgeBasesV1TooManyRequests with default headers values +func NewCombinedKnowledgeBasesV1TooManyRequests() *CombinedKnowledgeBasesV1TooManyRequests { + return &CombinedKnowledgeBasesV1TooManyRequests{} +} + +/* +CombinedKnowledgeBasesV1TooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CombinedKnowledgeBasesV1TooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this combined knowledge bases v1 too many requests response has a 2xx status code +func (o *CombinedKnowledgeBasesV1TooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this combined knowledge bases v1 too many requests response has a 3xx status code +func (o *CombinedKnowledgeBasesV1TooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this combined knowledge bases v1 too many requests response has a 4xx status code +func (o *CombinedKnowledgeBasesV1TooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this combined knowledge bases v1 too many requests response has a 5xx status code +func (o *CombinedKnowledgeBasesV1TooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this combined knowledge bases v1 too many requests response a status code equal to that given +func (o *CombinedKnowledgeBasesV1TooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the combined knowledge bases v1 too many requests response +func (o *CombinedKnowledgeBasesV1TooManyRequests) Code() int { + return 429 +} + +func (o *CombinedKnowledgeBasesV1TooManyRequests) Error() string { + return fmt.Sprintf("[GET /agentic-studio/combined/knowledge_bases/v1][%d] combinedKnowledgeBasesV1TooManyRequests %+v", 429, o.Payload) +} + +func (o *CombinedKnowledgeBasesV1TooManyRequests) String() string { + return fmt.Sprintf("[GET /agentic-studio/combined/knowledge_bases/v1][%d] combinedKnowledgeBasesV1TooManyRequests %+v", 429, o.Payload) +} + +func (o *CombinedKnowledgeBasesV1TooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CombinedKnowledgeBasesV1TooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCombinedKnowledgeBasesV1InternalServerError creates a CombinedKnowledgeBasesV1InternalServerError with default headers values +func NewCombinedKnowledgeBasesV1InternalServerError() *CombinedKnowledgeBasesV1InternalServerError { + return &CombinedKnowledgeBasesV1InternalServerError{} +} + +/* +CombinedKnowledgeBasesV1InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CombinedKnowledgeBasesV1InternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APIErrorResponse +} + +// IsSuccess returns true when this combined knowledge bases v1 internal server error response has a 2xx status code +func (o *CombinedKnowledgeBasesV1InternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this combined knowledge bases v1 internal server error response has a 3xx status code +func (o *CombinedKnowledgeBasesV1InternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this combined knowledge bases v1 internal server error response has a 4xx status code +func (o *CombinedKnowledgeBasesV1InternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this combined knowledge bases v1 internal server error response has a 5xx status code +func (o *CombinedKnowledgeBasesV1InternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this combined knowledge bases v1 internal server error response a status code equal to that given +func (o *CombinedKnowledgeBasesV1InternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the combined knowledge bases v1 internal server error response +func (o *CombinedKnowledgeBasesV1InternalServerError) Code() int { + return 500 +} + +func (o *CombinedKnowledgeBasesV1InternalServerError) Error() string { + return fmt.Sprintf("[GET /agentic-studio/combined/knowledge_bases/v1][%d] combinedKnowledgeBasesV1InternalServerError %+v", 500, o.Payload) +} + +func (o *CombinedKnowledgeBasesV1InternalServerError) String() string { + return fmt.Sprintf("[GET /agentic-studio/combined/knowledge_bases/v1][%d] combinedKnowledgeBasesV1InternalServerError %+v", 500, o.Payload) +} + +func (o *CombinedKnowledgeBasesV1InternalServerError) GetPayload() *models.APIErrorResponse { + return o.Payload +} + +func (o *CombinedKnowledgeBasesV1InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APIErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/knowledge_bases/knowledge_bases_client.go b/falcon/client/knowledge_bases/knowledge_bases_client.go index 8942787cd..c92af6c59 100644 --- a/falcon/client/knowledge_bases/knowledge_bases_client.go +++ b/falcon/client/knowledge_bases/knowledge_bases_client.go @@ -32,6 +32,8 @@ type ClientOption func(*runtime.ClientOperation) type ClientService interface { AggregatesKnowledgeBasesV1(params *AggregatesKnowledgeBasesV1Params, opts ...ClientOption) (*AggregatesKnowledgeBasesV1OK, error) + CombinedKnowledgeBasesV1(params *CombinedKnowledgeBasesV1Params, opts ...ClientOption) (*CombinedKnowledgeBasesV1OK, error) + EntitiesKnowledgeBasesCreateV1(params *EntitiesKnowledgeBasesCreateV1Params, opts ...ClientOption) (*EntitiesKnowledgeBasesCreateV1OK, error) EntitiesKnowledgeBasesUpdateV1(params *EntitiesKnowledgeBasesUpdateV1Params, opts ...ClientOption) (*EntitiesKnowledgeBasesUpdateV1OK, error) @@ -81,6 +83,44 @@ func (a *Client) AggregatesKnowledgeBasesV1(params *AggregatesKnowledgeBasesV1Pa panic(msg) } +/* +CombinedKnowledgeBasesV1 searches for knowledge bases with filtering and return full entity details in a single response +*/ +func (a *Client) CombinedKnowledgeBasesV1(params *CombinedKnowledgeBasesV1Params, opts ...ClientOption) (*CombinedKnowledgeBasesV1OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCombinedKnowledgeBasesV1Params() + } + op := &runtime.ClientOperation{ + ID: "CombinedKnowledgeBasesV1", + Method: "GET", + PathPattern: "/agentic-studio/combined/knowledge_bases/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CombinedKnowledgeBasesV1Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CombinedKnowledgeBasesV1OK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for CombinedKnowledgeBasesV1: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* EntitiesKnowledgeBasesCreateV1 creates or update a knowledge base for deletion provide knowledge base with is deleted true */ diff --git a/falcon/client/ngsiem/bulk_create_dashboards_from_template_parameters.go b/falcon/client/ngsiem/bulk_create_dashboards_from_template_parameters.go new file mode 100644 index 000000000..21728a04c --- /dev/null +++ b/falcon/client/ngsiem/bulk_create_dashboards_from_template_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewBulkCreateDashboardsFromTemplateParams creates a new BulkCreateDashboardsFromTemplateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBulkCreateDashboardsFromTemplateParams() *BulkCreateDashboardsFromTemplateParams { + return &BulkCreateDashboardsFromTemplateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBulkCreateDashboardsFromTemplateParamsWithTimeout creates a new BulkCreateDashboardsFromTemplateParams object +// with the ability to set a timeout on a request. +func NewBulkCreateDashboardsFromTemplateParamsWithTimeout(timeout time.Duration) *BulkCreateDashboardsFromTemplateParams { + return &BulkCreateDashboardsFromTemplateParams{ + timeout: timeout, + } +} + +// NewBulkCreateDashboardsFromTemplateParamsWithContext creates a new BulkCreateDashboardsFromTemplateParams object +// with the ability to set a context for a request. +func NewBulkCreateDashboardsFromTemplateParamsWithContext(ctx context.Context) *BulkCreateDashboardsFromTemplateParams { + return &BulkCreateDashboardsFromTemplateParams{ + Context: ctx, + } +} + +// NewBulkCreateDashboardsFromTemplateParamsWithHTTPClient creates a new BulkCreateDashboardsFromTemplateParams object +// with the ability to set a custom HTTPClient for a request. +func NewBulkCreateDashboardsFromTemplateParamsWithHTTPClient(client *http.Client) *BulkCreateDashboardsFromTemplateParams { + return &BulkCreateDashboardsFromTemplateParams{ + HTTPClient: client, + } +} + +/* +BulkCreateDashboardsFromTemplateParams contains all the parameters to send to the API endpoint + + for the bulk create dashboards from template operation. + + Typically these are written to a http.Request. +*/ +type BulkCreateDashboardsFromTemplateParams struct { + + // Body. + Body *models.APIBulkCreateDashboardsFromTemplateRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bulk create dashboards from template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkCreateDashboardsFromTemplateParams) WithDefaults() *BulkCreateDashboardsFromTemplateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bulk create dashboards from template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkCreateDashboardsFromTemplateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bulk create dashboards from template params +func (o *BulkCreateDashboardsFromTemplateParams) WithTimeout(timeout time.Duration) *BulkCreateDashboardsFromTemplateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bulk create dashboards from template params +func (o *BulkCreateDashboardsFromTemplateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bulk create dashboards from template params +func (o *BulkCreateDashboardsFromTemplateParams) WithContext(ctx context.Context) *BulkCreateDashboardsFromTemplateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bulk create dashboards from template params +func (o *BulkCreateDashboardsFromTemplateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bulk create dashboards from template params +func (o *BulkCreateDashboardsFromTemplateParams) WithHTTPClient(client *http.Client) *BulkCreateDashboardsFromTemplateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bulk create dashboards from template params +func (o *BulkCreateDashboardsFromTemplateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bulk create dashboards from template params +func (o *BulkCreateDashboardsFromTemplateParams) WithBody(body *models.APIBulkCreateDashboardsFromTemplateRequestV1) *BulkCreateDashboardsFromTemplateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bulk create dashboards from template params +func (o *BulkCreateDashboardsFromTemplateParams) SetBody(body *models.APIBulkCreateDashboardsFromTemplateRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *BulkCreateDashboardsFromTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/ngsiem/bulk_create_dashboards_from_template_responses.go b/falcon/client/ngsiem/bulk_create_dashboards_from_template_responses.go new file mode 100644 index 000000000..d64384579 --- /dev/null +++ b/falcon/client/ngsiem/bulk_create_dashboards_from_template_responses.go @@ -0,0 +1,858 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// BulkCreateDashboardsFromTemplateReader is a Reader for the BulkCreateDashboardsFromTemplate structure. +type BulkCreateDashboardsFromTemplateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BulkCreateDashboardsFromTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBulkCreateDashboardsFromTemplateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBulkCreateDashboardsFromTemplateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBulkCreateDashboardsFromTemplateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewBulkCreateDashboardsFromTemplateForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBulkCreateDashboardsFromTemplateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewBulkCreateDashboardsFromTemplateTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBulkCreateDashboardsFromTemplateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /ngsiem-content/entities/bulk-dashboards-template/v1] BulkCreateDashboardsFromTemplate", response, response.Code()) + } +} + +// NewBulkCreateDashboardsFromTemplateOK creates a BulkCreateDashboardsFromTemplateOK with default headers values +func NewBulkCreateDashboardsFromTemplateOK() *BulkCreateDashboardsFromTemplateOK { + return &BulkCreateDashboardsFromTemplateOK{} +} + +/* +BulkCreateDashboardsFromTemplateOK describes a response with status code 200, with default header values. + +BulkCreateDashboardsFromTemplateOK bulk create dashboards from template o k +*/ +type BulkCreateDashboardsFromTemplateOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APIBulkCreateDashboardsFromTemplateResponseV1 +} + +// IsSuccess returns true when this bulk create dashboards from template o k response has a 2xx status code +func (o *BulkCreateDashboardsFromTemplateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this bulk create dashboards from template o k response has a 3xx status code +func (o *BulkCreateDashboardsFromTemplateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create dashboards from template o k response has a 4xx status code +func (o *BulkCreateDashboardsFromTemplateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk create dashboards from template o k response has a 5xx status code +func (o *BulkCreateDashboardsFromTemplateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create dashboards from template o k response a status code equal to that given +func (o *BulkCreateDashboardsFromTemplateOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the bulk create dashboards from template o k response +func (o *BulkCreateDashboardsFromTemplateOK) Code() int { + return 200 +} + +func (o *BulkCreateDashboardsFromTemplateOK) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateOK %+v", 200, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateOK) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateOK %+v", 200, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateOK) GetPayload() *models.APIBulkCreateDashboardsFromTemplateResponseV1 { + return o.Payload +} + +func (o *BulkCreateDashboardsFromTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APIBulkCreateDashboardsFromTemplateResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateDashboardsFromTemplateBadRequest creates a BulkCreateDashboardsFromTemplateBadRequest with default headers values +func NewBulkCreateDashboardsFromTemplateBadRequest() *BulkCreateDashboardsFromTemplateBadRequest { + return &BulkCreateDashboardsFromTemplateBadRequest{} +} + +/* +BulkCreateDashboardsFromTemplateBadRequest describes a response with status code 400, with default header values. + +Bad request for content operations +*/ +type BulkCreateDashboardsFromTemplateBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create dashboards from template bad request response has a 2xx status code +func (o *BulkCreateDashboardsFromTemplateBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create dashboards from template bad request response has a 3xx status code +func (o *BulkCreateDashboardsFromTemplateBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create dashboards from template bad request response has a 4xx status code +func (o *BulkCreateDashboardsFromTemplateBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create dashboards from template bad request response has a 5xx status code +func (o *BulkCreateDashboardsFromTemplateBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create dashboards from template bad request response a status code equal to that given +func (o *BulkCreateDashboardsFromTemplateBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the bulk create dashboards from template bad request response +func (o *BulkCreateDashboardsFromTemplateBadRequest) Code() int { + return 400 +} + +func (o *BulkCreateDashboardsFromTemplateBadRequest) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateBadRequest %+v", 400, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateBadRequest) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateBadRequest %+v", 400, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateDashboardsFromTemplateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateDashboardsFromTemplateUnauthorized creates a BulkCreateDashboardsFromTemplateUnauthorized with default headers values +func NewBulkCreateDashboardsFromTemplateUnauthorized() *BulkCreateDashboardsFromTemplateUnauthorized { + return &BulkCreateDashboardsFromTemplateUnauthorized{} +} + +/* +BulkCreateDashboardsFromTemplateUnauthorized describes a response with status code 401, with default header values. + +Requestor is not authorized to access resource +*/ +type BulkCreateDashboardsFromTemplateUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create dashboards from template unauthorized response has a 2xx status code +func (o *BulkCreateDashboardsFromTemplateUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create dashboards from template unauthorized response has a 3xx status code +func (o *BulkCreateDashboardsFromTemplateUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create dashboards from template unauthorized response has a 4xx status code +func (o *BulkCreateDashboardsFromTemplateUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create dashboards from template unauthorized response has a 5xx status code +func (o *BulkCreateDashboardsFromTemplateUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create dashboards from template unauthorized response a status code equal to that given +func (o *BulkCreateDashboardsFromTemplateUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the bulk create dashboards from template unauthorized response +func (o *BulkCreateDashboardsFromTemplateUnauthorized) Code() int { + return 401 +} + +func (o *BulkCreateDashboardsFromTemplateUnauthorized) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateUnauthorized) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateUnauthorized) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateDashboardsFromTemplateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateDashboardsFromTemplateForbidden creates a BulkCreateDashboardsFromTemplateForbidden with default headers values +func NewBulkCreateDashboardsFromTemplateForbidden() *BulkCreateDashboardsFromTemplateForbidden { + return &BulkCreateDashboardsFromTemplateForbidden{} +} + +/* +BulkCreateDashboardsFromTemplateForbidden describes a response with status code 403, with default header values. + +Content access is not allowed +*/ +type BulkCreateDashboardsFromTemplateForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create dashboards from template forbidden response has a 2xx status code +func (o *BulkCreateDashboardsFromTemplateForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create dashboards from template forbidden response has a 3xx status code +func (o *BulkCreateDashboardsFromTemplateForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create dashboards from template forbidden response has a 4xx status code +func (o *BulkCreateDashboardsFromTemplateForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create dashboards from template forbidden response has a 5xx status code +func (o *BulkCreateDashboardsFromTemplateForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create dashboards from template forbidden response a status code equal to that given +func (o *BulkCreateDashboardsFromTemplateForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the bulk create dashboards from template forbidden response +func (o *BulkCreateDashboardsFromTemplateForbidden) Code() int { + return 403 +} + +func (o *BulkCreateDashboardsFromTemplateForbidden) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateForbidden %+v", 403, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateForbidden) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateForbidden %+v", 403, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateDashboardsFromTemplateForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateDashboardsFromTemplateNotFound creates a BulkCreateDashboardsFromTemplateNotFound with default headers values +func NewBulkCreateDashboardsFromTemplateNotFound() *BulkCreateDashboardsFromTemplateNotFound { + return &BulkCreateDashboardsFromTemplateNotFound{} +} + +/* +BulkCreateDashboardsFromTemplateNotFound describes a response with status code 404, with default header values. + +Content resource does not exist +*/ +type BulkCreateDashboardsFromTemplateNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create dashboards from template not found response has a 2xx status code +func (o *BulkCreateDashboardsFromTemplateNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create dashboards from template not found response has a 3xx status code +func (o *BulkCreateDashboardsFromTemplateNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create dashboards from template not found response has a 4xx status code +func (o *BulkCreateDashboardsFromTemplateNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create dashboards from template not found response has a 5xx status code +func (o *BulkCreateDashboardsFromTemplateNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create dashboards from template not found response a status code equal to that given +func (o *BulkCreateDashboardsFromTemplateNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the bulk create dashboards from template not found response +func (o *BulkCreateDashboardsFromTemplateNotFound) Code() int { + return 404 +} + +func (o *BulkCreateDashboardsFromTemplateNotFound) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateNotFound %+v", 404, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateNotFound) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateNotFound %+v", 404, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateNotFound) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateDashboardsFromTemplateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateDashboardsFromTemplateTooManyRequests creates a BulkCreateDashboardsFromTemplateTooManyRequests with default headers values +func NewBulkCreateDashboardsFromTemplateTooManyRequests() *BulkCreateDashboardsFromTemplateTooManyRequests { + return &BulkCreateDashboardsFromTemplateTooManyRequests{} +} + +/* +BulkCreateDashboardsFromTemplateTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type BulkCreateDashboardsFromTemplateTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this bulk create dashboards from template too many requests response has a 2xx status code +func (o *BulkCreateDashboardsFromTemplateTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create dashboards from template too many requests response has a 3xx status code +func (o *BulkCreateDashboardsFromTemplateTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create dashboards from template too many requests response has a 4xx status code +func (o *BulkCreateDashboardsFromTemplateTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create dashboards from template too many requests response has a 5xx status code +func (o *BulkCreateDashboardsFromTemplateTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create dashboards from template too many requests response a status code equal to that given +func (o *BulkCreateDashboardsFromTemplateTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the bulk create dashboards from template too many requests response +func (o *BulkCreateDashboardsFromTemplateTooManyRequests) Code() int { + return 429 +} + +func (o *BulkCreateDashboardsFromTemplateTooManyRequests) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateTooManyRequests) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *BulkCreateDashboardsFromTemplateTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateDashboardsFromTemplateInternalServerError creates a BulkCreateDashboardsFromTemplateInternalServerError with default headers values +func NewBulkCreateDashboardsFromTemplateInternalServerError() *BulkCreateDashboardsFromTemplateInternalServerError { + return &BulkCreateDashboardsFromTemplateInternalServerError{} +} + +/* +BulkCreateDashboardsFromTemplateInternalServerError describes a response with status code 500, with default header values. + +Unexpected error occurred +*/ +type BulkCreateDashboardsFromTemplateInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create dashboards from template internal server error response has a 2xx status code +func (o *BulkCreateDashboardsFromTemplateInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create dashboards from template internal server error response has a 3xx status code +func (o *BulkCreateDashboardsFromTemplateInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create dashboards from template internal server error response has a 4xx status code +func (o *BulkCreateDashboardsFromTemplateInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk create dashboards from template internal server error response has a 5xx status code +func (o *BulkCreateDashboardsFromTemplateInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this bulk create dashboards from template internal server error response a status code equal to that given +func (o *BulkCreateDashboardsFromTemplateInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the bulk create dashboards from template internal server error response +func (o *BulkCreateDashboardsFromTemplateInternalServerError) Code() int { + return 500 +} + +func (o *BulkCreateDashboardsFromTemplateInternalServerError) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateInternalServerError) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkCreateDashboardsFromTemplateInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkCreateDashboardsFromTemplateInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateDashboardsFromTemplateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/ngsiem/bulk_create_lookup_files_parameters.go b/falcon/client/ngsiem/bulk_create_lookup_files_parameters.go new file mode 100644 index 000000000..ec6773d44 --- /dev/null +++ b/falcon/client/ngsiem/bulk_create_lookup_files_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewBulkCreateLookupFilesParams creates a new BulkCreateLookupFilesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBulkCreateLookupFilesParams() *BulkCreateLookupFilesParams { + return &BulkCreateLookupFilesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBulkCreateLookupFilesParamsWithTimeout creates a new BulkCreateLookupFilesParams object +// with the ability to set a timeout on a request. +func NewBulkCreateLookupFilesParamsWithTimeout(timeout time.Duration) *BulkCreateLookupFilesParams { + return &BulkCreateLookupFilesParams{ + timeout: timeout, + } +} + +// NewBulkCreateLookupFilesParamsWithContext creates a new BulkCreateLookupFilesParams object +// with the ability to set a context for a request. +func NewBulkCreateLookupFilesParamsWithContext(ctx context.Context) *BulkCreateLookupFilesParams { + return &BulkCreateLookupFilesParams{ + Context: ctx, + } +} + +// NewBulkCreateLookupFilesParamsWithHTTPClient creates a new BulkCreateLookupFilesParams object +// with the ability to set a custom HTTPClient for a request. +func NewBulkCreateLookupFilesParamsWithHTTPClient(client *http.Client) *BulkCreateLookupFilesParams { + return &BulkCreateLookupFilesParams{ + HTTPClient: client, + } +} + +/* +BulkCreateLookupFilesParams contains all the parameters to send to the API endpoint + + for the bulk create lookup files operation. + + Typically these are written to a http.Request. +*/ +type BulkCreateLookupFilesParams struct { + + // Body. + Body *models.APIBulkCreateLookupFilesRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bulk create lookup files params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkCreateLookupFilesParams) WithDefaults() *BulkCreateLookupFilesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bulk create lookup files params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkCreateLookupFilesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bulk create lookup files params +func (o *BulkCreateLookupFilesParams) WithTimeout(timeout time.Duration) *BulkCreateLookupFilesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bulk create lookup files params +func (o *BulkCreateLookupFilesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bulk create lookup files params +func (o *BulkCreateLookupFilesParams) WithContext(ctx context.Context) *BulkCreateLookupFilesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bulk create lookup files params +func (o *BulkCreateLookupFilesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bulk create lookup files params +func (o *BulkCreateLookupFilesParams) WithHTTPClient(client *http.Client) *BulkCreateLookupFilesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bulk create lookup files params +func (o *BulkCreateLookupFilesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bulk create lookup files params +func (o *BulkCreateLookupFilesParams) WithBody(body *models.APIBulkCreateLookupFilesRequestV1) *BulkCreateLookupFilesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bulk create lookup files params +func (o *BulkCreateLookupFilesParams) SetBody(body *models.APIBulkCreateLookupFilesRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *BulkCreateLookupFilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/ngsiem/bulk_create_lookup_files_responses.go b/falcon/client/ngsiem/bulk_create_lookup_files_responses.go new file mode 100644 index 000000000..3faf6169a --- /dev/null +++ b/falcon/client/ngsiem/bulk_create_lookup_files_responses.go @@ -0,0 +1,858 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// BulkCreateLookupFilesReader is a Reader for the BulkCreateLookupFiles structure. +type BulkCreateLookupFilesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BulkCreateLookupFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBulkCreateLookupFilesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBulkCreateLookupFilesBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBulkCreateLookupFilesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewBulkCreateLookupFilesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBulkCreateLookupFilesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewBulkCreateLookupFilesTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBulkCreateLookupFilesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /ngsiem-content/entities/bulk-lookupfiles/v1] BulkCreateLookupFiles", response, response.Code()) + } +} + +// NewBulkCreateLookupFilesOK creates a BulkCreateLookupFilesOK with default headers values +func NewBulkCreateLookupFilesOK() *BulkCreateLookupFilesOK { + return &BulkCreateLookupFilesOK{} +} + +/* +BulkCreateLookupFilesOK describes a response with status code 200, with default header values. + +BulkCreateLookupFilesOK bulk create lookup files o k +*/ +type BulkCreateLookupFilesOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APIBulkCreateLookupFilesResponseV1 +} + +// IsSuccess returns true when this bulk create lookup files o k response has a 2xx status code +func (o *BulkCreateLookupFilesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this bulk create lookup files o k response has a 3xx status code +func (o *BulkCreateLookupFilesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create lookup files o k response has a 4xx status code +func (o *BulkCreateLookupFilesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk create lookup files o k response has a 5xx status code +func (o *BulkCreateLookupFilesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create lookup files o k response a status code equal to that given +func (o *BulkCreateLookupFilesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the bulk create lookup files o k response +func (o *BulkCreateLookupFilesOK) Code() int { + return 200 +} + +func (o *BulkCreateLookupFilesOK) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesOK %+v", 200, o.Payload) +} + +func (o *BulkCreateLookupFilesOK) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesOK %+v", 200, o.Payload) +} + +func (o *BulkCreateLookupFilesOK) GetPayload() *models.APIBulkCreateLookupFilesResponseV1 { + return o.Payload +} + +func (o *BulkCreateLookupFilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APIBulkCreateLookupFilesResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateLookupFilesBadRequest creates a BulkCreateLookupFilesBadRequest with default headers values +func NewBulkCreateLookupFilesBadRequest() *BulkCreateLookupFilesBadRequest { + return &BulkCreateLookupFilesBadRequest{} +} + +/* +BulkCreateLookupFilesBadRequest describes a response with status code 400, with default header values. + +Bad request for content operations +*/ +type BulkCreateLookupFilesBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create lookup files bad request response has a 2xx status code +func (o *BulkCreateLookupFilesBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create lookup files bad request response has a 3xx status code +func (o *BulkCreateLookupFilesBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create lookup files bad request response has a 4xx status code +func (o *BulkCreateLookupFilesBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create lookup files bad request response has a 5xx status code +func (o *BulkCreateLookupFilesBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create lookup files bad request response a status code equal to that given +func (o *BulkCreateLookupFilesBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the bulk create lookup files bad request response +func (o *BulkCreateLookupFilesBadRequest) Code() int { + return 400 +} + +func (o *BulkCreateLookupFilesBadRequest) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesBadRequest %+v", 400, o.Payload) +} + +func (o *BulkCreateLookupFilesBadRequest) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesBadRequest %+v", 400, o.Payload) +} + +func (o *BulkCreateLookupFilesBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateLookupFilesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateLookupFilesUnauthorized creates a BulkCreateLookupFilesUnauthorized with default headers values +func NewBulkCreateLookupFilesUnauthorized() *BulkCreateLookupFilesUnauthorized { + return &BulkCreateLookupFilesUnauthorized{} +} + +/* +BulkCreateLookupFilesUnauthorized describes a response with status code 401, with default header values. + +Requestor is not authorized to access resource +*/ +type BulkCreateLookupFilesUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create lookup files unauthorized response has a 2xx status code +func (o *BulkCreateLookupFilesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create lookup files unauthorized response has a 3xx status code +func (o *BulkCreateLookupFilesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create lookup files unauthorized response has a 4xx status code +func (o *BulkCreateLookupFilesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create lookup files unauthorized response has a 5xx status code +func (o *BulkCreateLookupFilesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create lookup files unauthorized response a status code equal to that given +func (o *BulkCreateLookupFilesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the bulk create lookup files unauthorized response +func (o *BulkCreateLookupFilesUnauthorized) Code() int { + return 401 +} + +func (o *BulkCreateLookupFilesUnauthorized) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkCreateLookupFilesUnauthorized) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkCreateLookupFilesUnauthorized) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateLookupFilesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateLookupFilesForbidden creates a BulkCreateLookupFilesForbidden with default headers values +func NewBulkCreateLookupFilesForbidden() *BulkCreateLookupFilesForbidden { + return &BulkCreateLookupFilesForbidden{} +} + +/* +BulkCreateLookupFilesForbidden describes a response with status code 403, with default header values. + +Content access is not allowed +*/ +type BulkCreateLookupFilesForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create lookup files forbidden response has a 2xx status code +func (o *BulkCreateLookupFilesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create lookup files forbidden response has a 3xx status code +func (o *BulkCreateLookupFilesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create lookup files forbidden response has a 4xx status code +func (o *BulkCreateLookupFilesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create lookup files forbidden response has a 5xx status code +func (o *BulkCreateLookupFilesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create lookup files forbidden response a status code equal to that given +func (o *BulkCreateLookupFilesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the bulk create lookup files forbidden response +func (o *BulkCreateLookupFilesForbidden) Code() int { + return 403 +} + +func (o *BulkCreateLookupFilesForbidden) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesForbidden %+v", 403, o.Payload) +} + +func (o *BulkCreateLookupFilesForbidden) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesForbidden %+v", 403, o.Payload) +} + +func (o *BulkCreateLookupFilesForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateLookupFilesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateLookupFilesNotFound creates a BulkCreateLookupFilesNotFound with default headers values +func NewBulkCreateLookupFilesNotFound() *BulkCreateLookupFilesNotFound { + return &BulkCreateLookupFilesNotFound{} +} + +/* +BulkCreateLookupFilesNotFound describes a response with status code 404, with default header values. + +Content resource does not exist +*/ +type BulkCreateLookupFilesNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create lookup files not found response has a 2xx status code +func (o *BulkCreateLookupFilesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create lookup files not found response has a 3xx status code +func (o *BulkCreateLookupFilesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create lookup files not found response has a 4xx status code +func (o *BulkCreateLookupFilesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create lookup files not found response has a 5xx status code +func (o *BulkCreateLookupFilesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create lookup files not found response a status code equal to that given +func (o *BulkCreateLookupFilesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the bulk create lookup files not found response +func (o *BulkCreateLookupFilesNotFound) Code() int { + return 404 +} + +func (o *BulkCreateLookupFilesNotFound) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesNotFound %+v", 404, o.Payload) +} + +func (o *BulkCreateLookupFilesNotFound) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesNotFound %+v", 404, o.Payload) +} + +func (o *BulkCreateLookupFilesNotFound) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateLookupFilesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateLookupFilesTooManyRequests creates a BulkCreateLookupFilesTooManyRequests with default headers values +func NewBulkCreateLookupFilesTooManyRequests() *BulkCreateLookupFilesTooManyRequests { + return &BulkCreateLookupFilesTooManyRequests{} +} + +/* +BulkCreateLookupFilesTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type BulkCreateLookupFilesTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this bulk create lookup files too many requests response has a 2xx status code +func (o *BulkCreateLookupFilesTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create lookup files too many requests response has a 3xx status code +func (o *BulkCreateLookupFilesTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create lookup files too many requests response has a 4xx status code +func (o *BulkCreateLookupFilesTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create lookup files too many requests response has a 5xx status code +func (o *BulkCreateLookupFilesTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create lookup files too many requests response a status code equal to that given +func (o *BulkCreateLookupFilesTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the bulk create lookup files too many requests response +func (o *BulkCreateLookupFilesTooManyRequests) Code() int { + return 429 +} + +func (o *BulkCreateLookupFilesTooManyRequests) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkCreateLookupFilesTooManyRequests) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkCreateLookupFilesTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *BulkCreateLookupFilesTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateLookupFilesInternalServerError creates a BulkCreateLookupFilesInternalServerError with default headers values +func NewBulkCreateLookupFilesInternalServerError() *BulkCreateLookupFilesInternalServerError { + return &BulkCreateLookupFilesInternalServerError{} +} + +/* +BulkCreateLookupFilesInternalServerError describes a response with status code 500, with default header values. + +Unexpected error occurred +*/ +type BulkCreateLookupFilesInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create lookup files internal server error response has a 2xx status code +func (o *BulkCreateLookupFilesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create lookup files internal server error response has a 3xx status code +func (o *BulkCreateLookupFilesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create lookup files internal server error response has a 4xx status code +func (o *BulkCreateLookupFilesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk create lookup files internal server error response has a 5xx status code +func (o *BulkCreateLookupFilesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this bulk create lookup files internal server error response a status code equal to that given +func (o *BulkCreateLookupFilesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the bulk create lookup files internal server error response +func (o *BulkCreateLookupFilesInternalServerError) Code() int { + return 500 +} + +func (o *BulkCreateLookupFilesInternalServerError) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkCreateLookupFilesInternalServerError) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkCreateLookupFilesInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkCreateLookupFilesInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateLookupFilesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/ngsiem/bulk_create_saved_queries_from_template_parameters.go b/falcon/client/ngsiem/bulk_create_saved_queries_from_template_parameters.go new file mode 100644 index 000000000..1f1f5d0b4 --- /dev/null +++ b/falcon/client/ngsiem/bulk_create_saved_queries_from_template_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewBulkCreateSavedQueriesFromTemplateParams creates a new BulkCreateSavedQueriesFromTemplateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBulkCreateSavedQueriesFromTemplateParams() *BulkCreateSavedQueriesFromTemplateParams { + return &BulkCreateSavedQueriesFromTemplateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBulkCreateSavedQueriesFromTemplateParamsWithTimeout creates a new BulkCreateSavedQueriesFromTemplateParams object +// with the ability to set a timeout on a request. +func NewBulkCreateSavedQueriesFromTemplateParamsWithTimeout(timeout time.Duration) *BulkCreateSavedQueriesFromTemplateParams { + return &BulkCreateSavedQueriesFromTemplateParams{ + timeout: timeout, + } +} + +// NewBulkCreateSavedQueriesFromTemplateParamsWithContext creates a new BulkCreateSavedQueriesFromTemplateParams object +// with the ability to set a context for a request. +func NewBulkCreateSavedQueriesFromTemplateParamsWithContext(ctx context.Context) *BulkCreateSavedQueriesFromTemplateParams { + return &BulkCreateSavedQueriesFromTemplateParams{ + Context: ctx, + } +} + +// NewBulkCreateSavedQueriesFromTemplateParamsWithHTTPClient creates a new BulkCreateSavedQueriesFromTemplateParams object +// with the ability to set a custom HTTPClient for a request. +func NewBulkCreateSavedQueriesFromTemplateParamsWithHTTPClient(client *http.Client) *BulkCreateSavedQueriesFromTemplateParams { + return &BulkCreateSavedQueriesFromTemplateParams{ + HTTPClient: client, + } +} + +/* +BulkCreateSavedQueriesFromTemplateParams contains all the parameters to send to the API endpoint + + for the bulk create saved queries from template operation. + + Typically these are written to a http.Request. +*/ +type BulkCreateSavedQueriesFromTemplateParams struct { + + /* Body. + + bulk create saved queries request + */ + Body *models.APIBulkCreateSavedQueriesFromTemplateRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bulk create saved queries from template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkCreateSavedQueriesFromTemplateParams) WithDefaults() *BulkCreateSavedQueriesFromTemplateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bulk create saved queries from template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkCreateSavedQueriesFromTemplateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bulk create saved queries from template params +func (o *BulkCreateSavedQueriesFromTemplateParams) WithTimeout(timeout time.Duration) *BulkCreateSavedQueriesFromTemplateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bulk create saved queries from template params +func (o *BulkCreateSavedQueriesFromTemplateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bulk create saved queries from template params +func (o *BulkCreateSavedQueriesFromTemplateParams) WithContext(ctx context.Context) *BulkCreateSavedQueriesFromTemplateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bulk create saved queries from template params +func (o *BulkCreateSavedQueriesFromTemplateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bulk create saved queries from template params +func (o *BulkCreateSavedQueriesFromTemplateParams) WithHTTPClient(client *http.Client) *BulkCreateSavedQueriesFromTemplateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bulk create saved queries from template params +func (o *BulkCreateSavedQueriesFromTemplateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bulk create saved queries from template params +func (o *BulkCreateSavedQueriesFromTemplateParams) WithBody(body *models.APIBulkCreateSavedQueriesFromTemplateRequestV1) *BulkCreateSavedQueriesFromTemplateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bulk create saved queries from template params +func (o *BulkCreateSavedQueriesFromTemplateParams) SetBody(body *models.APIBulkCreateSavedQueriesFromTemplateRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *BulkCreateSavedQueriesFromTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/ngsiem/bulk_create_saved_queries_from_template_responses.go b/falcon/client/ngsiem/bulk_create_saved_queries_from_template_responses.go new file mode 100644 index 000000000..7f57f001b --- /dev/null +++ b/falcon/client/ngsiem/bulk_create_saved_queries_from_template_responses.go @@ -0,0 +1,858 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// BulkCreateSavedQueriesFromTemplateReader is a Reader for the BulkCreateSavedQueriesFromTemplate structure. +type BulkCreateSavedQueriesFromTemplateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BulkCreateSavedQueriesFromTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBulkCreateSavedQueriesFromTemplateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBulkCreateSavedQueriesFromTemplateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBulkCreateSavedQueriesFromTemplateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewBulkCreateSavedQueriesFromTemplateForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBulkCreateSavedQueriesFromTemplateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewBulkCreateSavedQueriesFromTemplateTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBulkCreateSavedQueriesFromTemplateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1] BulkCreateSavedQueriesFromTemplate", response, response.Code()) + } +} + +// NewBulkCreateSavedQueriesFromTemplateOK creates a BulkCreateSavedQueriesFromTemplateOK with default headers values +func NewBulkCreateSavedQueriesFromTemplateOK() *BulkCreateSavedQueriesFromTemplateOK { + return &BulkCreateSavedQueriesFromTemplateOK{} +} + +/* +BulkCreateSavedQueriesFromTemplateOK describes a response with status code 200, with default header values. + +BulkCreateSavedQueriesFromTemplateOK bulk create saved queries from template o k +*/ +type BulkCreateSavedQueriesFromTemplateOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APIBulkCreateSavedQueriesFromTemplateResponseV1 +} + +// IsSuccess returns true when this bulk create saved queries from template o k response has a 2xx status code +func (o *BulkCreateSavedQueriesFromTemplateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this bulk create saved queries from template o k response has a 3xx status code +func (o *BulkCreateSavedQueriesFromTemplateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create saved queries from template o k response has a 4xx status code +func (o *BulkCreateSavedQueriesFromTemplateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk create saved queries from template o k response has a 5xx status code +func (o *BulkCreateSavedQueriesFromTemplateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create saved queries from template o k response a status code equal to that given +func (o *BulkCreateSavedQueriesFromTemplateOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the bulk create saved queries from template o k response +func (o *BulkCreateSavedQueriesFromTemplateOK) Code() int { + return 200 +} + +func (o *BulkCreateSavedQueriesFromTemplateOK) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateOK %+v", 200, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateOK) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateOK %+v", 200, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateOK) GetPayload() *models.APIBulkCreateSavedQueriesFromTemplateResponseV1 { + return o.Payload +} + +func (o *BulkCreateSavedQueriesFromTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APIBulkCreateSavedQueriesFromTemplateResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateSavedQueriesFromTemplateBadRequest creates a BulkCreateSavedQueriesFromTemplateBadRequest with default headers values +func NewBulkCreateSavedQueriesFromTemplateBadRequest() *BulkCreateSavedQueriesFromTemplateBadRequest { + return &BulkCreateSavedQueriesFromTemplateBadRequest{} +} + +/* +BulkCreateSavedQueriesFromTemplateBadRequest describes a response with status code 400, with default header values. + +Bad request for content operations +*/ +type BulkCreateSavedQueriesFromTemplateBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create saved queries from template bad request response has a 2xx status code +func (o *BulkCreateSavedQueriesFromTemplateBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create saved queries from template bad request response has a 3xx status code +func (o *BulkCreateSavedQueriesFromTemplateBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create saved queries from template bad request response has a 4xx status code +func (o *BulkCreateSavedQueriesFromTemplateBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create saved queries from template bad request response has a 5xx status code +func (o *BulkCreateSavedQueriesFromTemplateBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create saved queries from template bad request response a status code equal to that given +func (o *BulkCreateSavedQueriesFromTemplateBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the bulk create saved queries from template bad request response +func (o *BulkCreateSavedQueriesFromTemplateBadRequest) Code() int { + return 400 +} + +func (o *BulkCreateSavedQueriesFromTemplateBadRequest) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateBadRequest %+v", 400, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateBadRequest) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateBadRequest %+v", 400, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateSavedQueriesFromTemplateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateSavedQueriesFromTemplateUnauthorized creates a BulkCreateSavedQueriesFromTemplateUnauthorized with default headers values +func NewBulkCreateSavedQueriesFromTemplateUnauthorized() *BulkCreateSavedQueriesFromTemplateUnauthorized { + return &BulkCreateSavedQueriesFromTemplateUnauthorized{} +} + +/* +BulkCreateSavedQueriesFromTemplateUnauthorized describes a response with status code 401, with default header values. + +Requestor is not authorized to access resource +*/ +type BulkCreateSavedQueriesFromTemplateUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create saved queries from template unauthorized response has a 2xx status code +func (o *BulkCreateSavedQueriesFromTemplateUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create saved queries from template unauthorized response has a 3xx status code +func (o *BulkCreateSavedQueriesFromTemplateUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create saved queries from template unauthorized response has a 4xx status code +func (o *BulkCreateSavedQueriesFromTemplateUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create saved queries from template unauthorized response has a 5xx status code +func (o *BulkCreateSavedQueriesFromTemplateUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create saved queries from template unauthorized response a status code equal to that given +func (o *BulkCreateSavedQueriesFromTemplateUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the bulk create saved queries from template unauthorized response +func (o *BulkCreateSavedQueriesFromTemplateUnauthorized) Code() int { + return 401 +} + +func (o *BulkCreateSavedQueriesFromTemplateUnauthorized) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateUnauthorized) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateUnauthorized) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateSavedQueriesFromTemplateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateSavedQueriesFromTemplateForbidden creates a BulkCreateSavedQueriesFromTemplateForbidden with default headers values +func NewBulkCreateSavedQueriesFromTemplateForbidden() *BulkCreateSavedQueriesFromTemplateForbidden { + return &BulkCreateSavedQueriesFromTemplateForbidden{} +} + +/* +BulkCreateSavedQueriesFromTemplateForbidden describes a response with status code 403, with default header values. + +Content access is not allowed +*/ +type BulkCreateSavedQueriesFromTemplateForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create saved queries from template forbidden response has a 2xx status code +func (o *BulkCreateSavedQueriesFromTemplateForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create saved queries from template forbidden response has a 3xx status code +func (o *BulkCreateSavedQueriesFromTemplateForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create saved queries from template forbidden response has a 4xx status code +func (o *BulkCreateSavedQueriesFromTemplateForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create saved queries from template forbidden response has a 5xx status code +func (o *BulkCreateSavedQueriesFromTemplateForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create saved queries from template forbidden response a status code equal to that given +func (o *BulkCreateSavedQueriesFromTemplateForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the bulk create saved queries from template forbidden response +func (o *BulkCreateSavedQueriesFromTemplateForbidden) Code() int { + return 403 +} + +func (o *BulkCreateSavedQueriesFromTemplateForbidden) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateForbidden %+v", 403, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateForbidden) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateForbidden %+v", 403, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateSavedQueriesFromTemplateForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateSavedQueriesFromTemplateNotFound creates a BulkCreateSavedQueriesFromTemplateNotFound with default headers values +func NewBulkCreateSavedQueriesFromTemplateNotFound() *BulkCreateSavedQueriesFromTemplateNotFound { + return &BulkCreateSavedQueriesFromTemplateNotFound{} +} + +/* +BulkCreateSavedQueriesFromTemplateNotFound describes a response with status code 404, with default header values. + +Content resource does not exist +*/ +type BulkCreateSavedQueriesFromTemplateNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create saved queries from template not found response has a 2xx status code +func (o *BulkCreateSavedQueriesFromTemplateNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create saved queries from template not found response has a 3xx status code +func (o *BulkCreateSavedQueriesFromTemplateNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create saved queries from template not found response has a 4xx status code +func (o *BulkCreateSavedQueriesFromTemplateNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create saved queries from template not found response has a 5xx status code +func (o *BulkCreateSavedQueriesFromTemplateNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create saved queries from template not found response a status code equal to that given +func (o *BulkCreateSavedQueriesFromTemplateNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the bulk create saved queries from template not found response +func (o *BulkCreateSavedQueriesFromTemplateNotFound) Code() int { + return 404 +} + +func (o *BulkCreateSavedQueriesFromTemplateNotFound) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateNotFound %+v", 404, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateNotFound) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateNotFound %+v", 404, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateNotFound) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateSavedQueriesFromTemplateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateSavedQueriesFromTemplateTooManyRequests creates a BulkCreateSavedQueriesFromTemplateTooManyRequests with default headers values +func NewBulkCreateSavedQueriesFromTemplateTooManyRequests() *BulkCreateSavedQueriesFromTemplateTooManyRequests { + return &BulkCreateSavedQueriesFromTemplateTooManyRequests{} +} + +/* +BulkCreateSavedQueriesFromTemplateTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type BulkCreateSavedQueriesFromTemplateTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this bulk create saved queries from template too many requests response has a 2xx status code +func (o *BulkCreateSavedQueriesFromTemplateTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create saved queries from template too many requests response has a 3xx status code +func (o *BulkCreateSavedQueriesFromTemplateTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create saved queries from template too many requests response has a 4xx status code +func (o *BulkCreateSavedQueriesFromTemplateTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk create saved queries from template too many requests response has a 5xx status code +func (o *BulkCreateSavedQueriesFromTemplateTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk create saved queries from template too many requests response a status code equal to that given +func (o *BulkCreateSavedQueriesFromTemplateTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the bulk create saved queries from template too many requests response +func (o *BulkCreateSavedQueriesFromTemplateTooManyRequests) Code() int { + return 429 +} + +func (o *BulkCreateSavedQueriesFromTemplateTooManyRequests) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateTooManyRequests) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *BulkCreateSavedQueriesFromTemplateTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkCreateSavedQueriesFromTemplateInternalServerError creates a BulkCreateSavedQueriesFromTemplateInternalServerError with default headers values +func NewBulkCreateSavedQueriesFromTemplateInternalServerError() *BulkCreateSavedQueriesFromTemplateInternalServerError { + return &BulkCreateSavedQueriesFromTemplateInternalServerError{} +} + +/* +BulkCreateSavedQueriesFromTemplateInternalServerError describes a response with status code 500, with default header values. + +Unexpected error occurred +*/ +type BulkCreateSavedQueriesFromTemplateInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk create saved queries from template internal server error response has a 2xx status code +func (o *BulkCreateSavedQueriesFromTemplateInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk create saved queries from template internal server error response has a 3xx status code +func (o *BulkCreateSavedQueriesFromTemplateInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk create saved queries from template internal server error response has a 4xx status code +func (o *BulkCreateSavedQueriesFromTemplateInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk create saved queries from template internal server error response has a 5xx status code +func (o *BulkCreateSavedQueriesFromTemplateInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this bulk create saved queries from template internal server error response a status code equal to that given +func (o *BulkCreateSavedQueriesFromTemplateInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the bulk create saved queries from template internal server error response +func (o *BulkCreateSavedQueriesFromTemplateInternalServerError) Code() int { + return 500 +} + +func (o *BulkCreateSavedQueriesFromTemplateInternalServerError) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateInternalServerError) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkCreateSavedQueriesFromTemplateInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkCreateSavedQueriesFromTemplateInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkCreateSavedQueriesFromTemplateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/ngsiem/bulk_get_lookup_files_parameters.go b/falcon/client/ngsiem/bulk_get_lookup_files_parameters.go new file mode 100644 index 000000000..2db8da776 --- /dev/null +++ b/falcon/client/ngsiem/bulk_get_lookup_files_parameters.go @@ -0,0 +1,209 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewBulkGetLookupFilesParams creates a new BulkGetLookupFilesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBulkGetLookupFilesParams() *BulkGetLookupFilesParams { + return &BulkGetLookupFilesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBulkGetLookupFilesParamsWithTimeout creates a new BulkGetLookupFilesParams object +// with the ability to set a timeout on a request. +func NewBulkGetLookupFilesParamsWithTimeout(timeout time.Duration) *BulkGetLookupFilesParams { + return &BulkGetLookupFilesParams{ + timeout: timeout, + } +} + +// NewBulkGetLookupFilesParamsWithContext creates a new BulkGetLookupFilesParams object +// with the ability to set a context for a request. +func NewBulkGetLookupFilesParamsWithContext(ctx context.Context) *BulkGetLookupFilesParams { + return &BulkGetLookupFilesParams{ + Context: ctx, + } +} + +// NewBulkGetLookupFilesParamsWithHTTPClient creates a new BulkGetLookupFilesParams object +// with the ability to set a custom HTTPClient for a request. +func NewBulkGetLookupFilesParamsWithHTTPClient(client *http.Client) *BulkGetLookupFilesParams { + return &BulkGetLookupFilesParams{ + HTTPClient: client, + } +} + +/* +BulkGetLookupFilesParams contains all the parameters to send to the API endpoint + + for the bulk get lookup files operation. + + Typically these are written to a http.Request. +*/ +type BulkGetLookupFilesParams struct { + + /* Filename. + + Lookup file filename(s) (required, multiple allowed) + */ + Filename []string + + /* SearchDomain. + + name of search domain (view or repo) + */ + SearchDomain *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bulk get lookup files params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkGetLookupFilesParams) WithDefaults() *BulkGetLookupFilesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bulk get lookup files params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkGetLookupFilesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bulk get lookup files params +func (o *BulkGetLookupFilesParams) WithTimeout(timeout time.Duration) *BulkGetLookupFilesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bulk get lookup files params +func (o *BulkGetLookupFilesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bulk get lookup files params +func (o *BulkGetLookupFilesParams) WithContext(ctx context.Context) *BulkGetLookupFilesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bulk get lookup files params +func (o *BulkGetLookupFilesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bulk get lookup files params +func (o *BulkGetLookupFilesParams) WithHTTPClient(client *http.Client) *BulkGetLookupFilesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bulk get lookup files params +func (o *BulkGetLookupFilesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilename adds the filename to the bulk get lookup files params +func (o *BulkGetLookupFilesParams) WithFilename(filename []string) *BulkGetLookupFilesParams { + o.SetFilename(filename) + return o +} + +// SetFilename adds the filename to the bulk get lookup files params +func (o *BulkGetLookupFilesParams) SetFilename(filename []string) { + o.Filename = filename +} + +// WithSearchDomain adds the searchDomain to the bulk get lookup files params +func (o *BulkGetLookupFilesParams) WithSearchDomain(searchDomain *string) *BulkGetLookupFilesParams { + o.SetSearchDomain(searchDomain) + return o +} + +// SetSearchDomain adds the searchDomain to the bulk get lookup files params +func (o *BulkGetLookupFilesParams) SetSearchDomain(searchDomain *string) { + o.SearchDomain = searchDomain +} + +// WriteToRequest writes these params to a swagger request +func (o *BulkGetLookupFilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filename != nil { + + // binding items for filename + joinedFilename := o.bindParamFilename(reg) + + // query array param filename + if err := r.SetQueryParam("filename", joinedFilename...); err != nil { + return err + } + } + + if o.SearchDomain != nil { + + // query param search_domain + var qrSearchDomain string + + if o.SearchDomain != nil { + qrSearchDomain = *o.SearchDomain + } + qSearchDomain := qrSearchDomain + if qSearchDomain != "" { + + if err := r.SetQueryParam("search_domain", qSearchDomain); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamBulkGetLookupFiles binds the parameter filename +func (o *BulkGetLookupFilesParams) bindParamFilename(formats strfmt.Registry) []string { + filenameIR := o.Filename + + var filenameIC []string + for _, filenameIIR := range filenameIR { // explode []string + + filenameIIV := filenameIIR // string as string + filenameIC = append(filenameIC, filenameIIV) + } + + // items.CollectionFormat: "csv" + filenameIS := swag.JoinByFormat(filenameIC, "csv") + + return filenameIS +} diff --git a/falcon/client/ngsiem/bulk_get_lookup_files_responses.go b/falcon/client/ngsiem/bulk_get_lookup_files_responses.go new file mode 100644 index 000000000..b84e0f58f --- /dev/null +++ b/falcon/client/ngsiem/bulk_get_lookup_files_responses.go @@ -0,0 +1,858 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// BulkGetLookupFilesReader is a Reader for the BulkGetLookupFiles structure. +type BulkGetLookupFilesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BulkGetLookupFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBulkGetLookupFilesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBulkGetLookupFilesBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBulkGetLookupFilesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewBulkGetLookupFilesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBulkGetLookupFilesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewBulkGetLookupFilesTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBulkGetLookupFilesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /ngsiem-content/entities/bulk-lookupfiles/v1] BulkGetLookupFiles", response, response.Code()) + } +} + +// NewBulkGetLookupFilesOK creates a BulkGetLookupFilesOK with default headers values +func NewBulkGetLookupFilesOK() *BulkGetLookupFilesOK { + return &BulkGetLookupFilesOK{} +} + +/* +BulkGetLookupFilesOK describes a response with status code 200, with default header values. + +BulkGetLookupFilesOK bulk get lookup files o k +*/ +type BulkGetLookupFilesOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APIBulkGetLookupFilesResponseV1 +} + +// IsSuccess returns true when this bulk get lookup files o k response has a 2xx status code +func (o *BulkGetLookupFilesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this bulk get lookup files o k response has a 3xx status code +func (o *BulkGetLookupFilesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk get lookup files o k response has a 4xx status code +func (o *BulkGetLookupFilesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk get lookup files o k response has a 5xx status code +func (o *BulkGetLookupFilesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk get lookup files o k response a status code equal to that given +func (o *BulkGetLookupFilesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the bulk get lookup files o k response +func (o *BulkGetLookupFilesOK) Code() int { + return 200 +} + +func (o *BulkGetLookupFilesOK) Error() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesOK %+v", 200, o.Payload) +} + +func (o *BulkGetLookupFilesOK) String() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesOK %+v", 200, o.Payload) +} + +func (o *BulkGetLookupFilesOK) GetPayload() *models.APIBulkGetLookupFilesResponseV1 { + return o.Payload +} + +func (o *BulkGetLookupFilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APIBulkGetLookupFilesResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkGetLookupFilesBadRequest creates a BulkGetLookupFilesBadRequest with default headers values +func NewBulkGetLookupFilesBadRequest() *BulkGetLookupFilesBadRequest { + return &BulkGetLookupFilesBadRequest{} +} + +/* +BulkGetLookupFilesBadRequest describes a response with status code 400, with default header values. + +Bad request for content operations +*/ +type BulkGetLookupFilesBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk get lookup files bad request response has a 2xx status code +func (o *BulkGetLookupFilesBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk get lookup files bad request response has a 3xx status code +func (o *BulkGetLookupFilesBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk get lookup files bad request response has a 4xx status code +func (o *BulkGetLookupFilesBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk get lookup files bad request response has a 5xx status code +func (o *BulkGetLookupFilesBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk get lookup files bad request response a status code equal to that given +func (o *BulkGetLookupFilesBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the bulk get lookup files bad request response +func (o *BulkGetLookupFilesBadRequest) Code() int { + return 400 +} + +func (o *BulkGetLookupFilesBadRequest) Error() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesBadRequest %+v", 400, o.Payload) +} + +func (o *BulkGetLookupFilesBadRequest) String() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesBadRequest %+v", 400, o.Payload) +} + +func (o *BulkGetLookupFilesBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkGetLookupFilesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkGetLookupFilesUnauthorized creates a BulkGetLookupFilesUnauthorized with default headers values +func NewBulkGetLookupFilesUnauthorized() *BulkGetLookupFilesUnauthorized { + return &BulkGetLookupFilesUnauthorized{} +} + +/* +BulkGetLookupFilesUnauthorized describes a response with status code 401, with default header values. + +Requestor is not authorized to access resource +*/ +type BulkGetLookupFilesUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk get lookup files unauthorized response has a 2xx status code +func (o *BulkGetLookupFilesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk get lookup files unauthorized response has a 3xx status code +func (o *BulkGetLookupFilesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk get lookup files unauthorized response has a 4xx status code +func (o *BulkGetLookupFilesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk get lookup files unauthorized response has a 5xx status code +func (o *BulkGetLookupFilesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk get lookup files unauthorized response a status code equal to that given +func (o *BulkGetLookupFilesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the bulk get lookup files unauthorized response +func (o *BulkGetLookupFilesUnauthorized) Code() int { + return 401 +} + +func (o *BulkGetLookupFilesUnauthorized) Error() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkGetLookupFilesUnauthorized) String() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkGetLookupFilesUnauthorized) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkGetLookupFilesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkGetLookupFilesForbidden creates a BulkGetLookupFilesForbidden with default headers values +func NewBulkGetLookupFilesForbidden() *BulkGetLookupFilesForbidden { + return &BulkGetLookupFilesForbidden{} +} + +/* +BulkGetLookupFilesForbidden describes a response with status code 403, with default header values. + +Content access is not allowed +*/ +type BulkGetLookupFilesForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk get lookup files forbidden response has a 2xx status code +func (o *BulkGetLookupFilesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk get lookup files forbidden response has a 3xx status code +func (o *BulkGetLookupFilesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk get lookup files forbidden response has a 4xx status code +func (o *BulkGetLookupFilesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk get lookup files forbidden response has a 5xx status code +func (o *BulkGetLookupFilesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk get lookup files forbidden response a status code equal to that given +func (o *BulkGetLookupFilesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the bulk get lookup files forbidden response +func (o *BulkGetLookupFilesForbidden) Code() int { + return 403 +} + +func (o *BulkGetLookupFilesForbidden) Error() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesForbidden %+v", 403, o.Payload) +} + +func (o *BulkGetLookupFilesForbidden) String() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesForbidden %+v", 403, o.Payload) +} + +func (o *BulkGetLookupFilesForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkGetLookupFilesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkGetLookupFilesNotFound creates a BulkGetLookupFilesNotFound with default headers values +func NewBulkGetLookupFilesNotFound() *BulkGetLookupFilesNotFound { + return &BulkGetLookupFilesNotFound{} +} + +/* +BulkGetLookupFilesNotFound describes a response with status code 404, with default header values. + +Content resource does not exist +*/ +type BulkGetLookupFilesNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk get lookup files not found response has a 2xx status code +func (o *BulkGetLookupFilesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk get lookup files not found response has a 3xx status code +func (o *BulkGetLookupFilesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk get lookup files not found response has a 4xx status code +func (o *BulkGetLookupFilesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk get lookup files not found response has a 5xx status code +func (o *BulkGetLookupFilesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk get lookup files not found response a status code equal to that given +func (o *BulkGetLookupFilesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the bulk get lookup files not found response +func (o *BulkGetLookupFilesNotFound) Code() int { + return 404 +} + +func (o *BulkGetLookupFilesNotFound) Error() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesNotFound %+v", 404, o.Payload) +} + +func (o *BulkGetLookupFilesNotFound) String() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesNotFound %+v", 404, o.Payload) +} + +func (o *BulkGetLookupFilesNotFound) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkGetLookupFilesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkGetLookupFilesTooManyRequests creates a BulkGetLookupFilesTooManyRequests with default headers values +func NewBulkGetLookupFilesTooManyRequests() *BulkGetLookupFilesTooManyRequests { + return &BulkGetLookupFilesTooManyRequests{} +} + +/* +BulkGetLookupFilesTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type BulkGetLookupFilesTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this bulk get lookup files too many requests response has a 2xx status code +func (o *BulkGetLookupFilesTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk get lookup files too many requests response has a 3xx status code +func (o *BulkGetLookupFilesTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk get lookup files too many requests response has a 4xx status code +func (o *BulkGetLookupFilesTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk get lookup files too many requests response has a 5xx status code +func (o *BulkGetLookupFilesTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk get lookup files too many requests response a status code equal to that given +func (o *BulkGetLookupFilesTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the bulk get lookup files too many requests response +func (o *BulkGetLookupFilesTooManyRequests) Code() int { + return 429 +} + +func (o *BulkGetLookupFilesTooManyRequests) Error() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkGetLookupFilesTooManyRequests) String() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkGetLookupFilesTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *BulkGetLookupFilesTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkGetLookupFilesInternalServerError creates a BulkGetLookupFilesInternalServerError with default headers values +func NewBulkGetLookupFilesInternalServerError() *BulkGetLookupFilesInternalServerError { + return &BulkGetLookupFilesInternalServerError{} +} + +/* +BulkGetLookupFilesInternalServerError describes a response with status code 500, with default header values. + +Unexpected error occurred +*/ +type BulkGetLookupFilesInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk get lookup files internal server error response has a 2xx status code +func (o *BulkGetLookupFilesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk get lookup files internal server error response has a 3xx status code +func (o *BulkGetLookupFilesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk get lookup files internal server error response has a 4xx status code +func (o *BulkGetLookupFilesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk get lookup files internal server error response has a 5xx status code +func (o *BulkGetLookupFilesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this bulk get lookup files internal server error response a status code equal to that given +func (o *BulkGetLookupFilesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the bulk get lookup files internal server error response +func (o *BulkGetLookupFilesInternalServerError) Code() int { + return 500 +} + +func (o *BulkGetLookupFilesInternalServerError) Error() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkGetLookupFilesInternalServerError) String() string { + return fmt.Sprintf("[GET /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkGetLookupFilesInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkGetLookupFilesInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkGetLookupFilesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/ngsiem/bulk_update_dashboards_from_template_parameters.go b/falcon/client/ngsiem/bulk_update_dashboards_from_template_parameters.go new file mode 100644 index 000000000..08b8b40a6 --- /dev/null +++ b/falcon/client/ngsiem/bulk_update_dashboards_from_template_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewBulkUpdateDashboardsFromTemplateParams creates a new BulkUpdateDashboardsFromTemplateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBulkUpdateDashboardsFromTemplateParams() *BulkUpdateDashboardsFromTemplateParams { + return &BulkUpdateDashboardsFromTemplateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBulkUpdateDashboardsFromTemplateParamsWithTimeout creates a new BulkUpdateDashboardsFromTemplateParams object +// with the ability to set a timeout on a request. +func NewBulkUpdateDashboardsFromTemplateParamsWithTimeout(timeout time.Duration) *BulkUpdateDashboardsFromTemplateParams { + return &BulkUpdateDashboardsFromTemplateParams{ + timeout: timeout, + } +} + +// NewBulkUpdateDashboardsFromTemplateParamsWithContext creates a new BulkUpdateDashboardsFromTemplateParams object +// with the ability to set a context for a request. +func NewBulkUpdateDashboardsFromTemplateParamsWithContext(ctx context.Context) *BulkUpdateDashboardsFromTemplateParams { + return &BulkUpdateDashboardsFromTemplateParams{ + Context: ctx, + } +} + +// NewBulkUpdateDashboardsFromTemplateParamsWithHTTPClient creates a new BulkUpdateDashboardsFromTemplateParams object +// with the ability to set a custom HTTPClient for a request. +func NewBulkUpdateDashboardsFromTemplateParamsWithHTTPClient(client *http.Client) *BulkUpdateDashboardsFromTemplateParams { + return &BulkUpdateDashboardsFromTemplateParams{ + HTTPClient: client, + } +} + +/* +BulkUpdateDashboardsFromTemplateParams contains all the parameters to send to the API endpoint + + for the bulk update dashboards from template operation. + + Typically these are written to a http.Request. +*/ +type BulkUpdateDashboardsFromTemplateParams struct { + + // Body. + Body *models.APIBulkUpdateDashboardsFromTemplateRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bulk update dashboards from template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkUpdateDashboardsFromTemplateParams) WithDefaults() *BulkUpdateDashboardsFromTemplateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bulk update dashboards from template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkUpdateDashboardsFromTemplateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bulk update dashboards from template params +func (o *BulkUpdateDashboardsFromTemplateParams) WithTimeout(timeout time.Duration) *BulkUpdateDashboardsFromTemplateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bulk update dashboards from template params +func (o *BulkUpdateDashboardsFromTemplateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bulk update dashboards from template params +func (o *BulkUpdateDashboardsFromTemplateParams) WithContext(ctx context.Context) *BulkUpdateDashboardsFromTemplateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bulk update dashboards from template params +func (o *BulkUpdateDashboardsFromTemplateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bulk update dashboards from template params +func (o *BulkUpdateDashboardsFromTemplateParams) WithHTTPClient(client *http.Client) *BulkUpdateDashboardsFromTemplateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bulk update dashboards from template params +func (o *BulkUpdateDashboardsFromTemplateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bulk update dashboards from template params +func (o *BulkUpdateDashboardsFromTemplateParams) WithBody(body *models.APIBulkUpdateDashboardsFromTemplateRequestV1) *BulkUpdateDashboardsFromTemplateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bulk update dashboards from template params +func (o *BulkUpdateDashboardsFromTemplateParams) SetBody(body *models.APIBulkUpdateDashboardsFromTemplateRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *BulkUpdateDashboardsFromTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/ngsiem/bulk_update_dashboards_from_template_responses.go b/falcon/client/ngsiem/bulk_update_dashboards_from_template_responses.go new file mode 100644 index 000000000..348a28dcc --- /dev/null +++ b/falcon/client/ngsiem/bulk_update_dashboards_from_template_responses.go @@ -0,0 +1,858 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// BulkUpdateDashboardsFromTemplateReader is a Reader for the BulkUpdateDashboardsFromTemplate structure. +type BulkUpdateDashboardsFromTemplateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BulkUpdateDashboardsFromTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBulkUpdateDashboardsFromTemplateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBulkUpdateDashboardsFromTemplateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBulkUpdateDashboardsFromTemplateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewBulkUpdateDashboardsFromTemplateForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBulkUpdateDashboardsFromTemplateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewBulkUpdateDashboardsFromTemplateTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBulkUpdateDashboardsFromTemplateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1] BulkUpdateDashboardsFromTemplate", response, response.Code()) + } +} + +// NewBulkUpdateDashboardsFromTemplateOK creates a BulkUpdateDashboardsFromTemplateOK with default headers values +func NewBulkUpdateDashboardsFromTemplateOK() *BulkUpdateDashboardsFromTemplateOK { + return &BulkUpdateDashboardsFromTemplateOK{} +} + +/* +BulkUpdateDashboardsFromTemplateOK describes a response with status code 200, with default header values. + +BulkUpdateDashboardsFromTemplateOK bulk update dashboards from template o k +*/ +type BulkUpdateDashboardsFromTemplateOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APIBulkUpdateDashboardsFromTemplateResponseV1 +} + +// IsSuccess returns true when this bulk update dashboards from template o k response has a 2xx status code +func (o *BulkUpdateDashboardsFromTemplateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this bulk update dashboards from template o k response has a 3xx status code +func (o *BulkUpdateDashboardsFromTemplateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update dashboards from template o k response has a 4xx status code +func (o *BulkUpdateDashboardsFromTemplateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk update dashboards from template o k response has a 5xx status code +func (o *BulkUpdateDashboardsFromTemplateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update dashboards from template o k response a status code equal to that given +func (o *BulkUpdateDashboardsFromTemplateOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the bulk update dashboards from template o k response +func (o *BulkUpdateDashboardsFromTemplateOK) Code() int { + return 200 +} + +func (o *BulkUpdateDashboardsFromTemplateOK) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateOK %+v", 200, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateOK) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateOK %+v", 200, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateOK) GetPayload() *models.APIBulkUpdateDashboardsFromTemplateResponseV1 { + return o.Payload +} + +func (o *BulkUpdateDashboardsFromTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APIBulkUpdateDashboardsFromTemplateResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateDashboardsFromTemplateBadRequest creates a BulkUpdateDashboardsFromTemplateBadRequest with default headers values +func NewBulkUpdateDashboardsFromTemplateBadRequest() *BulkUpdateDashboardsFromTemplateBadRequest { + return &BulkUpdateDashboardsFromTemplateBadRequest{} +} + +/* +BulkUpdateDashboardsFromTemplateBadRequest describes a response with status code 400, with default header values. + +Bad request for content operations +*/ +type BulkUpdateDashboardsFromTemplateBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update dashboards from template bad request response has a 2xx status code +func (o *BulkUpdateDashboardsFromTemplateBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update dashboards from template bad request response has a 3xx status code +func (o *BulkUpdateDashboardsFromTemplateBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update dashboards from template bad request response has a 4xx status code +func (o *BulkUpdateDashboardsFromTemplateBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update dashboards from template bad request response has a 5xx status code +func (o *BulkUpdateDashboardsFromTemplateBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update dashboards from template bad request response a status code equal to that given +func (o *BulkUpdateDashboardsFromTemplateBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the bulk update dashboards from template bad request response +func (o *BulkUpdateDashboardsFromTemplateBadRequest) Code() int { + return 400 +} + +func (o *BulkUpdateDashboardsFromTemplateBadRequest) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateBadRequest %+v", 400, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateBadRequest) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateBadRequest %+v", 400, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateDashboardsFromTemplateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateDashboardsFromTemplateUnauthorized creates a BulkUpdateDashboardsFromTemplateUnauthorized with default headers values +func NewBulkUpdateDashboardsFromTemplateUnauthorized() *BulkUpdateDashboardsFromTemplateUnauthorized { + return &BulkUpdateDashboardsFromTemplateUnauthorized{} +} + +/* +BulkUpdateDashboardsFromTemplateUnauthorized describes a response with status code 401, with default header values. + +Requestor is not authorized to access resource +*/ +type BulkUpdateDashboardsFromTemplateUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update dashboards from template unauthorized response has a 2xx status code +func (o *BulkUpdateDashboardsFromTemplateUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update dashboards from template unauthorized response has a 3xx status code +func (o *BulkUpdateDashboardsFromTemplateUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update dashboards from template unauthorized response has a 4xx status code +func (o *BulkUpdateDashboardsFromTemplateUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update dashboards from template unauthorized response has a 5xx status code +func (o *BulkUpdateDashboardsFromTemplateUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update dashboards from template unauthorized response a status code equal to that given +func (o *BulkUpdateDashboardsFromTemplateUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the bulk update dashboards from template unauthorized response +func (o *BulkUpdateDashboardsFromTemplateUnauthorized) Code() int { + return 401 +} + +func (o *BulkUpdateDashboardsFromTemplateUnauthorized) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateUnauthorized) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateUnauthorized) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateDashboardsFromTemplateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateDashboardsFromTemplateForbidden creates a BulkUpdateDashboardsFromTemplateForbidden with default headers values +func NewBulkUpdateDashboardsFromTemplateForbidden() *BulkUpdateDashboardsFromTemplateForbidden { + return &BulkUpdateDashboardsFromTemplateForbidden{} +} + +/* +BulkUpdateDashboardsFromTemplateForbidden describes a response with status code 403, with default header values. + +Content access is not allowed +*/ +type BulkUpdateDashboardsFromTemplateForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update dashboards from template forbidden response has a 2xx status code +func (o *BulkUpdateDashboardsFromTemplateForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update dashboards from template forbidden response has a 3xx status code +func (o *BulkUpdateDashboardsFromTemplateForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update dashboards from template forbidden response has a 4xx status code +func (o *BulkUpdateDashboardsFromTemplateForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update dashboards from template forbidden response has a 5xx status code +func (o *BulkUpdateDashboardsFromTemplateForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update dashboards from template forbidden response a status code equal to that given +func (o *BulkUpdateDashboardsFromTemplateForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the bulk update dashboards from template forbidden response +func (o *BulkUpdateDashboardsFromTemplateForbidden) Code() int { + return 403 +} + +func (o *BulkUpdateDashboardsFromTemplateForbidden) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateForbidden %+v", 403, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateForbidden) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateForbidden %+v", 403, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateDashboardsFromTemplateForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateDashboardsFromTemplateNotFound creates a BulkUpdateDashboardsFromTemplateNotFound with default headers values +func NewBulkUpdateDashboardsFromTemplateNotFound() *BulkUpdateDashboardsFromTemplateNotFound { + return &BulkUpdateDashboardsFromTemplateNotFound{} +} + +/* +BulkUpdateDashboardsFromTemplateNotFound describes a response with status code 404, with default header values. + +Content resource does not exist +*/ +type BulkUpdateDashboardsFromTemplateNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update dashboards from template not found response has a 2xx status code +func (o *BulkUpdateDashboardsFromTemplateNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update dashboards from template not found response has a 3xx status code +func (o *BulkUpdateDashboardsFromTemplateNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update dashboards from template not found response has a 4xx status code +func (o *BulkUpdateDashboardsFromTemplateNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update dashboards from template not found response has a 5xx status code +func (o *BulkUpdateDashboardsFromTemplateNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update dashboards from template not found response a status code equal to that given +func (o *BulkUpdateDashboardsFromTemplateNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the bulk update dashboards from template not found response +func (o *BulkUpdateDashboardsFromTemplateNotFound) Code() int { + return 404 +} + +func (o *BulkUpdateDashboardsFromTemplateNotFound) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateNotFound %+v", 404, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateNotFound) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateNotFound %+v", 404, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateNotFound) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateDashboardsFromTemplateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateDashboardsFromTemplateTooManyRequests creates a BulkUpdateDashboardsFromTemplateTooManyRequests with default headers values +func NewBulkUpdateDashboardsFromTemplateTooManyRequests() *BulkUpdateDashboardsFromTemplateTooManyRequests { + return &BulkUpdateDashboardsFromTemplateTooManyRequests{} +} + +/* +BulkUpdateDashboardsFromTemplateTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type BulkUpdateDashboardsFromTemplateTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this bulk update dashboards from template too many requests response has a 2xx status code +func (o *BulkUpdateDashboardsFromTemplateTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update dashboards from template too many requests response has a 3xx status code +func (o *BulkUpdateDashboardsFromTemplateTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update dashboards from template too many requests response has a 4xx status code +func (o *BulkUpdateDashboardsFromTemplateTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update dashboards from template too many requests response has a 5xx status code +func (o *BulkUpdateDashboardsFromTemplateTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update dashboards from template too many requests response a status code equal to that given +func (o *BulkUpdateDashboardsFromTemplateTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the bulk update dashboards from template too many requests response +func (o *BulkUpdateDashboardsFromTemplateTooManyRequests) Code() int { + return 429 +} + +func (o *BulkUpdateDashboardsFromTemplateTooManyRequests) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateTooManyRequests) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *BulkUpdateDashboardsFromTemplateTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateDashboardsFromTemplateInternalServerError creates a BulkUpdateDashboardsFromTemplateInternalServerError with default headers values +func NewBulkUpdateDashboardsFromTemplateInternalServerError() *BulkUpdateDashboardsFromTemplateInternalServerError { + return &BulkUpdateDashboardsFromTemplateInternalServerError{} +} + +/* +BulkUpdateDashboardsFromTemplateInternalServerError describes a response with status code 500, with default header values. + +Unexpected error occurred +*/ +type BulkUpdateDashboardsFromTemplateInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update dashboards from template internal server error response has a 2xx status code +func (o *BulkUpdateDashboardsFromTemplateInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update dashboards from template internal server error response has a 3xx status code +func (o *BulkUpdateDashboardsFromTemplateInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update dashboards from template internal server error response has a 4xx status code +func (o *BulkUpdateDashboardsFromTemplateInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk update dashboards from template internal server error response has a 5xx status code +func (o *BulkUpdateDashboardsFromTemplateInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this bulk update dashboards from template internal server error response a status code equal to that given +func (o *BulkUpdateDashboardsFromTemplateInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the bulk update dashboards from template internal server error response +func (o *BulkUpdateDashboardsFromTemplateInternalServerError) Code() int { + return 500 +} + +func (o *BulkUpdateDashboardsFromTemplateInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateInternalServerError) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-dashboards-template/v1][%d] bulkUpdateDashboardsFromTemplateInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkUpdateDashboardsFromTemplateInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateDashboardsFromTemplateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/ngsiem/bulk_update_lookup_files_parameters.go b/falcon/client/ngsiem/bulk_update_lookup_files_parameters.go new file mode 100644 index 000000000..21e9f6397 --- /dev/null +++ b/falcon/client/ngsiem/bulk_update_lookup_files_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewBulkUpdateLookupFilesParams creates a new BulkUpdateLookupFilesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBulkUpdateLookupFilesParams() *BulkUpdateLookupFilesParams { + return &BulkUpdateLookupFilesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBulkUpdateLookupFilesParamsWithTimeout creates a new BulkUpdateLookupFilesParams object +// with the ability to set a timeout on a request. +func NewBulkUpdateLookupFilesParamsWithTimeout(timeout time.Duration) *BulkUpdateLookupFilesParams { + return &BulkUpdateLookupFilesParams{ + timeout: timeout, + } +} + +// NewBulkUpdateLookupFilesParamsWithContext creates a new BulkUpdateLookupFilesParams object +// with the ability to set a context for a request. +func NewBulkUpdateLookupFilesParamsWithContext(ctx context.Context) *BulkUpdateLookupFilesParams { + return &BulkUpdateLookupFilesParams{ + Context: ctx, + } +} + +// NewBulkUpdateLookupFilesParamsWithHTTPClient creates a new BulkUpdateLookupFilesParams object +// with the ability to set a custom HTTPClient for a request. +func NewBulkUpdateLookupFilesParamsWithHTTPClient(client *http.Client) *BulkUpdateLookupFilesParams { + return &BulkUpdateLookupFilesParams{ + HTTPClient: client, + } +} + +/* +BulkUpdateLookupFilesParams contains all the parameters to send to the API endpoint + + for the bulk update lookup files operation. + + Typically these are written to a http.Request. +*/ +type BulkUpdateLookupFilesParams struct { + + // Body. + Body *models.APIBulkUpdateLookupFilesRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bulk update lookup files params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkUpdateLookupFilesParams) WithDefaults() *BulkUpdateLookupFilesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bulk update lookup files params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkUpdateLookupFilesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bulk update lookup files params +func (o *BulkUpdateLookupFilesParams) WithTimeout(timeout time.Duration) *BulkUpdateLookupFilesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bulk update lookup files params +func (o *BulkUpdateLookupFilesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bulk update lookup files params +func (o *BulkUpdateLookupFilesParams) WithContext(ctx context.Context) *BulkUpdateLookupFilesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bulk update lookup files params +func (o *BulkUpdateLookupFilesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bulk update lookup files params +func (o *BulkUpdateLookupFilesParams) WithHTTPClient(client *http.Client) *BulkUpdateLookupFilesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bulk update lookup files params +func (o *BulkUpdateLookupFilesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bulk update lookup files params +func (o *BulkUpdateLookupFilesParams) WithBody(body *models.APIBulkUpdateLookupFilesRequestV1) *BulkUpdateLookupFilesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bulk update lookup files params +func (o *BulkUpdateLookupFilesParams) SetBody(body *models.APIBulkUpdateLookupFilesRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *BulkUpdateLookupFilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/ngsiem/bulk_update_lookup_files_responses.go b/falcon/client/ngsiem/bulk_update_lookup_files_responses.go new file mode 100644 index 000000000..6ae1a15fa --- /dev/null +++ b/falcon/client/ngsiem/bulk_update_lookup_files_responses.go @@ -0,0 +1,858 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// BulkUpdateLookupFilesReader is a Reader for the BulkUpdateLookupFiles structure. +type BulkUpdateLookupFilesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BulkUpdateLookupFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBulkUpdateLookupFilesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBulkUpdateLookupFilesBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBulkUpdateLookupFilesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewBulkUpdateLookupFilesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBulkUpdateLookupFilesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewBulkUpdateLookupFilesTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBulkUpdateLookupFilesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1] BulkUpdateLookupFiles", response, response.Code()) + } +} + +// NewBulkUpdateLookupFilesOK creates a BulkUpdateLookupFilesOK with default headers values +func NewBulkUpdateLookupFilesOK() *BulkUpdateLookupFilesOK { + return &BulkUpdateLookupFilesOK{} +} + +/* +BulkUpdateLookupFilesOK describes a response with status code 200, with default header values. + +BulkUpdateLookupFilesOK bulk update lookup files o k +*/ +type BulkUpdateLookupFilesOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APIBulkUpdateLookupFilesResponseV1 +} + +// IsSuccess returns true when this bulk update lookup files o k response has a 2xx status code +func (o *BulkUpdateLookupFilesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this bulk update lookup files o k response has a 3xx status code +func (o *BulkUpdateLookupFilesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update lookup files o k response has a 4xx status code +func (o *BulkUpdateLookupFilesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk update lookup files o k response has a 5xx status code +func (o *BulkUpdateLookupFilesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update lookup files o k response a status code equal to that given +func (o *BulkUpdateLookupFilesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the bulk update lookup files o k response +func (o *BulkUpdateLookupFilesOK) Code() int { + return 200 +} + +func (o *BulkUpdateLookupFilesOK) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesOK %+v", 200, o.Payload) +} + +func (o *BulkUpdateLookupFilesOK) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesOK %+v", 200, o.Payload) +} + +func (o *BulkUpdateLookupFilesOK) GetPayload() *models.APIBulkUpdateLookupFilesResponseV1 { + return o.Payload +} + +func (o *BulkUpdateLookupFilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APIBulkUpdateLookupFilesResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateLookupFilesBadRequest creates a BulkUpdateLookupFilesBadRequest with default headers values +func NewBulkUpdateLookupFilesBadRequest() *BulkUpdateLookupFilesBadRequest { + return &BulkUpdateLookupFilesBadRequest{} +} + +/* +BulkUpdateLookupFilesBadRequest describes a response with status code 400, with default header values. + +Bad request for content operations +*/ +type BulkUpdateLookupFilesBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update lookup files bad request response has a 2xx status code +func (o *BulkUpdateLookupFilesBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update lookup files bad request response has a 3xx status code +func (o *BulkUpdateLookupFilesBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update lookup files bad request response has a 4xx status code +func (o *BulkUpdateLookupFilesBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update lookup files bad request response has a 5xx status code +func (o *BulkUpdateLookupFilesBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update lookup files bad request response a status code equal to that given +func (o *BulkUpdateLookupFilesBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the bulk update lookup files bad request response +func (o *BulkUpdateLookupFilesBadRequest) Code() int { + return 400 +} + +func (o *BulkUpdateLookupFilesBadRequest) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesBadRequest %+v", 400, o.Payload) +} + +func (o *BulkUpdateLookupFilesBadRequest) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesBadRequest %+v", 400, o.Payload) +} + +func (o *BulkUpdateLookupFilesBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateLookupFilesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateLookupFilesUnauthorized creates a BulkUpdateLookupFilesUnauthorized with default headers values +func NewBulkUpdateLookupFilesUnauthorized() *BulkUpdateLookupFilesUnauthorized { + return &BulkUpdateLookupFilesUnauthorized{} +} + +/* +BulkUpdateLookupFilesUnauthorized describes a response with status code 401, with default header values. + +Requestor is not authorized to access resource +*/ +type BulkUpdateLookupFilesUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update lookup files unauthorized response has a 2xx status code +func (o *BulkUpdateLookupFilesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update lookup files unauthorized response has a 3xx status code +func (o *BulkUpdateLookupFilesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update lookup files unauthorized response has a 4xx status code +func (o *BulkUpdateLookupFilesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update lookup files unauthorized response has a 5xx status code +func (o *BulkUpdateLookupFilesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update lookup files unauthorized response a status code equal to that given +func (o *BulkUpdateLookupFilesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the bulk update lookup files unauthorized response +func (o *BulkUpdateLookupFilesUnauthorized) Code() int { + return 401 +} + +func (o *BulkUpdateLookupFilesUnauthorized) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkUpdateLookupFilesUnauthorized) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkUpdateLookupFilesUnauthorized) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateLookupFilesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateLookupFilesForbidden creates a BulkUpdateLookupFilesForbidden with default headers values +func NewBulkUpdateLookupFilesForbidden() *BulkUpdateLookupFilesForbidden { + return &BulkUpdateLookupFilesForbidden{} +} + +/* +BulkUpdateLookupFilesForbidden describes a response with status code 403, with default header values. + +Content access is not allowed +*/ +type BulkUpdateLookupFilesForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update lookup files forbidden response has a 2xx status code +func (o *BulkUpdateLookupFilesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update lookup files forbidden response has a 3xx status code +func (o *BulkUpdateLookupFilesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update lookup files forbidden response has a 4xx status code +func (o *BulkUpdateLookupFilesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update lookup files forbidden response has a 5xx status code +func (o *BulkUpdateLookupFilesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update lookup files forbidden response a status code equal to that given +func (o *BulkUpdateLookupFilesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the bulk update lookup files forbidden response +func (o *BulkUpdateLookupFilesForbidden) Code() int { + return 403 +} + +func (o *BulkUpdateLookupFilesForbidden) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesForbidden %+v", 403, o.Payload) +} + +func (o *BulkUpdateLookupFilesForbidden) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesForbidden %+v", 403, o.Payload) +} + +func (o *BulkUpdateLookupFilesForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateLookupFilesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateLookupFilesNotFound creates a BulkUpdateLookupFilesNotFound with default headers values +func NewBulkUpdateLookupFilesNotFound() *BulkUpdateLookupFilesNotFound { + return &BulkUpdateLookupFilesNotFound{} +} + +/* +BulkUpdateLookupFilesNotFound describes a response with status code 404, with default header values. + +Content resource does not exist +*/ +type BulkUpdateLookupFilesNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update lookup files not found response has a 2xx status code +func (o *BulkUpdateLookupFilesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update lookup files not found response has a 3xx status code +func (o *BulkUpdateLookupFilesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update lookup files not found response has a 4xx status code +func (o *BulkUpdateLookupFilesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update lookup files not found response has a 5xx status code +func (o *BulkUpdateLookupFilesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update lookup files not found response a status code equal to that given +func (o *BulkUpdateLookupFilesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the bulk update lookup files not found response +func (o *BulkUpdateLookupFilesNotFound) Code() int { + return 404 +} + +func (o *BulkUpdateLookupFilesNotFound) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesNotFound %+v", 404, o.Payload) +} + +func (o *BulkUpdateLookupFilesNotFound) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesNotFound %+v", 404, o.Payload) +} + +func (o *BulkUpdateLookupFilesNotFound) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateLookupFilesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateLookupFilesTooManyRequests creates a BulkUpdateLookupFilesTooManyRequests with default headers values +func NewBulkUpdateLookupFilesTooManyRequests() *BulkUpdateLookupFilesTooManyRequests { + return &BulkUpdateLookupFilesTooManyRequests{} +} + +/* +BulkUpdateLookupFilesTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type BulkUpdateLookupFilesTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this bulk update lookup files too many requests response has a 2xx status code +func (o *BulkUpdateLookupFilesTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update lookup files too many requests response has a 3xx status code +func (o *BulkUpdateLookupFilesTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update lookup files too many requests response has a 4xx status code +func (o *BulkUpdateLookupFilesTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update lookup files too many requests response has a 5xx status code +func (o *BulkUpdateLookupFilesTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update lookup files too many requests response a status code equal to that given +func (o *BulkUpdateLookupFilesTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the bulk update lookup files too many requests response +func (o *BulkUpdateLookupFilesTooManyRequests) Code() int { + return 429 +} + +func (o *BulkUpdateLookupFilesTooManyRequests) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkUpdateLookupFilesTooManyRequests) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkUpdateLookupFilesTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *BulkUpdateLookupFilesTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateLookupFilesInternalServerError creates a BulkUpdateLookupFilesInternalServerError with default headers values +func NewBulkUpdateLookupFilesInternalServerError() *BulkUpdateLookupFilesInternalServerError { + return &BulkUpdateLookupFilesInternalServerError{} +} + +/* +BulkUpdateLookupFilesInternalServerError describes a response with status code 500, with default header values. + +Unexpected error occurred +*/ +type BulkUpdateLookupFilesInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update lookup files internal server error response has a 2xx status code +func (o *BulkUpdateLookupFilesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update lookup files internal server error response has a 3xx status code +func (o *BulkUpdateLookupFilesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update lookup files internal server error response has a 4xx status code +func (o *BulkUpdateLookupFilesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk update lookup files internal server error response has a 5xx status code +func (o *BulkUpdateLookupFilesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this bulk update lookup files internal server error response a status code equal to that given +func (o *BulkUpdateLookupFilesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the bulk update lookup files internal server error response +func (o *BulkUpdateLookupFilesInternalServerError) Code() int { + return 500 +} + +func (o *BulkUpdateLookupFilesInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkUpdateLookupFilesInternalServerError) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-lookupfiles/v1][%d] bulkUpdateLookupFilesInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkUpdateLookupFilesInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateLookupFilesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/ngsiem/bulk_update_saved_queries_from_template_parameters.go b/falcon/client/ngsiem/bulk_update_saved_queries_from_template_parameters.go new file mode 100644 index 000000000..f78e44dd1 --- /dev/null +++ b/falcon/client/ngsiem/bulk_update_saved_queries_from_template_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewBulkUpdateSavedQueriesFromTemplateParams creates a new BulkUpdateSavedQueriesFromTemplateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBulkUpdateSavedQueriesFromTemplateParams() *BulkUpdateSavedQueriesFromTemplateParams { + return &BulkUpdateSavedQueriesFromTemplateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBulkUpdateSavedQueriesFromTemplateParamsWithTimeout creates a new BulkUpdateSavedQueriesFromTemplateParams object +// with the ability to set a timeout on a request. +func NewBulkUpdateSavedQueriesFromTemplateParamsWithTimeout(timeout time.Duration) *BulkUpdateSavedQueriesFromTemplateParams { + return &BulkUpdateSavedQueriesFromTemplateParams{ + timeout: timeout, + } +} + +// NewBulkUpdateSavedQueriesFromTemplateParamsWithContext creates a new BulkUpdateSavedQueriesFromTemplateParams object +// with the ability to set a context for a request. +func NewBulkUpdateSavedQueriesFromTemplateParamsWithContext(ctx context.Context) *BulkUpdateSavedQueriesFromTemplateParams { + return &BulkUpdateSavedQueriesFromTemplateParams{ + Context: ctx, + } +} + +// NewBulkUpdateSavedQueriesFromTemplateParamsWithHTTPClient creates a new BulkUpdateSavedQueriesFromTemplateParams object +// with the ability to set a custom HTTPClient for a request. +func NewBulkUpdateSavedQueriesFromTemplateParamsWithHTTPClient(client *http.Client) *BulkUpdateSavedQueriesFromTemplateParams { + return &BulkUpdateSavedQueriesFromTemplateParams{ + HTTPClient: client, + } +} + +/* +BulkUpdateSavedQueriesFromTemplateParams contains all the parameters to send to the API endpoint + + for the bulk update saved queries from template operation. + + Typically these are written to a http.Request. +*/ +type BulkUpdateSavedQueriesFromTemplateParams struct { + + /* Body. + + bulk update saved queries request + */ + Body *models.APIBulkUpdateSavedQueriesFromTemplateRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bulk update saved queries from template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkUpdateSavedQueriesFromTemplateParams) WithDefaults() *BulkUpdateSavedQueriesFromTemplateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bulk update saved queries from template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BulkUpdateSavedQueriesFromTemplateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bulk update saved queries from template params +func (o *BulkUpdateSavedQueriesFromTemplateParams) WithTimeout(timeout time.Duration) *BulkUpdateSavedQueriesFromTemplateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bulk update saved queries from template params +func (o *BulkUpdateSavedQueriesFromTemplateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bulk update saved queries from template params +func (o *BulkUpdateSavedQueriesFromTemplateParams) WithContext(ctx context.Context) *BulkUpdateSavedQueriesFromTemplateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bulk update saved queries from template params +func (o *BulkUpdateSavedQueriesFromTemplateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bulk update saved queries from template params +func (o *BulkUpdateSavedQueriesFromTemplateParams) WithHTTPClient(client *http.Client) *BulkUpdateSavedQueriesFromTemplateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bulk update saved queries from template params +func (o *BulkUpdateSavedQueriesFromTemplateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bulk update saved queries from template params +func (o *BulkUpdateSavedQueriesFromTemplateParams) WithBody(body *models.APIBulkUpdateSavedQueriesFromTemplateRequestV1) *BulkUpdateSavedQueriesFromTemplateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bulk update saved queries from template params +func (o *BulkUpdateSavedQueriesFromTemplateParams) SetBody(body *models.APIBulkUpdateSavedQueriesFromTemplateRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *BulkUpdateSavedQueriesFromTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/ngsiem/bulk_update_saved_queries_from_template_responses.go b/falcon/client/ngsiem/bulk_update_saved_queries_from_template_responses.go new file mode 100644 index 000000000..aef9d638c --- /dev/null +++ b/falcon/client/ngsiem/bulk_update_saved_queries_from_template_responses.go @@ -0,0 +1,858 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// BulkUpdateSavedQueriesFromTemplateReader is a Reader for the BulkUpdateSavedQueriesFromTemplate structure. +type BulkUpdateSavedQueriesFromTemplateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BulkUpdateSavedQueriesFromTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBulkUpdateSavedQueriesFromTemplateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewBulkUpdateSavedQueriesFromTemplateBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewBulkUpdateSavedQueriesFromTemplateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewBulkUpdateSavedQueriesFromTemplateForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBulkUpdateSavedQueriesFromTemplateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewBulkUpdateSavedQueriesFromTemplateTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBulkUpdateSavedQueriesFromTemplateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1] BulkUpdateSavedQueriesFromTemplate", response, response.Code()) + } +} + +// NewBulkUpdateSavedQueriesFromTemplateOK creates a BulkUpdateSavedQueriesFromTemplateOK with default headers values +func NewBulkUpdateSavedQueriesFromTemplateOK() *BulkUpdateSavedQueriesFromTemplateOK { + return &BulkUpdateSavedQueriesFromTemplateOK{} +} + +/* +BulkUpdateSavedQueriesFromTemplateOK describes a response with status code 200, with default header values. + +BulkUpdateSavedQueriesFromTemplateOK bulk update saved queries from template o k +*/ +type BulkUpdateSavedQueriesFromTemplateOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APIBulkUpdateSavedQueriesFromTemplateResponseV1 +} + +// IsSuccess returns true when this bulk update saved queries from template o k response has a 2xx status code +func (o *BulkUpdateSavedQueriesFromTemplateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this bulk update saved queries from template o k response has a 3xx status code +func (o *BulkUpdateSavedQueriesFromTemplateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update saved queries from template o k response has a 4xx status code +func (o *BulkUpdateSavedQueriesFromTemplateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk update saved queries from template o k response has a 5xx status code +func (o *BulkUpdateSavedQueriesFromTemplateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update saved queries from template o k response a status code equal to that given +func (o *BulkUpdateSavedQueriesFromTemplateOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the bulk update saved queries from template o k response +func (o *BulkUpdateSavedQueriesFromTemplateOK) Code() int { + return 200 +} + +func (o *BulkUpdateSavedQueriesFromTemplateOK) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateOK %+v", 200, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateOK) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateOK %+v", 200, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateOK) GetPayload() *models.APIBulkUpdateSavedQueriesFromTemplateResponseV1 { + return o.Payload +} + +func (o *BulkUpdateSavedQueriesFromTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APIBulkUpdateSavedQueriesFromTemplateResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateSavedQueriesFromTemplateBadRequest creates a BulkUpdateSavedQueriesFromTemplateBadRequest with default headers values +func NewBulkUpdateSavedQueriesFromTemplateBadRequest() *BulkUpdateSavedQueriesFromTemplateBadRequest { + return &BulkUpdateSavedQueriesFromTemplateBadRequest{} +} + +/* +BulkUpdateSavedQueriesFromTemplateBadRequest describes a response with status code 400, with default header values. + +Bad request for content operations +*/ +type BulkUpdateSavedQueriesFromTemplateBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update saved queries from template bad request response has a 2xx status code +func (o *BulkUpdateSavedQueriesFromTemplateBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update saved queries from template bad request response has a 3xx status code +func (o *BulkUpdateSavedQueriesFromTemplateBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update saved queries from template bad request response has a 4xx status code +func (o *BulkUpdateSavedQueriesFromTemplateBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update saved queries from template bad request response has a 5xx status code +func (o *BulkUpdateSavedQueriesFromTemplateBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update saved queries from template bad request response a status code equal to that given +func (o *BulkUpdateSavedQueriesFromTemplateBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the bulk update saved queries from template bad request response +func (o *BulkUpdateSavedQueriesFromTemplateBadRequest) Code() int { + return 400 +} + +func (o *BulkUpdateSavedQueriesFromTemplateBadRequest) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateBadRequest %+v", 400, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateBadRequest) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateBadRequest %+v", 400, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateSavedQueriesFromTemplateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateSavedQueriesFromTemplateUnauthorized creates a BulkUpdateSavedQueriesFromTemplateUnauthorized with default headers values +func NewBulkUpdateSavedQueriesFromTemplateUnauthorized() *BulkUpdateSavedQueriesFromTemplateUnauthorized { + return &BulkUpdateSavedQueriesFromTemplateUnauthorized{} +} + +/* +BulkUpdateSavedQueriesFromTemplateUnauthorized describes a response with status code 401, with default header values. + +Requestor is not authorized to access resource +*/ +type BulkUpdateSavedQueriesFromTemplateUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update saved queries from template unauthorized response has a 2xx status code +func (o *BulkUpdateSavedQueriesFromTemplateUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update saved queries from template unauthorized response has a 3xx status code +func (o *BulkUpdateSavedQueriesFromTemplateUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update saved queries from template unauthorized response has a 4xx status code +func (o *BulkUpdateSavedQueriesFromTemplateUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update saved queries from template unauthorized response has a 5xx status code +func (o *BulkUpdateSavedQueriesFromTemplateUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update saved queries from template unauthorized response a status code equal to that given +func (o *BulkUpdateSavedQueriesFromTemplateUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the bulk update saved queries from template unauthorized response +func (o *BulkUpdateSavedQueriesFromTemplateUnauthorized) Code() int { + return 401 +} + +func (o *BulkUpdateSavedQueriesFromTemplateUnauthorized) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateUnauthorized) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateUnauthorized %+v", 401, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateUnauthorized) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateSavedQueriesFromTemplateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateSavedQueriesFromTemplateForbidden creates a BulkUpdateSavedQueriesFromTemplateForbidden with default headers values +func NewBulkUpdateSavedQueriesFromTemplateForbidden() *BulkUpdateSavedQueriesFromTemplateForbidden { + return &BulkUpdateSavedQueriesFromTemplateForbidden{} +} + +/* +BulkUpdateSavedQueriesFromTemplateForbidden describes a response with status code 403, with default header values. + +Content access is not allowed +*/ +type BulkUpdateSavedQueriesFromTemplateForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update saved queries from template forbidden response has a 2xx status code +func (o *BulkUpdateSavedQueriesFromTemplateForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update saved queries from template forbidden response has a 3xx status code +func (o *BulkUpdateSavedQueriesFromTemplateForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update saved queries from template forbidden response has a 4xx status code +func (o *BulkUpdateSavedQueriesFromTemplateForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update saved queries from template forbidden response has a 5xx status code +func (o *BulkUpdateSavedQueriesFromTemplateForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update saved queries from template forbidden response a status code equal to that given +func (o *BulkUpdateSavedQueriesFromTemplateForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the bulk update saved queries from template forbidden response +func (o *BulkUpdateSavedQueriesFromTemplateForbidden) Code() int { + return 403 +} + +func (o *BulkUpdateSavedQueriesFromTemplateForbidden) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateForbidden %+v", 403, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateForbidden) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateForbidden %+v", 403, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateSavedQueriesFromTemplateForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateSavedQueriesFromTemplateNotFound creates a BulkUpdateSavedQueriesFromTemplateNotFound with default headers values +func NewBulkUpdateSavedQueriesFromTemplateNotFound() *BulkUpdateSavedQueriesFromTemplateNotFound { + return &BulkUpdateSavedQueriesFromTemplateNotFound{} +} + +/* +BulkUpdateSavedQueriesFromTemplateNotFound describes a response with status code 404, with default header values. + +Content resource does not exist +*/ +type BulkUpdateSavedQueriesFromTemplateNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update saved queries from template not found response has a 2xx status code +func (o *BulkUpdateSavedQueriesFromTemplateNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update saved queries from template not found response has a 3xx status code +func (o *BulkUpdateSavedQueriesFromTemplateNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update saved queries from template not found response has a 4xx status code +func (o *BulkUpdateSavedQueriesFromTemplateNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update saved queries from template not found response has a 5xx status code +func (o *BulkUpdateSavedQueriesFromTemplateNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update saved queries from template not found response a status code equal to that given +func (o *BulkUpdateSavedQueriesFromTemplateNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the bulk update saved queries from template not found response +func (o *BulkUpdateSavedQueriesFromTemplateNotFound) Code() int { + return 404 +} + +func (o *BulkUpdateSavedQueriesFromTemplateNotFound) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateNotFound %+v", 404, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateNotFound) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateNotFound %+v", 404, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateNotFound) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateSavedQueriesFromTemplateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateSavedQueriesFromTemplateTooManyRequests creates a BulkUpdateSavedQueriesFromTemplateTooManyRequests with default headers values +func NewBulkUpdateSavedQueriesFromTemplateTooManyRequests() *BulkUpdateSavedQueriesFromTemplateTooManyRequests { + return &BulkUpdateSavedQueriesFromTemplateTooManyRequests{} +} + +/* +BulkUpdateSavedQueriesFromTemplateTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type BulkUpdateSavedQueriesFromTemplateTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this bulk update saved queries from template too many requests response has a 2xx status code +func (o *BulkUpdateSavedQueriesFromTemplateTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update saved queries from template too many requests response has a 3xx status code +func (o *BulkUpdateSavedQueriesFromTemplateTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update saved queries from template too many requests response has a 4xx status code +func (o *BulkUpdateSavedQueriesFromTemplateTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this bulk update saved queries from template too many requests response has a 5xx status code +func (o *BulkUpdateSavedQueriesFromTemplateTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this bulk update saved queries from template too many requests response a status code equal to that given +func (o *BulkUpdateSavedQueriesFromTemplateTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the bulk update saved queries from template too many requests response +func (o *BulkUpdateSavedQueriesFromTemplateTooManyRequests) Code() int { + return 429 +} + +func (o *BulkUpdateSavedQueriesFromTemplateTooManyRequests) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateTooManyRequests) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateTooManyRequests %+v", 429, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *BulkUpdateSavedQueriesFromTemplateTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBulkUpdateSavedQueriesFromTemplateInternalServerError creates a BulkUpdateSavedQueriesFromTemplateInternalServerError with default headers values +func NewBulkUpdateSavedQueriesFromTemplateInternalServerError() *BulkUpdateSavedQueriesFromTemplateInternalServerError { + return &BulkUpdateSavedQueriesFromTemplateInternalServerError{} +} + +/* +BulkUpdateSavedQueriesFromTemplateInternalServerError describes a response with status code 500, with default header values. + +Unexpected error occurred +*/ +type BulkUpdateSavedQueriesFromTemplateInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this bulk update saved queries from template internal server error response has a 2xx status code +func (o *BulkUpdateSavedQueriesFromTemplateInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bulk update saved queries from template internal server error response has a 3xx status code +func (o *BulkUpdateSavedQueriesFromTemplateInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bulk update saved queries from template internal server error response has a 4xx status code +func (o *BulkUpdateSavedQueriesFromTemplateInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this bulk update saved queries from template internal server error response has a 5xx status code +func (o *BulkUpdateSavedQueriesFromTemplateInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this bulk update saved queries from template internal server error response a status code equal to that given +func (o *BulkUpdateSavedQueriesFromTemplateInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the bulk update saved queries from template internal server error response +func (o *BulkUpdateSavedQueriesFromTemplateInternalServerError) Code() int { + return 500 +} + +func (o *BulkUpdateSavedQueriesFromTemplateInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateInternalServerError) String() string { + return fmt.Sprintf("[PATCH /ngsiem-content/entities/bulk-savedqueries-template/v1][%d] bulkUpdateSavedQueriesFromTemplateInternalServerError %+v", 500, o.Payload) +} + +func (o *BulkUpdateSavedQueriesFromTemplateInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *BulkUpdateSavedQueriesFromTemplateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/ngsiem/create_parser_extension_parameters.go b/falcon/client/ngsiem/create_parser_extension_parameters.go new file mode 100644 index 000000000..19cc304c0 --- /dev/null +++ b/falcon/client/ngsiem/create_parser_extension_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewCreateParserExtensionParams creates a new CreateParserExtensionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCreateParserExtensionParams() *CreateParserExtensionParams { + return &CreateParserExtensionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCreateParserExtensionParamsWithTimeout creates a new CreateParserExtensionParams object +// with the ability to set a timeout on a request. +func NewCreateParserExtensionParamsWithTimeout(timeout time.Duration) *CreateParserExtensionParams { + return &CreateParserExtensionParams{ + timeout: timeout, + } +} + +// NewCreateParserExtensionParamsWithContext creates a new CreateParserExtensionParams object +// with the ability to set a context for a request. +func NewCreateParserExtensionParamsWithContext(ctx context.Context) *CreateParserExtensionParams { + return &CreateParserExtensionParams{ + Context: ctx, + } +} + +// NewCreateParserExtensionParamsWithHTTPClient creates a new CreateParserExtensionParams object +// with the ability to set a custom HTTPClient for a request. +func NewCreateParserExtensionParamsWithHTTPClient(client *http.Client) *CreateParserExtensionParams { + return &CreateParserExtensionParams{ + HTTPClient: client, + } +} + +/* +CreateParserExtensionParams contains all the parameters to send to the API endpoint + + for the create parser extension operation. + + Typically these are written to a http.Request. +*/ +type CreateParserExtensionParams struct { + + /* Body. + + create parser extension request + */ + Body *models.APICreateParserExtensionRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the create parser extension params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateParserExtensionParams) WithDefaults() *CreateParserExtensionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the create parser extension params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateParserExtensionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the create parser extension params +func (o *CreateParserExtensionParams) WithTimeout(timeout time.Duration) *CreateParserExtensionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the create parser extension params +func (o *CreateParserExtensionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the create parser extension params +func (o *CreateParserExtensionParams) WithContext(ctx context.Context) *CreateParserExtensionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the create parser extension params +func (o *CreateParserExtensionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the create parser extension params +func (o *CreateParserExtensionParams) WithHTTPClient(client *http.Client) *CreateParserExtensionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the create parser extension params +func (o *CreateParserExtensionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the create parser extension params +func (o *CreateParserExtensionParams) WithBody(body *models.APICreateParserExtensionRequestV1) *CreateParserExtensionParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the create parser extension params +func (o *CreateParserExtensionParams) SetBody(body *models.APICreateParserExtensionRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *CreateParserExtensionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/ngsiem/create_parser_extension_responses.go b/falcon/client/ngsiem/create_parser_extension_responses.go new file mode 100644 index 000000000..49a979c39 --- /dev/null +++ b/falcon/client/ngsiem/create_parser_extension_responses.go @@ -0,0 +1,858 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ngsiem + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CreateParserExtensionReader is a Reader for the CreateParserExtension structure. +type CreateParserExtensionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CreateParserExtensionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCreateParserExtensionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCreateParserExtensionBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewCreateParserExtensionUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCreateParserExtensionForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewCreateParserExtensionNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCreateParserExtensionTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCreateParserExtensionInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /ngsiem-content/entities/parsers-extensions/v1] CreateParserExtension", response, response.Code()) + } +} + +// NewCreateParserExtensionOK creates a CreateParserExtensionOK with default headers values +func NewCreateParserExtensionOK() *CreateParserExtensionOK { + return &CreateParserExtensionOK{} +} + +/* +CreateParserExtensionOK describes a response with status code 200, with default header values. + +CreateParserExtensionOK create parser extension o k +*/ +type CreateParserExtensionOK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.APICreateParserResponseV1 +} + +// IsSuccess returns true when this create parser extension o k response has a 2xx status code +func (o *CreateParserExtensionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this create parser extension o k response has a 3xx status code +func (o *CreateParserExtensionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create parser extension o k response has a 4xx status code +func (o *CreateParserExtensionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this create parser extension o k response has a 5xx status code +func (o *CreateParserExtensionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this create parser extension o k response a status code equal to that given +func (o *CreateParserExtensionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the create parser extension o k response +func (o *CreateParserExtensionOK) Code() int { + return 200 +} + +func (o *CreateParserExtensionOK) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionOK %+v", 200, o.Payload) +} + +func (o *CreateParserExtensionOK) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionOK %+v", 200, o.Payload) +} + +func (o *CreateParserExtensionOK) GetPayload() *models.APICreateParserResponseV1 { + return o.Payload +} + +func (o *CreateParserExtensionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.APICreateParserResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateParserExtensionBadRequest creates a CreateParserExtensionBadRequest with default headers values +func NewCreateParserExtensionBadRequest() *CreateParserExtensionBadRequest { + return &CreateParserExtensionBadRequest{} +} + +/* +CreateParserExtensionBadRequest describes a response with status code 400, with default header values. + +Bad request for content operations +*/ +type CreateParserExtensionBadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this create parser extension bad request response has a 2xx status code +func (o *CreateParserExtensionBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create parser extension bad request response has a 3xx status code +func (o *CreateParserExtensionBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create parser extension bad request response has a 4xx status code +func (o *CreateParserExtensionBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this create parser extension bad request response has a 5xx status code +func (o *CreateParserExtensionBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this create parser extension bad request response a status code equal to that given +func (o *CreateParserExtensionBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the create parser extension bad request response +func (o *CreateParserExtensionBadRequest) Code() int { + return 400 +} + +func (o *CreateParserExtensionBadRequest) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionBadRequest %+v", 400, o.Payload) +} + +func (o *CreateParserExtensionBadRequest) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionBadRequest %+v", 400, o.Payload) +} + +func (o *CreateParserExtensionBadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CreateParserExtensionBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateParserExtensionUnauthorized creates a CreateParserExtensionUnauthorized with default headers values +func NewCreateParserExtensionUnauthorized() *CreateParserExtensionUnauthorized { + return &CreateParserExtensionUnauthorized{} +} + +/* +CreateParserExtensionUnauthorized describes a response with status code 401, with default header values. + +Requestor is not authorized to access resource +*/ +type CreateParserExtensionUnauthorized struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this create parser extension unauthorized response has a 2xx status code +func (o *CreateParserExtensionUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create parser extension unauthorized response has a 3xx status code +func (o *CreateParserExtensionUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create parser extension unauthorized response has a 4xx status code +func (o *CreateParserExtensionUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this create parser extension unauthorized response has a 5xx status code +func (o *CreateParserExtensionUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this create parser extension unauthorized response a status code equal to that given +func (o *CreateParserExtensionUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the create parser extension unauthorized response +func (o *CreateParserExtensionUnauthorized) Code() int { + return 401 +} + +func (o *CreateParserExtensionUnauthorized) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionUnauthorized %+v", 401, o.Payload) +} + +func (o *CreateParserExtensionUnauthorized) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionUnauthorized %+v", 401, o.Payload) +} + +func (o *CreateParserExtensionUnauthorized) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CreateParserExtensionUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateParserExtensionForbidden creates a CreateParserExtensionForbidden with default headers values +func NewCreateParserExtensionForbidden() *CreateParserExtensionForbidden { + return &CreateParserExtensionForbidden{} +} + +/* +CreateParserExtensionForbidden describes a response with status code 403, with default header values. + +Content access is not allowed +*/ +type CreateParserExtensionForbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this create parser extension forbidden response has a 2xx status code +func (o *CreateParserExtensionForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create parser extension forbidden response has a 3xx status code +func (o *CreateParserExtensionForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create parser extension forbidden response has a 4xx status code +func (o *CreateParserExtensionForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this create parser extension forbidden response has a 5xx status code +func (o *CreateParserExtensionForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this create parser extension forbidden response a status code equal to that given +func (o *CreateParserExtensionForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the create parser extension forbidden response +func (o *CreateParserExtensionForbidden) Code() int { + return 403 +} + +func (o *CreateParserExtensionForbidden) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionForbidden %+v", 403, o.Payload) +} + +func (o *CreateParserExtensionForbidden) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionForbidden %+v", 403, o.Payload) +} + +func (o *CreateParserExtensionForbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CreateParserExtensionForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateParserExtensionNotFound creates a CreateParserExtensionNotFound with default headers values +func NewCreateParserExtensionNotFound() *CreateParserExtensionNotFound { + return &CreateParserExtensionNotFound{} +} + +/* +CreateParserExtensionNotFound describes a response with status code 404, with default header values. + +Content resource does not exist +*/ +type CreateParserExtensionNotFound struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this create parser extension not found response has a 2xx status code +func (o *CreateParserExtensionNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create parser extension not found response has a 3xx status code +func (o *CreateParserExtensionNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create parser extension not found response has a 4xx status code +func (o *CreateParserExtensionNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this create parser extension not found response has a 5xx status code +func (o *CreateParserExtensionNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this create parser extension not found response a status code equal to that given +func (o *CreateParserExtensionNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the create parser extension not found response +func (o *CreateParserExtensionNotFound) Code() int { + return 404 +} + +func (o *CreateParserExtensionNotFound) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionNotFound %+v", 404, o.Payload) +} + +func (o *CreateParserExtensionNotFound) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionNotFound %+v", 404, o.Payload) +} + +func (o *CreateParserExtensionNotFound) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CreateParserExtensionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateParserExtensionTooManyRequests creates a CreateParserExtensionTooManyRequests with default headers values +func NewCreateParserExtensionTooManyRequests() *CreateParserExtensionTooManyRequests { + return &CreateParserExtensionTooManyRequests{} +} + +/* +CreateParserExtensionTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CreateParserExtensionTooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this create parser extension too many requests response has a 2xx status code +func (o *CreateParserExtensionTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create parser extension too many requests response has a 3xx status code +func (o *CreateParserExtensionTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create parser extension too many requests response has a 4xx status code +func (o *CreateParserExtensionTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this create parser extension too many requests response has a 5xx status code +func (o *CreateParserExtensionTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this create parser extension too many requests response a status code equal to that given +func (o *CreateParserExtensionTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the create parser extension too many requests response +func (o *CreateParserExtensionTooManyRequests) Code() int { + return 429 +} + +func (o *CreateParserExtensionTooManyRequests) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionTooManyRequests %+v", 429, o.Payload) +} + +func (o *CreateParserExtensionTooManyRequests) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionTooManyRequests %+v", 429, o.Payload) +} + +func (o *CreateParserExtensionTooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CreateParserExtensionTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateParserExtensionInternalServerError creates a CreateParserExtensionInternalServerError with default headers values +func NewCreateParserExtensionInternalServerError() *CreateParserExtensionInternalServerError { + return &CreateParserExtensionInternalServerError{} +} + +/* +CreateParserExtensionInternalServerError describes a response with status code 500, with default header values. + +Unexpected error occurred +*/ +type CreateParserExtensionInternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this create parser extension internal server error response has a 2xx status code +func (o *CreateParserExtensionInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create parser extension internal server error response has a 3xx status code +func (o *CreateParserExtensionInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create parser extension internal server error response has a 4xx status code +func (o *CreateParserExtensionInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this create parser extension internal server error response has a 5xx status code +func (o *CreateParserExtensionInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this create parser extension internal server error response a status code equal to that given +func (o *CreateParserExtensionInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the create parser extension internal server error response +func (o *CreateParserExtensionInternalServerError) Code() int { + return 500 +} + +func (o *CreateParserExtensionInternalServerError) Error() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionInternalServerError %+v", 500, o.Payload) +} + +func (o *CreateParserExtensionInternalServerError) String() string { + return fmt.Sprintf("[POST /ngsiem-content/entities/parsers-extensions/v1][%d] createParserExtensionInternalServerError %+v", 500, o.Payload) +} + +func (o *CreateParserExtensionInternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *CreateParserExtensionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/ngsiem/delete_dashboard_parameters.go b/falcon/client/ngsiem/delete_dashboard_parameters.go index a801da013..13188b53b 100644 --- a/falcon/client/ngsiem/delete_dashboard_parameters.go +++ b/falcon/client/ngsiem/delete_dashboard_parameters.go @@ -14,6 +14,7 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewDeleteDashboardParams creates a new DeleteDashboardParams object, @@ -63,9 +64,9 @@ type DeleteDashboardParams struct { /* Ids. - dashboard ID value + dashboard ID value(s). Supports single or multiple IDs for bulk delete. */ - Ids *string + Ids []string /* SearchDomain. @@ -127,13 +128,13 @@ func (o *DeleteDashboardParams) SetHTTPClient(client *http.Client) { } // WithIds adds the ids to the delete dashboard params -func (o *DeleteDashboardParams) WithIds(ids *string) *DeleteDashboardParams { +func (o *DeleteDashboardParams) WithIds(ids []string) *DeleteDashboardParams { o.SetIds(ids) return o } // SetIds adds the ids to the delete dashboard params -func (o *DeleteDashboardParams) SetIds(ids *string) { +func (o *DeleteDashboardParams) SetIds(ids []string) { o.Ids = ids } @@ -158,18 +159,12 @@ func (o *DeleteDashboardParams) WriteToRequest(r runtime.ClientRequest, reg strf if o.Ids != nil { - // query param ids - var qrIds string + // binding items for ids + joinedIds := o.bindParamIds(reg) - if o.Ids != nil { - qrIds = *o.Ids - } - qIds := qrIds - if qIds != "" { - - if err := r.SetQueryParam("ids", qIds); err != nil { - return err - } + // query array param ids + if err := r.SetQueryParam("ids", joinedIds...); err != nil { + return err } } @@ -195,3 +190,20 @@ func (o *DeleteDashboardParams) WriteToRequest(r runtime.ClientRequest, reg strf } return nil } + +// bindParamDeleteDashboard binds the parameter ids +func (o *DeleteDashboardParams) bindParamIds(formats strfmt.Registry) []string { + idsIR := o.Ids + + var idsIC []string + for _, idsIIR := range idsIR { // explode []string + + idsIIV := idsIIR // string as string + idsIC = append(idsIC, idsIIV) + } + + // items.CollectionFormat: "csv" + idsIS := swag.JoinByFormat(idsIC, "csv") + + return idsIS +} diff --git a/falcon/client/ngsiem/delete_lookup_file_parameters.go b/falcon/client/ngsiem/delete_lookup_file_parameters.go index 9019d44d1..2ad6e8318 100644 --- a/falcon/client/ngsiem/delete_lookup_file_parameters.go +++ b/falcon/client/ngsiem/delete_lookup_file_parameters.go @@ -14,6 +14,7 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewDeleteLookupFileParams creates a new DeleteLookupFileParams object, @@ -63,9 +64,9 @@ type DeleteLookupFileParams struct { /* Filename. - lookup file filename + lookup file filename(s). Supports single or multiple filenames for bulk delete. */ - Filename *string + Filename []string /* SearchDomain. @@ -127,13 +128,13 @@ func (o *DeleteLookupFileParams) SetHTTPClient(client *http.Client) { } // WithFilename adds the filename to the delete lookup file params -func (o *DeleteLookupFileParams) WithFilename(filename *string) *DeleteLookupFileParams { +func (o *DeleteLookupFileParams) WithFilename(filename []string) *DeleteLookupFileParams { o.SetFilename(filename) return o } // SetFilename adds the filename to the delete lookup file params -func (o *DeleteLookupFileParams) SetFilename(filename *string) { +func (o *DeleteLookupFileParams) SetFilename(filename []string) { o.Filename = filename } @@ -158,18 +159,12 @@ func (o *DeleteLookupFileParams) WriteToRequest(r runtime.ClientRequest, reg str if o.Filename != nil { - // query param filename - var qrFilename string + // binding items for filename + joinedFilename := o.bindParamFilename(reg) - if o.Filename != nil { - qrFilename = *o.Filename - } - qFilename := qrFilename - if qFilename != "" { - - if err := r.SetQueryParam("filename", qFilename); err != nil { - return err - } + // query array param filename + if err := r.SetQueryParam("filename", joinedFilename...); err != nil { + return err } } @@ -195,3 +190,20 @@ func (o *DeleteLookupFileParams) WriteToRequest(r runtime.ClientRequest, reg str } return nil } + +// bindParamDeleteLookupFile binds the parameter filename +func (o *DeleteLookupFileParams) bindParamFilename(formats strfmt.Registry) []string { + filenameIR := o.Filename + + var filenameIC []string + for _, filenameIIR := range filenameIR { // explode []string + + filenameIIV := filenameIIR // string as string + filenameIC = append(filenameIC, filenameIIV) + } + + // items.CollectionFormat: "csv" + filenameIS := swag.JoinByFormat(filenameIC, "csv") + + return filenameIS +} diff --git a/falcon/client/ngsiem/delete_saved_query_parameters.go b/falcon/client/ngsiem/delete_saved_query_parameters.go index 4385a8766..245147d1b 100644 --- a/falcon/client/ngsiem/delete_saved_query_parameters.go +++ b/falcon/client/ngsiem/delete_saved_query_parameters.go @@ -14,6 +14,7 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewDeleteSavedQueryParams creates a new DeleteSavedQueryParams object, @@ -63,9 +64,9 @@ type DeleteSavedQueryParams struct { /* Ids. - saved query ID value + saved query ID value(s). Supports single or multiple IDs for bulk delete. */ - Ids *string + Ids []string /* SearchDomain. @@ -127,13 +128,13 @@ func (o *DeleteSavedQueryParams) SetHTTPClient(client *http.Client) { } // WithIds adds the ids to the delete saved query params -func (o *DeleteSavedQueryParams) WithIds(ids *string) *DeleteSavedQueryParams { +func (o *DeleteSavedQueryParams) WithIds(ids []string) *DeleteSavedQueryParams { o.SetIds(ids) return o } // SetIds adds the ids to the delete saved query params -func (o *DeleteSavedQueryParams) SetIds(ids *string) { +func (o *DeleteSavedQueryParams) SetIds(ids []string) { o.Ids = ids } @@ -158,18 +159,12 @@ func (o *DeleteSavedQueryParams) WriteToRequest(r runtime.ClientRequest, reg str if o.Ids != nil { - // query param ids - var qrIds string + // binding items for ids + joinedIds := o.bindParamIds(reg) - if o.Ids != nil { - qrIds = *o.Ids - } - qIds := qrIds - if qIds != "" { - - if err := r.SetQueryParam("ids", qIds); err != nil { - return err - } + // query array param ids + if err := r.SetQueryParam("ids", joinedIds...); err != nil { + return err } } @@ -195,3 +190,20 @@ func (o *DeleteSavedQueryParams) WriteToRequest(r runtime.ClientRequest, reg str } return nil } + +// bindParamDeleteSavedQuery binds the parameter ids +func (o *DeleteSavedQueryParams) bindParamIds(formats strfmt.Registry) []string { + idsIR := o.Ids + + var idsIC []string + for _, idsIIR := range idsIR { // explode []string + + idsIIV := idsIIR // string as string + idsIC = append(idsIC, idsIIV) + } + + // items.CollectionFormat: "csv" + idsIS := swag.JoinByFormat(idsIC, "csv") + + return idsIS +} diff --git a/falcon/client/ngsiem/get_dashboard_template_parameters.go b/falcon/client/ngsiem/get_dashboard_template_parameters.go index 24f712b75..563ae9932 100644 --- a/falcon/client/ngsiem/get_dashboard_template_parameters.go +++ b/falcon/client/ngsiem/get_dashboard_template_parameters.go @@ -14,6 +14,7 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewGetDashboardTemplateParams creates a new GetDashboardTemplateParams object, @@ -63,9 +64,9 @@ type GetDashboardTemplateParams struct { /* Ids. - dashboard ID value + dashboard ID value(s) */ - Ids *string + Ids []string /* SearchDomain. @@ -127,13 +128,13 @@ func (o *GetDashboardTemplateParams) SetHTTPClient(client *http.Client) { } // WithIds adds the ids to the get dashboard template params -func (o *GetDashboardTemplateParams) WithIds(ids *string) *GetDashboardTemplateParams { +func (o *GetDashboardTemplateParams) WithIds(ids []string) *GetDashboardTemplateParams { o.SetIds(ids) return o } // SetIds adds the ids to the get dashboard template params -func (o *GetDashboardTemplateParams) SetIds(ids *string) { +func (o *GetDashboardTemplateParams) SetIds(ids []string) { o.Ids = ids } @@ -158,18 +159,12 @@ func (o *GetDashboardTemplateParams) WriteToRequest(r runtime.ClientRequest, reg if o.Ids != nil { - // query param ids - var qrIds string + // binding items for ids + joinedIds := o.bindParamIds(reg) - if o.Ids != nil { - qrIds = *o.Ids - } - qIds := qrIds - if qIds != "" { - - if err := r.SetQueryParam("ids", qIds); err != nil { - return err - } + // query array param ids + if err := r.SetQueryParam("ids", joinedIds...); err != nil { + return err } } @@ -195,3 +190,20 @@ func (o *GetDashboardTemplateParams) WriteToRequest(r runtime.ClientRequest, reg } return nil } + +// bindParamGetDashboardTemplate binds the parameter ids +func (o *GetDashboardTemplateParams) bindParamIds(formats strfmt.Registry) []string { + idsIR := o.Ids + + var idsIC []string + for _, idsIIR := range idsIR { // explode []string + + idsIIV := idsIIR // string as string + idsIC = append(idsIC, idsIIV) + } + + // items.CollectionFormat: "csv" + idsIS := swag.JoinByFormat(idsIC, "csv") + + return idsIS +} diff --git a/falcon/client/ngsiem/get_saved_query_template_parameters.go b/falcon/client/ngsiem/get_saved_query_template_parameters.go index 0d99ebcd4..dadf912f3 100644 --- a/falcon/client/ngsiem/get_saved_query_template_parameters.go +++ b/falcon/client/ngsiem/get_saved_query_template_parameters.go @@ -14,6 +14,7 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewGetSavedQueryTemplateParams creates a new GetSavedQueryTemplateParams object, @@ -63,9 +64,9 @@ type GetSavedQueryTemplateParams struct { /* Ids. - saved query ID value + saved query ID value(s) */ - Ids *string + Ids []string /* SearchDomain. @@ -127,13 +128,13 @@ func (o *GetSavedQueryTemplateParams) SetHTTPClient(client *http.Client) { } // WithIds adds the ids to the get saved query template params -func (o *GetSavedQueryTemplateParams) WithIds(ids *string) *GetSavedQueryTemplateParams { +func (o *GetSavedQueryTemplateParams) WithIds(ids []string) *GetSavedQueryTemplateParams { o.SetIds(ids) return o } // SetIds adds the ids to the get saved query template params -func (o *GetSavedQueryTemplateParams) SetIds(ids *string) { +func (o *GetSavedQueryTemplateParams) SetIds(ids []string) { o.Ids = ids } @@ -158,18 +159,12 @@ func (o *GetSavedQueryTemplateParams) WriteToRequest(r runtime.ClientRequest, re if o.Ids != nil { - // query param ids - var qrIds string + // binding items for ids + joinedIds := o.bindParamIds(reg) - if o.Ids != nil { - qrIds = *o.Ids - } - qIds := qrIds - if qIds != "" { - - if err := r.SetQueryParam("ids", qIds); err != nil { - return err - } + // query array param ids + if err := r.SetQueryParam("ids", joinedIds...); err != nil { + return err } } @@ -195,3 +190,20 @@ func (o *GetSavedQueryTemplateParams) WriteToRequest(r runtime.ClientRequest, re } return nil } + +// bindParamGetSavedQueryTemplate binds the parameter ids +func (o *GetSavedQueryTemplateParams) bindParamIds(formats strfmt.Registry) []string { + idsIR := o.Ids + + var idsIC []string + for _, idsIIR := range idsIR { // explode []string + + idsIIV := idsIIR // string as string + idsIC = append(idsIC, idsIIV) + } + + // items.CollectionFormat: "csv" + idsIS := swag.JoinByFormat(idsIC, "csv") + + return idsIS +} diff --git a/falcon/client/ngsiem/ngsiem_client.go b/falcon/client/ngsiem/ngsiem_client.go index 3db72df50..1b2bdf109 100644 --- a/falcon/client/ngsiem/ngsiem_client.go +++ b/falcon/client/ngsiem/ngsiem_client.go @@ -30,8 +30,22 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { + BulkCreateDashboardsFromTemplate(params *BulkCreateDashboardsFromTemplateParams, opts ...ClientOption) (*BulkCreateDashboardsFromTemplateOK, error) + + BulkCreateLookupFiles(params *BulkCreateLookupFilesParams, opts ...ClientOption) (*BulkCreateLookupFilesOK, error) + + BulkCreateSavedQueriesFromTemplate(params *BulkCreateSavedQueriesFromTemplateParams, opts ...ClientOption) (*BulkCreateSavedQueriesFromTemplateOK, error) + + BulkGetLookupFiles(params *BulkGetLookupFilesParams, opts ...ClientOption) (*BulkGetLookupFilesOK, error) + BulkInstallParsers(params *BulkInstallParsersParams, opts ...ClientOption) (*BulkInstallParsersOK, error) + BulkUpdateDashboardsFromTemplate(params *BulkUpdateDashboardsFromTemplateParams, opts ...ClientOption) (*BulkUpdateDashboardsFromTemplateOK, error) + + BulkUpdateLookupFiles(params *BulkUpdateLookupFilesParams, opts ...ClientOption) (*BulkUpdateLookupFilesOK, error) + + BulkUpdateSavedQueriesFromTemplate(params *BulkUpdateSavedQueriesFromTemplateParams, opts ...ClientOption) (*BulkUpdateSavedQueriesFromTemplateOK, error) + CloneParser(params *CloneParserParams, opts ...ClientOption) (*CloneParserOK, error) CreateDashboardFromTemplate(params *CreateDashboardFromTemplateParams, opts ...ClientOption) (*CreateDashboardFromTemplateOK, error) @@ -40,6 +54,8 @@ type ClientService interface { CreateParser(params *CreateParserParams, opts ...ClientOption) (*CreateParserOK, error) + CreateParserExtension(params *CreateParserExtensionParams, opts ...ClientOption) (*CreateParserExtensionOK, error) + CreateParserFromTemplate(params *CreateParserFromTemplateParams, opts ...ClientOption) (*CreateParserFromTemplateOK, error) CreateSavedQuery(params *CreateSavedQueryParams, opts ...ClientOption) (*CreateSavedQueryOK, error) @@ -133,6 +149,158 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } +/* +BulkCreateDashboardsFromTemplate creates multiple dashboards from y a m l templates processes all items and returns per item success failure results failed items are included in the errors array with appropriate HTTP status codes +*/ +func (a *Client) BulkCreateDashboardsFromTemplate(params *BulkCreateDashboardsFromTemplateParams, opts ...ClientOption) (*BulkCreateDashboardsFromTemplateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBulkCreateDashboardsFromTemplateParams() + } + op := &runtime.ClientOperation{ + ID: "BulkCreateDashboardsFromTemplate", + Method: "POST", + PathPattern: "/ngsiem-content/entities/bulk-dashboards-template/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &BulkCreateDashboardsFromTemplateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BulkCreateDashboardsFromTemplateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for BulkCreateDashboardsFromTemplate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +BulkCreateLookupFiles creates multiple lookup files processes all items and returns per item success failure results failed items are included in the errors array with appropriate HTTP status codes +*/ +func (a *Client) BulkCreateLookupFiles(params *BulkCreateLookupFilesParams, opts ...ClientOption) (*BulkCreateLookupFilesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBulkCreateLookupFilesParams() + } + op := &runtime.ClientOperation{ + ID: "BulkCreateLookupFiles", + Method: "POST", + PathPattern: "/ngsiem-content/entities/bulk-lookupfiles/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &BulkCreateLookupFilesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BulkCreateLookupFilesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for BulkCreateLookupFiles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +BulkCreateSavedQueriesFromTemplate creates multiple saved queries from log scale y a m l templates processes all items and returns per item success failure results failed items are included in the errors array with appropriate HTTP status codes +*/ +func (a *Client) BulkCreateSavedQueriesFromTemplate(params *BulkCreateSavedQueriesFromTemplateParams, opts ...ClientOption) (*BulkCreateSavedQueriesFromTemplateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBulkCreateSavedQueriesFromTemplateParams() + } + op := &runtime.ClientOperation{ + ID: "BulkCreateSavedQueriesFromTemplate", + Method: "POST", + PathPattern: "/ngsiem-content/entities/bulk-savedqueries-template/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &BulkCreateSavedQueriesFromTemplateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BulkCreateSavedQueriesFromTemplateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for BulkCreateSavedQueriesFromTemplate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +BulkGetLookupFiles retrieves multiple lookup files by filenames in n g s i e m +*/ +func (a *Client) BulkGetLookupFiles(params *BulkGetLookupFilesParams, opts ...ClientOption) (*BulkGetLookupFilesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBulkGetLookupFilesParams() + } + op := &runtime.ClientOperation{ + ID: "BulkGetLookupFiles", + Method: "GET", + PathPattern: "/ngsiem-content/entities/bulk-lookupfiles/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &BulkGetLookupFilesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BulkGetLookupFilesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for BulkGetLookupFiles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* BulkInstallParsers installs multiple crowd strike managed out of the box o o t b parsers into the customer s repository in a single operation this endpoint provisions multiple pre built parsers with their specific versions for the requesting customer ID c ID the parsers are installed as is and cannot be modified by the customer requires an array of parsers with parser id and version in the request body maximum 100 parsers per request */ @@ -171,6 +339,120 @@ func (a *Client) BulkInstallParsers(params *BulkInstallParsersParams, opts ...Cl panic(msg) } +/* +BulkUpdateDashboardsFromTemplate updates multiple dashboards from y a m l templates processes all items and returns per item success failure results failed items are included in the errors array with appropriate HTTP status codes +*/ +func (a *Client) BulkUpdateDashboardsFromTemplate(params *BulkUpdateDashboardsFromTemplateParams, opts ...ClientOption) (*BulkUpdateDashboardsFromTemplateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBulkUpdateDashboardsFromTemplateParams() + } + op := &runtime.ClientOperation{ + ID: "BulkUpdateDashboardsFromTemplate", + Method: "PATCH", + PathPattern: "/ngsiem-content/entities/bulk-dashboards-template/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &BulkUpdateDashboardsFromTemplateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BulkUpdateDashboardsFromTemplateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for BulkUpdateDashboardsFromTemplate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +BulkUpdateLookupFiles updates multiple lookup files processes all items and returns per item success failure results failed items are included in the errors array with appropriate HTTP status codes +*/ +func (a *Client) BulkUpdateLookupFiles(params *BulkUpdateLookupFilesParams, opts ...ClientOption) (*BulkUpdateLookupFilesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBulkUpdateLookupFilesParams() + } + op := &runtime.ClientOperation{ + ID: "BulkUpdateLookupFiles", + Method: "PATCH", + PathPattern: "/ngsiem-content/entities/bulk-lookupfiles/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &BulkUpdateLookupFilesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BulkUpdateLookupFilesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for BulkUpdateLookupFiles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +BulkUpdateSavedQueriesFromTemplate updates multiple saved queries from log scale y a m l templates processes all items and returns per item success failure results failed items are included in the errors array with appropriate HTTP status codes +*/ +func (a *Client) BulkUpdateSavedQueriesFromTemplate(params *BulkUpdateSavedQueriesFromTemplateParams, opts ...ClientOption) (*BulkUpdateSavedQueriesFromTemplateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBulkUpdateSavedQueriesFromTemplateParams() + } + op := &runtime.ClientOperation{ + ID: "BulkUpdateSavedQueriesFromTemplate", + Method: "PATCH", + PathPattern: "/ngsiem-content/entities/bulk-savedqueries-template/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &BulkUpdateSavedQueriesFromTemplateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BulkUpdateSavedQueriesFromTemplateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for BulkUpdateSavedQueriesFromTemplate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* CloneParser clones an existing parser with a new name */ @@ -323,6 +605,44 @@ func (a *Client) CreateParser(params *CreateParserParams, opts ...ClientOption) panic(msg) } +/* +CreateParserExtension creates a parser extension in n g s i e m for the provided base parser +*/ +func (a *Client) CreateParserExtension(params *CreateParserExtensionParams, opts ...ClientOption) (*CreateParserExtensionOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCreateParserExtensionParams() + } + op := &runtime.ClientOperation{ + ID: "CreateParserExtension", + Method: "POST", + PathPattern: "/ngsiem-content/entities/parsers-extensions/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CreateParserExtensionReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CreateParserExtensionOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for CreateParserExtension: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* CreateParserFromTemplate creates parser from log scale y a m l template in n g s i e m */ @@ -1086,7 +1406,7 @@ func (a *Client) ExternalUpdateDataConnectionStatus(params *ExternalUpdateDataCo } /* -GetDashboardTemplate retrieves dashboard in n g s i e m as log scale y a m l template +GetDashboardTemplate retrieves dashboard s in n g s i e m as log scale y a m l template supports single or multiple i ds */ func (a *Client) GetDashboardTemplate(params *GetDashboardTemplateParams, opts ...ClientOption) (*GetDashboardTemplateOK, error) { // TODO: Validate the params before sending @@ -1352,7 +1672,7 @@ func (a *Client) GetParserTemplate(params *GetParserTemplateParams, opts ...Clie } /* -GetSavedQueryTemplate retrieves saved query in n g s i e m as log scale y a m l template +GetSavedQueryTemplate retrieves saved quer ies in n g s i e m as log scale y a m l template supports single or multiple i ds */ func (a *Client) GetSavedQueryTemplate(params *GetSavedQueryTemplateParams, opts ...ClientOption) (*GetSavedQueryTemplateOK, error) { // TODO: Validate the params before sending @@ -1466,7 +1786,7 @@ func (a *Client) InstallParser(params *InstallParserParams, opts ...ClientOption } /* -ListDashboards lists dashboards in n g s i e m +ListDashboards lists dashboards in n g s i e m with pagination and filtering returns dashboard ID and name supports pagination default limit 50 and optional name filtering */ func (a *Client) ListDashboards(params *ListDashboardsParams, opts ...ClientOption) (*ListDashboardsOK, error) { // TODO: Validate the params before sending @@ -1504,7 +1824,7 @@ func (a *Client) ListDashboards(params *ListDashboardsParams, opts ...ClientOpti } /* -ListLookupFiles lists lookup files in n g s i e m +ListLookupFiles lists lookup files in n g s i e m with pagination and filtering supports bulk listing with pagination default limit 50 and optional name filtering */ func (a *Client) ListLookupFiles(params *ListLookupFilesParams, opts ...ClientOption) (*ListLookupFilesOK, error) { // TODO: Validate the params before sending @@ -1580,7 +1900,7 @@ func (a *Client) ListParsers(params *ListParsersParams, opts ...ClientOption) (* } /* -ListSavedQueries gets saved queries in n g s i e m +ListSavedQueries lists saved queries in n g s i e m with pagination and filtering supports bulk listing with pagination default limit 50 and optional name filtering */ func (a *Client) ListSavedQueries(params *ListSavedQueriesParams, opts ...ClientOption) (*ListSavedQueriesOK, error) { // TODO: Validate the params before sending diff --git a/falcon/client/ngsiem/test_parser_from_template_parameters.go b/falcon/client/ngsiem/test_parser_from_template_parameters.go index d80079fd0..cd30608c3 100644 --- a/falcon/client/ngsiem/test_parser_from_template_parameters.go +++ b/falcon/client/ngsiem/test_parser_from_template_parameters.go @@ -14,6 +14,7 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewTestParserFromTemplateParams creates a new TestParserFromTemplateParams object, @@ -61,6 +62,14 @@ TestParserFromTemplateParams contains all the parameters to send to the API endp */ type TestParserFromTemplateParams struct { + /* SchemaValidationEnabled. + + When true, schema validation is enforced (CPS) and validates against Crowdstrike Parsing Standard + + + */ + SchemaValidationEnabled bool + /* YamlTemplate. LogScale Parser YAML template content, see schema at https://schemas.humio.com/ @@ -120,6 +129,17 @@ func (o *TestParserFromTemplateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithSchemaValidationEnabled adds the schemaValidationEnabled to the test parser from template params +func (o *TestParserFromTemplateParams) WithSchemaValidationEnabled(schemaValidationEnabled bool) *TestParserFromTemplateParams { + o.SetSchemaValidationEnabled(schemaValidationEnabled) + return o +} + +// SetSchemaValidationEnabled adds the schemaValidationEnabled to the test parser from template params +func (o *TestParserFromTemplateParams) SetSchemaValidationEnabled(schemaValidationEnabled bool) { + o.SchemaValidationEnabled = schemaValidationEnabled +} + // WithYamlTemplate adds the yamlTemplate to the test parser from template params func (o *TestParserFromTemplateParams) WithYamlTemplate(yamlTemplate runtime.NamedReadCloser) *TestParserFromTemplateParams { o.SetYamlTemplate(yamlTemplate) @@ -139,6 +159,13 @@ func (o *TestParserFromTemplateParams) WriteToRequest(r runtime.ClientRequest, r } var res []error + // form param schema_validation_enabled + frSchemaValidationEnabled := o.SchemaValidationEnabled + fSchemaValidationEnabled := swag.FormatBool(frSchemaValidationEnabled) + if err := r.SetFormParam("schema_validation_enabled", fSchemaValidationEnabled); err != nil { + return err + } + if o.YamlTemplate != nil { if o.YamlTemplate != nil { diff --git a/falcon/client/ods/query_scheduled_scans_parameters.go b/falcon/client/ods/query_scheduled_scans_parameters.go index a59d182f7..fd0da2829 100644 --- a/falcon/client/ods/query_scheduled_scans_parameters.go +++ b/falcon/client/ods/query_scheduled_scans_parameters.go @@ -64,7 +64,7 @@ type QueryScheduledScansParams struct { /* Filter. - A FQL compatible query string. Terms: [id description.keyword description initiated_from status schedule.start_timestamp schedule.Interval created_on created_by last_updated deleted] + A FQL compatible query string. Terms: [id description.keyword description initiated_from status schedule.start_timestamp schedule.Interval created_on created_by last_updated deleted targeted_platforms channel_file_status] */ Filter string diff --git a/falcon/client/operations/empty_parameters.go b/falcon/client/operations/empty_parameters.go deleted file mode 100644 index e6f122eda..000000000 --- a/falcon/client/operations/empty_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewEmptyParams creates a new EmptyParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewEmptyParams() *EmptyParams { - return &EmptyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewEmptyParamsWithTimeout creates a new EmptyParams object -// with the ability to set a timeout on a request. -func NewEmptyParamsWithTimeout(timeout time.Duration) *EmptyParams { - return &EmptyParams{ - timeout: timeout, - } -} - -// NewEmptyParamsWithContext creates a new EmptyParams object -// with the ability to set a context for a request. -func NewEmptyParamsWithContext(ctx context.Context) *EmptyParams { - return &EmptyParams{ - Context: ctx, - } -} - -// NewEmptyParamsWithHTTPClient creates a new EmptyParams object -// with the ability to set a custom HTTPClient for a request. -func NewEmptyParamsWithHTTPClient(client *http.Client) *EmptyParams { - return &EmptyParams{ - HTTPClient: client, - } -} - -/* -EmptyParams contains all the parameters to send to the API endpoint - - for the operation. - - Typically these are written to a http.Request. -*/ -type EmptyParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *EmptyParams) WithDefaults() *EmptyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *EmptyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the params -func (o *EmptyParams) WithTimeout(timeout time.Duration) *EmptyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the params -func (o *EmptyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the params -func (o *EmptyParams) WithContext(ctx context.Context) *EmptyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the params -func (o *EmptyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the params -func (o *EmptyParams) WithHTTPClient(client *http.Client) *EmptyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the params -func (o *EmptyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *EmptyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/falcon/client/operations/empty_responses.go b/falcon/client/operations/empty_responses.go deleted file mode 100644 index c58de8bf7..000000000 --- a/falcon/client/operations/empty_responses.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/crowdstrike/gofalcon/falcon/models" -) - -// EmptyReader is a Reader for the Empty structure. -type EmptyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *EmptyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("[GET /falcon-complete-dashboards/queries/detects/v1]", response, response.Code()) - } -} - -// NewOK creates a OK with default headers values -func NewOK() *OK { - return &OK{} -} - -/* -OK describes a response with status code 200, with default header values. - -OK o k -*/ -type OK struct { - Payload *models.MsaQueryResponse -} - -// IsSuccess returns true when this o k response has a 2xx status code -func (o *OK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this o k response has a 3xx status code -func (o *OK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this o k response has a 4xx status code -func (o *OK) IsClientError() bool { - return false -} - -// IsServerError returns true when this o k response has a 5xx status code -func (o *OK) IsServerError() bool { - return false -} - -// IsCode returns true when this o k response a status code equal to that given -func (o *OK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the o k response -func (o *OK) Code() int { - return 200 -} - -func (o *OK) Error() string { - return fmt.Sprintf("[GET /falcon-complete-dashboards/queries/detects/v1][%d] oK %+v", 200, o.Payload) -} - -func (o *OK) String() string { - return fmt.Sprintf("[GET /falcon-complete-dashboards/queries/detects/v1][%d] oK %+v", 200, o.Payload) -} - -func (o *OK) GetPayload() *models.MsaQueryResponse { - return o.Payload -} - -func (o *OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MsaQueryResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/falcon/client/operations/operations_client.go b/falcon/client/operations/operations_client.go index e45ce74cc..9a0cf1273 100644 --- a/falcon/client/operations/operations_client.go +++ b/falcon/client/operations/operations_client.go @@ -30,8 +30,6 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - Empty(params *EmptyParams, opts ...ClientOption) (*OK, error) - DeleteCollectionsV1(params *DeleteCollectionsV1Params, opts ...ClientOption) (*DeleteCollectionsV1OK, error) DeleteConfigsV1(params *DeleteConfigsV1Params, opts ...ClientOption) (*DeleteConfigsV1OK, error) @@ -82,8 +80,6 @@ type ClientService interface { CombinedQueryInstalledPatches(params *CombinedQueryInstalledPatchesParams, opts ...ClientOption) (*CombinedQueryInstalledPatchesOK, error) - PostGraphqlQueryMixin0(params *PostGraphqlQueryMixin0Params, opts ...ClientOption) (*PostGraphqlQueryMixin0OK, error) - V1HostConfigsPost(params *V1HostConfigsPostParams, opts ...ClientOption) (*V1HostConfigsPostOK, *V1HostConfigsPostAccepted, error) V1StatusGet(params *V1StatusGetParams, opts ...ClientOption) (*V1StatusGetOK, error) @@ -91,44 +87,6 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } -/* -Empty API -*/ -func (a *Client) Empty(params *EmptyParams, opts ...ClientOption) (*OK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewEmptyParams() - } - op := &runtime.ClientOperation{ - ID: "", - Method: "GET", - PathPattern: "/falcon-complete-dashboards/queries/detects/v1", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &EmptyReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*OK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for : API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeleteCollectionsV1 cancels collections */ @@ -1079,44 +1037,6 @@ func (a *Client) CombinedQueryInstalledPatches(params *CombinedQueryInstalledPat panic(msg) } -/* -PostGraphqlQueryMixin0 - request graphql query -*/ -func (a *Client) PostGraphqlQueryMixin0(params *PostGraphqlQueryMixin0Params, opts ...ClientOption) (*PostGraphqlQueryMixin0OK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPostGraphqlQueryMixin0Params() - } - op := &runtime.ClientOperation{ - ID: "post-graphql-queryMixin0", - Method: "POST", - PathPattern: "/cloud-data-protection/entities/schedules/graphql/v2", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &PostGraphqlQueryMixin0Reader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PostGraphqlQueryMixin0OK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for post-graphql-queryMixin0: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* V1HostConfigsPost configures all hosts in the provided host group to be ready to accept an execute API call */ diff --git a/falcon/client/operations/post_graphql_query_mixin0_parameters.go b/falcon/client/operations/post_graphql_query_mixin0_parameters.go deleted file mode 100644 index 84f2ea36a..000000000 --- a/falcon/client/operations/post_graphql_query_mixin0_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewPostGraphqlQueryMixin0Params creates a new PostGraphqlQueryMixin0Params object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPostGraphqlQueryMixin0Params() *PostGraphqlQueryMixin0Params { - return &PostGraphqlQueryMixin0Params{ - timeout: cr.DefaultTimeout, - } -} - -// NewPostGraphqlQueryMixin0ParamsWithTimeout creates a new PostGraphqlQueryMixin0Params object -// with the ability to set a timeout on a request. -func NewPostGraphqlQueryMixin0ParamsWithTimeout(timeout time.Duration) *PostGraphqlQueryMixin0Params { - return &PostGraphqlQueryMixin0Params{ - timeout: timeout, - } -} - -// NewPostGraphqlQueryMixin0ParamsWithContext creates a new PostGraphqlQueryMixin0Params object -// with the ability to set a context for a request. -func NewPostGraphqlQueryMixin0ParamsWithContext(ctx context.Context) *PostGraphqlQueryMixin0Params { - return &PostGraphqlQueryMixin0Params{ - Context: ctx, - } -} - -// NewPostGraphqlQueryMixin0ParamsWithHTTPClient creates a new PostGraphqlQueryMixin0Params object -// with the ability to set a custom HTTPClient for a request. -func NewPostGraphqlQueryMixin0ParamsWithHTTPClient(client *http.Client) *PostGraphqlQueryMixin0Params { - return &PostGraphqlQueryMixin0Params{ - HTTPClient: client, - } -} - -/* -PostGraphqlQueryMixin0Params contains all the parameters to send to the API endpoint - - for the post graphql query mixin0 operation. - - Typically these are written to a http.Request. -*/ -type PostGraphqlQueryMixin0Params struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the post graphql query mixin0 params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PostGraphqlQueryMixin0Params) WithDefaults() *PostGraphqlQueryMixin0Params { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the post graphql query mixin0 params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PostGraphqlQueryMixin0Params) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the post graphql query mixin0 params -func (o *PostGraphqlQueryMixin0Params) WithTimeout(timeout time.Duration) *PostGraphqlQueryMixin0Params { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the post graphql query mixin0 params -func (o *PostGraphqlQueryMixin0Params) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the post graphql query mixin0 params -func (o *PostGraphqlQueryMixin0Params) WithContext(ctx context.Context) *PostGraphqlQueryMixin0Params { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the post graphql query mixin0 params -func (o *PostGraphqlQueryMixin0Params) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the post graphql query mixin0 params -func (o *PostGraphqlQueryMixin0Params) WithHTTPClient(client *http.Client) *PostGraphqlQueryMixin0Params { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the post graphql query mixin0 params -func (o *PostGraphqlQueryMixin0Params) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *PostGraphqlQueryMixin0Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/falcon/client/operations/post_graphql_query_mixin0_responses.go b/falcon/client/operations/post_graphql_query_mixin0_responses.go deleted file mode 100644 index 5525ecf8e..000000000 --- a/falcon/client/operations/post_graphql_query_mixin0_responses.go +++ /dev/null @@ -1,390 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "github.com/crowdstrike/gofalcon/falcon/models" -) - -// PostGraphqlQueryMixin0Reader is a Reader for the PostGraphqlQueryMixin0 structure. -type PostGraphqlQueryMixin0Reader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PostGraphqlQueryMixin0Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPostGraphqlQueryMixin0OK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 429: - result := NewPostGraphqlQueryMixin0TooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPostGraphqlQueryMixin0InternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[POST /cloud-data-protection/entities/schedules/graphql/v2] post-graphql-queryMixin0", response, response.Code()) - } -} - -// NewPostGraphqlQueryMixin0OK creates a PostGraphqlQueryMixin0OK with default headers values -func NewPostGraphqlQueryMixin0OK() *PostGraphqlQueryMixin0OK { - return &PostGraphqlQueryMixin0OK{} -} - -/* -PostGraphqlQueryMixin0OK describes a response with status code 200, with default header values. - -OK -*/ -type PostGraphqlQueryMixin0OK struct { - - /* Trace-ID: submit to support if resolving an issue - */ - XCSTRACEID string - - /* Request limit per minute. - */ - XRateLimitLimit int64 - - /* The number of requests remaining for the sliding one minute window. - */ - XRateLimitRemaining int64 - - Payload interface{} -} - -// IsSuccess returns true when this post graphql query mixin0 o k response has a 2xx status code -func (o *PostGraphqlQueryMixin0OK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this post graphql query mixin0 o k response has a 3xx status code -func (o *PostGraphqlQueryMixin0OK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this post graphql query mixin0 o k response has a 4xx status code -func (o *PostGraphqlQueryMixin0OK) IsClientError() bool { - return false -} - -// IsServerError returns true when this post graphql query mixin0 o k response has a 5xx status code -func (o *PostGraphqlQueryMixin0OK) IsServerError() bool { - return false -} - -// IsCode returns true when this post graphql query mixin0 o k response a status code equal to that given -func (o *PostGraphqlQueryMixin0OK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the post graphql query mixin0 o k response -func (o *PostGraphqlQueryMixin0OK) Code() int { - return 200 -} - -func (o *PostGraphqlQueryMixin0OK) Error() string { - return fmt.Sprintf("[POST /cloud-data-protection/entities/schedules/graphql/v2][%d] postGraphqlQueryMixin0OK %+v", 200, o.Payload) -} - -func (o *PostGraphqlQueryMixin0OK) String() string { - return fmt.Sprintf("[POST /cloud-data-protection/entities/schedules/graphql/v2][%d] postGraphqlQueryMixin0OK %+v", 200, o.Payload) -} - -func (o *PostGraphqlQueryMixin0OK) GetPayload() interface{} { - return o.Payload -} - -func (o *PostGraphqlQueryMixin0OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // hydrates response header X-CS-TRACEID - hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") - - if hdrXCSTRACEID != "" { - o.XCSTRACEID = hdrXCSTRACEID - } - - // hydrates response header X-RateLimit-Limit - hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") - - if hdrXRateLimitLimit != "" { - valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) - if err != nil { - return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) - } - o.XRateLimitLimit = valxRateLimitLimit - } - - // hydrates response header X-RateLimit-Remaining - hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") - - if hdrXRateLimitRemaining != "" { - valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) - if err != nil { - return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) - } - o.XRateLimitRemaining = valxRateLimitRemaining - } - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPostGraphqlQueryMixin0TooManyRequests creates a PostGraphqlQueryMixin0TooManyRequests with default headers values -func NewPostGraphqlQueryMixin0TooManyRequests() *PostGraphqlQueryMixin0TooManyRequests { - return &PostGraphqlQueryMixin0TooManyRequests{} -} - -/* -PostGraphqlQueryMixin0TooManyRequests describes a response with status code 429, with default header values. - -Too Many Requests -*/ -type PostGraphqlQueryMixin0TooManyRequests struct { - - /* Trace-ID: submit to support if resolving an issue - */ - XCSTRACEID string - - /* Request limit per minute. - */ - XRateLimitLimit int64 - - /* The number of requests remaining for the sliding one minute window. - */ - XRateLimitRemaining int64 - - /* Too many requests, retry after this time (as milliseconds since epoch) - */ - XRateLimitRetryAfter int64 - - Payload *models.MsaReplyMetaOnly -} - -// IsSuccess returns true when this post graphql query mixin0 too many requests response has a 2xx status code -func (o *PostGraphqlQueryMixin0TooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this post graphql query mixin0 too many requests response has a 3xx status code -func (o *PostGraphqlQueryMixin0TooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this post graphql query mixin0 too many requests response has a 4xx status code -func (o *PostGraphqlQueryMixin0TooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this post graphql query mixin0 too many requests response has a 5xx status code -func (o *PostGraphqlQueryMixin0TooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this post graphql query mixin0 too many requests response a status code equal to that given -func (o *PostGraphqlQueryMixin0TooManyRequests) IsCode(code int) bool { - return code == 429 -} - -// Code gets the status code for the post graphql query mixin0 too many requests response -func (o *PostGraphqlQueryMixin0TooManyRequests) Code() int { - return 429 -} - -func (o *PostGraphqlQueryMixin0TooManyRequests) Error() string { - return fmt.Sprintf("[POST /cloud-data-protection/entities/schedules/graphql/v2][%d] postGraphqlQueryMixin0TooManyRequests %+v", 429, o.Payload) -} - -func (o *PostGraphqlQueryMixin0TooManyRequests) String() string { - return fmt.Sprintf("[POST /cloud-data-protection/entities/schedules/graphql/v2][%d] postGraphqlQueryMixin0TooManyRequests %+v", 429, o.Payload) -} - -func (o *PostGraphqlQueryMixin0TooManyRequests) GetPayload() *models.MsaReplyMetaOnly { - return o.Payload -} - -func (o *PostGraphqlQueryMixin0TooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // hydrates response header X-CS-TRACEID - hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") - - if hdrXCSTRACEID != "" { - o.XCSTRACEID = hdrXCSTRACEID - } - - // hydrates response header X-RateLimit-Limit - hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") - - if hdrXRateLimitLimit != "" { - valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) - if err != nil { - return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) - } - o.XRateLimitLimit = valxRateLimitLimit - } - - // hydrates response header X-RateLimit-Remaining - hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") - - if hdrXRateLimitRemaining != "" { - valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) - if err != nil { - return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) - } - o.XRateLimitRemaining = valxRateLimitRemaining - } - - // hydrates response header X-RateLimit-RetryAfter - hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") - - if hdrXRateLimitRetryAfter != "" { - valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) - if err != nil { - return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) - } - o.XRateLimitRetryAfter = valxRateLimitRetryAfter - } - - o.Payload = new(models.MsaReplyMetaOnly) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPostGraphqlQueryMixin0InternalServerError creates a PostGraphqlQueryMixin0InternalServerError with default headers values -func NewPostGraphqlQueryMixin0InternalServerError() *PostGraphqlQueryMixin0InternalServerError { - return &PostGraphqlQueryMixin0InternalServerError{} -} - -/* -PostGraphqlQueryMixin0InternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type PostGraphqlQueryMixin0InternalServerError struct { - - /* Trace-ID: submit to support if resolving an issue - */ - XCSTRACEID string - - /* Request limit per minute. - */ - XRateLimitLimit int64 - - /* The number of requests remaining for the sliding one minute window. - */ - XRateLimitRemaining int64 - - Payload string -} - -// IsSuccess returns true when this post graphql query mixin0 internal server error response has a 2xx status code -func (o *PostGraphqlQueryMixin0InternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this post graphql query mixin0 internal server error response has a 3xx status code -func (o *PostGraphqlQueryMixin0InternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this post graphql query mixin0 internal server error response has a 4xx status code -func (o *PostGraphqlQueryMixin0InternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this post graphql query mixin0 internal server error response has a 5xx status code -func (o *PostGraphqlQueryMixin0InternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this post graphql query mixin0 internal server error response a status code equal to that given -func (o *PostGraphqlQueryMixin0InternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the post graphql query mixin0 internal server error response -func (o *PostGraphqlQueryMixin0InternalServerError) Code() int { - return 500 -} - -func (o *PostGraphqlQueryMixin0InternalServerError) Error() string { - return fmt.Sprintf("[POST /cloud-data-protection/entities/schedules/graphql/v2][%d] postGraphqlQueryMixin0InternalServerError %+v", 500, o.Payload) -} - -func (o *PostGraphqlQueryMixin0InternalServerError) String() string { - return fmt.Sprintf("[POST /cloud-data-protection/entities/schedules/graphql/v2][%d] postGraphqlQueryMixin0InternalServerError %+v", 500, o.Payload) -} - -func (o *PostGraphqlQueryMixin0InternalServerError) GetPayload() string { - return o.Payload -} - -func (o *PostGraphqlQueryMixin0InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // hydrates response header X-CS-TRACEID - hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") - - if hdrXCSTRACEID != "" { - o.XCSTRACEID = hdrXCSTRACEID - } - - // hydrates response header X-RateLimit-Limit - hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") - - if hdrXRateLimitLimit != "" { - valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) - if err != nil { - return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) - } - o.XRateLimitLimit = valxRateLimitLimit - } - - // hydrates response header X-RateLimit-Remaining - hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") - - if hdrXRateLimitRemaining != "" { - valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) - if err != nil { - return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) - } - o.XRateLimitRemaining = valxRateLimitRemaining - } - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/falcon/client/profile_groups/create_group_v1_mixin0_parameters.go b/falcon/client/profile_groups/create_group_v1_mixin0_parameters.go new file mode 100644 index 000000000..649c0ed69 --- /dev/null +++ b/falcon/client/profile_groups/create_group_v1_mixin0_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewCreateGroupV1Mixin0Params creates a new CreateGroupV1Mixin0Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCreateGroupV1Mixin0Params() *CreateGroupV1Mixin0Params { + return &CreateGroupV1Mixin0Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewCreateGroupV1Mixin0ParamsWithTimeout creates a new CreateGroupV1Mixin0Params object +// with the ability to set a timeout on a request. +func NewCreateGroupV1Mixin0ParamsWithTimeout(timeout time.Duration) *CreateGroupV1Mixin0Params { + return &CreateGroupV1Mixin0Params{ + timeout: timeout, + } +} + +// NewCreateGroupV1Mixin0ParamsWithContext creates a new CreateGroupV1Mixin0Params object +// with the ability to set a context for a request. +func NewCreateGroupV1Mixin0ParamsWithContext(ctx context.Context) *CreateGroupV1Mixin0Params { + return &CreateGroupV1Mixin0Params{ + Context: ctx, + } +} + +// NewCreateGroupV1Mixin0ParamsWithHTTPClient creates a new CreateGroupV1Mixin0Params object +// with the ability to set a custom HTTPClient for a request. +func NewCreateGroupV1Mixin0ParamsWithHTTPClient(client *http.Client) *CreateGroupV1Mixin0Params { + return &CreateGroupV1Mixin0Params{ + HTTPClient: client, + } +} + +/* +CreateGroupV1Mixin0Params contains all the parameters to send to the API endpoint + + for the create group v1 mixin0 operation. + + Typically these are written to a http.Request. +*/ +type CreateGroupV1Mixin0Params struct { + + // Body. + Body *models.FlightcontrolapiCreateGroupRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the create group v1 mixin0 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateGroupV1Mixin0Params) WithDefaults() *CreateGroupV1Mixin0Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the create group v1 mixin0 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateGroupV1Mixin0Params) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the create group v1 mixin0 params +func (o *CreateGroupV1Mixin0Params) WithTimeout(timeout time.Duration) *CreateGroupV1Mixin0Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the create group v1 mixin0 params +func (o *CreateGroupV1Mixin0Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the create group v1 mixin0 params +func (o *CreateGroupV1Mixin0Params) WithContext(ctx context.Context) *CreateGroupV1Mixin0Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the create group v1 mixin0 params +func (o *CreateGroupV1Mixin0Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the create group v1 mixin0 params +func (o *CreateGroupV1Mixin0Params) WithHTTPClient(client *http.Client) *CreateGroupV1Mixin0Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the create group v1 mixin0 params +func (o *CreateGroupV1Mixin0Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the create group v1 mixin0 params +func (o *CreateGroupV1Mixin0Params) WithBody(body *models.FlightcontrolapiCreateGroupRequestV1) *CreateGroupV1Mixin0Params { + o.SetBody(body) + return o +} + +// SetBody adds the body to the create group v1 mixin0 params +func (o *CreateGroupV1Mixin0Params) SetBody(body *models.FlightcontrolapiCreateGroupRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *CreateGroupV1Mixin0Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/profile_groups/create_group_v1_mixin0_responses.go b/falcon/client/profile_groups/create_group_v1_mixin0_responses.go new file mode 100644 index 000000000..3a0490e50 --- /dev/null +++ b/falcon/client/profile_groups/create_group_v1_mixin0_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// CreateGroupV1Mixin0Reader is a Reader for the CreateGroupV1Mixin0 structure. +type CreateGroupV1Mixin0Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CreateGroupV1Mixin0Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewCreateGroupV1Mixin0Created() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCreateGroupV1Mixin0BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCreateGroupV1Mixin0Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewCreateGroupV1Mixin0TooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCreateGroupV1Mixin0InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /user-management/entities/groups/v1] CreateGroupV1Mixin0", response, response.Code()) + } +} + +// NewCreateGroupV1Mixin0Created creates a CreateGroupV1Mixin0Created with default headers values +func NewCreateGroupV1Mixin0Created() *CreateGroupV1Mixin0Created { + return &CreateGroupV1Mixin0Created{} +} + +/* +CreateGroupV1Mixin0Created describes a response with status code 201, with default header values. + +Created +*/ +type CreateGroupV1Mixin0Created struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiProfileGroupResponseV1 +} + +// IsSuccess returns true when this create group v1 mixin0 created response has a 2xx status code +func (o *CreateGroupV1Mixin0Created) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this create group v1 mixin0 created response has a 3xx status code +func (o *CreateGroupV1Mixin0Created) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create group v1 mixin0 created response has a 4xx status code +func (o *CreateGroupV1Mixin0Created) IsClientError() bool { + return false +} + +// IsServerError returns true when this create group v1 mixin0 created response has a 5xx status code +func (o *CreateGroupV1Mixin0Created) IsServerError() bool { + return false +} + +// IsCode returns true when this create group v1 mixin0 created response a status code equal to that given +func (o *CreateGroupV1Mixin0Created) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the create group v1 mixin0 created response +func (o *CreateGroupV1Mixin0Created) Code() int { + return 201 +} + +func (o *CreateGroupV1Mixin0Created) Error() string { + return fmt.Sprintf("[POST /user-management/entities/groups/v1][%d] createGroupV1Mixin0Created %+v", 201, o.Payload) +} + +func (o *CreateGroupV1Mixin0Created) String() string { + return fmt.Sprintf("[POST /user-management/entities/groups/v1][%d] createGroupV1Mixin0Created %+v", 201, o.Payload) +} + +func (o *CreateGroupV1Mixin0Created) GetPayload() *models.FlightcontrolapiProfileGroupResponseV1 { + return o.Payload +} + +func (o *CreateGroupV1Mixin0Created) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiProfileGroupResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateGroupV1Mixin0BadRequest creates a CreateGroupV1Mixin0BadRequest with default headers values +func NewCreateGroupV1Mixin0BadRequest() *CreateGroupV1Mixin0BadRequest { + return &CreateGroupV1Mixin0BadRequest{} +} + +/* +CreateGroupV1Mixin0BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CreateGroupV1Mixin0BadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiProfileGroupResponseV1 +} + +// IsSuccess returns true when this create group v1 mixin0 bad request response has a 2xx status code +func (o *CreateGroupV1Mixin0BadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create group v1 mixin0 bad request response has a 3xx status code +func (o *CreateGroupV1Mixin0BadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create group v1 mixin0 bad request response has a 4xx status code +func (o *CreateGroupV1Mixin0BadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this create group v1 mixin0 bad request response has a 5xx status code +func (o *CreateGroupV1Mixin0BadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this create group v1 mixin0 bad request response a status code equal to that given +func (o *CreateGroupV1Mixin0BadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the create group v1 mixin0 bad request response +func (o *CreateGroupV1Mixin0BadRequest) Code() int { + return 400 +} + +func (o *CreateGroupV1Mixin0BadRequest) Error() string { + return fmt.Sprintf("[POST /user-management/entities/groups/v1][%d] createGroupV1Mixin0BadRequest %+v", 400, o.Payload) +} + +func (o *CreateGroupV1Mixin0BadRequest) String() string { + return fmt.Sprintf("[POST /user-management/entities/groups/v1][%d] createGroupV1Mixin0BadRequest %+v", 400, o.Payload) +} + +func (o *CreateGroupV1Mixin0BadRequest) GetPayload() *models.FlightcontrolapiProfileGroupResponseV1 { + return o.Payload +} + +func (o *CreateGroupV1Mixin0BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiProfileGroupResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateGroupV1Mixin0Forbidden creates a CreateGroupV1Mixin0Forbidden with default headers values +func NewCreateGroupV1Mixin0Forbidden() *CreateGroupV1Mixin0Forbidden { + return &CreateGroupV1Mixin0Forbidden{} +} + +/* +CreateGroupV1Mixin0Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CreateGroupV1Mixin0Forbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiProfileGroupResponseV1 +} + +// IsSuccess returns true when this create group v1 mixin0 forbidden response has a 2xx status code +func (o *CreateGroupV1Mixin0Forbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create group v1 mixin0 forbidden response has a 3xx status code +func (o *CreateGroupV1Mixin0Forbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create group v1 mixin0 forbidden response has a 4xx status code +func (o *CreateGroupV1Mixin0Forbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this create group v1 mixin0 forbidden response has a 5xx status code +func (o *CreateGroupV1Mixin0Forbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this create group v1 mixin0 forbidden response a status code equal to that given +func (o *CreateGroupV1Mixin0Forbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the create group v1 mixin0 forbidden response +func (o *CreateGroupV1Mixin0Forbidden) Code() int { + return 403 +} + +func (o *CreateGroupV1Mixin0Forbidden) Error() string { + return fmt.Sprintf("[POST /user-management/entities/groups/v1][%d] createGroupV1Mixin0Forbidden %+v", 403, o.Payload) +} + +func (o *CreateGroupV1Mixin0Forbidden) String() string { + return fmt.Sprintf("[POST /user-management/entities/groups/v1][%d] createGroupV1Mixin0Forbidden %+v", 403, o.Payload) +} + +func (o *CreateGroupV1Mixin0Forbidden) GetPayload() *models.FlightcontrolapiProfileGroupResponseV1 { + return o.Payload +} + +func (o *CreateGroupV1Mixin0Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiProfileGroupResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateGroupV1Mixin0TooManyRequests creates a CreateGroupV1Mixin0TooManyRequests with default headers values +func NewCreateGroupV1Mixin0TooManyRequests() *CreateGroupV1Mixin0TooManyRequests { + return &CreateGroupV1Mixin0TooManyRequests{} +} + +/* +CreateGroupV1Mixin0TooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type CreateGroupV1Mixin0TooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this create group v1 mixin0 too many requests response has a 2xx status code +func (o *CreateGroupV1Mixin0TooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create group v1 mixin0 too many requests response has a 3xx status code +func (o *CreateGroupV1Mixin0TooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create group v1 mixin0 too many requests response has a 4xx status code +func (o *CreateGroupV1Mixin0TooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this create group v1 mixin0 too many requests response has a 5xx status code +func (o *CreateGroupV1Mixin0TooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this create group v1 mixin0 too many requests response a status code equal to that given +func (o *CreateGroupV1Mixin0TooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the create group v1 mixin0 too many requests response +func (o *CreateGroupV1Mixin0TooManyRequests) Code() int { + return 429 +} + +func (o *CreateGroupV1Mixin0TooManyRequests) Error() string { + return fmt.Sprintf("[POST /user-management/entities/groups/v1][%d] createGroupV1Mixin0TooManyRequests %+v", 429, o.Payload) +} + +func (o *CreateGroupV1Mixin0TooManyRequests) String() string { + return fmt.Sprintf("[POST /user-management/entities/groups/v1][%d] createGroupV1Mixin0TooManyRequests %+v", 429, o.Payload) +} + +func (o *CreateGroupV1Mixin0TooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *CreateGroupV1Mixin0TooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateGroupV1Mixin0InternalServerError creates a CreateGroupV1Mixin0InternalServerError with default headers values +func NewCreateGroupV1Mixin0InternalServerError() *CreateGroupV1Mixin0InternalServerError { + return &CreateGroupV1Mixin0InternalServerError{} +} + +/* +CreateGroupV1Mixin0InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type CreateGroupV1Mixin0InternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiProfileGroupResponseV1 +} + +// IsSuccess returns true when this create group v1 mixin0 internal server error response has a 2xx status code +func (o *CreateGroupV1Mixin0InternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create group v1 mixin0 internal server error response has a 3xx status code +func (o *CreateGroupV1Mixin0InternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create group v1 mixin0 internal server error response has a 4xx status code +func (o *CreateGroupV1Mixin0InternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this create group v1 mixin0 internal server error response has a 5xx status code +func (o *CreateGroupV1Mixin0InternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this create group v1 mixin0 internal server error response a status code equal to that given +func (o *CreateGroupV1Mixin0InternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the create group v1 mixin0 internal server error response +func (o *CreateGroupV1Mixin0InternalServerError) Code() int { + return 500 +} + +func (o *CreateGroupV1Mixin0InternalServerError) Error() string { + return fmt.Sprintf("[POST /user-management/entities/groups/v1][%d] createGroupV1Mixin0InternalServerError %+v", 500, o.Payload) +} + +func (o *CreateGroupV1Mixin0InternalServerError) String() string { + return fmt.Sprintf("[POST /user-management/entities/groups/v1][%d] createGroupV1Mixin0InternalServerError %+v", 500, o.Payload) +} + +func (o *CreateGroupV1Mixin0InternalServerError) GetPayload() *models.FlightcontrolapiProfileGroupResponseV1 { + return o.Payload +} + +func (o *CreateGroupV1Mixin0InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiProfileGroupResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/profile_groups/delete_groups_v1_parameters.go b/falcon/client/profile_groups/delete_groups_v1_parameters.go new file mode 100644 index 000000000..c50581ed3 --- /dev/null +++ b/falcon/client/profile_groups/delete_groups_v1_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewDeleteGroupsV1Params creates a new DeleteGroupsV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDeleteGroupsV1Params() *DeleteGroupsV1Params { + return &DeleteGroupsV1Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteGroupsV1ParamsWithTimeout creates a new DeleteGroupsV1Params object +// with the ability to set a timeout on a request. +func NewDeleteGroupsV1ParamsWithTimeout(timeout time.Duration) *DeleteGroupsV1Params { + return &DeleteGroupsV1Params{ + timeout: timeout, + } +} + +// NewDeleteGroupsV1ParamsWithContext creates a new DeleteGroupsV1Params object +// with the ability to set a context for a request. +func NewDeleteGroupsV1ParamsWithContext(ctx context.Context) *DeleteGroupsV1Params { + return &DeleteGroupsV1Params{ + Context: ctx, + } +} + +// NewDeleteGroupsV1ParamsWithHTTPClient creates a new DeleteGroupsV1Params object +// with the ability to set a custom HTTPClient for a request. +func NewDeleteGroupsV1ParamsWithHTTPClient(client *http.Client) *DeleteGroupsV1Params { + return &DeleteGroupsV1Params{ + HTTPClient: client, + } +} + +/* +DeleteGroupsV1Params contains all the parameters to send to the API endpoint + + for the delete groups v1 operation. + + Typically these are written to a http.Request. +*/ +type DeleteGroupsV1Params struct { + + /* Ids. + + Group IDs to delete + */ + Ids []string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the delete groups v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteGroupsV1Params) WithDefaults() *DeleteGroupsV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the delete groups v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteGroupsV1Params) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the delete groups v1 params +func (o *DeleteGroupsV1Params) WithTimeout(timeout time.Duration) *DeleteGroupsV1Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete groups v1 params +func (o *DeleteGroupsV1Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete groups v1 params +func (o *DeleteGroupsV1Params) WithContext(ctx context.Context) *DeleteGroupsV1Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete groups v1 params +func (o *DeleteGroupsV1Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete groups v1 params +func (o *DeleteGroupsV1Params) WithHTTPClient(client *http.Client) *DeleteGroupsV1Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete groups v1 params +func (o *DeleteGroupsV1Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIds adds the ids to the delete groups v1 params +func (o *DeleteGroupsV1Params) WithIds(ids []string) *DeleteGroupsV1Params { + o.SetIds(ids) + return o +} + +// SetIds adds the ids to the delete groups v1 params +func (o *DeleteGroupsV1Params) SetIds(ids []string) { + o.Ids = ids +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteGroupsV1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Ids != nil { + + // binding items for ids + joinedIds := o.bindParamIds(reg) + + // query array param ids + if err := r.SetQueryParam("ids", joinedIds...); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamDeleteGroupsV1 binds the parameter ids +func (o *DeleteGroupsV1Params) bindParamIds(formats strfmt.Registry) []string { + idsIR := o.Ids + + var idsIC []string + for _, idsIIR := range idsIR { // explode []string + + idsIIV := idsIIR // string as string + idsIC = append(idsIC, idsIIV) + } + + // items.CollectionFormat: "csv" + idsIS := swag.JoinByFormat(idsIC, "csv") + + return idsIS +} diff --git a/falcon/client/profile_groups/delete_groups_v1_responses.go b/falcon/client/profile_groups/delete_groups_v1_responses.go new file mode 100644 index 000000000..8064064a6 --- /dev/null +++ b/falcon/client/profile_groups/delete_groups_v1_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// DeleteGroupsV1Reader is a Reader for the DeleteGroupsV1 structure. +type DeleteGroupsV1Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteGroupsV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteGroupsV1OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewDeleteGroupsV1BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteGroupsV1Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewDeleteGroupsV1TooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteGroupsV1InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[DELETE /user-management/entities/groups/v1] DeleteGroupsV1", response, response.Code()) + } +} + +// NewDeleteGroupsV1OK creates a DeleteGroupsV1OK with default headers values +func NewDeleteGroupsV1OK() *DeleteGroupsV1OK { + return &DeleteGroupsV1OK{} +} + +/* +DeleteGroupsV1OK describes a response with status code 200, with default header values. + +OK +*/ +type DeleteGroupsV1OK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this delete groups v1 o k response has a 2xx status code +func (o *DeleteGroupsV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete groups v1 o k response has a 3xx status code +func (o *DeleteGroupsV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete groups v1 o k response has a 4xx status code +func (o *DeleteGroupsV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete groups v1 o k response has a 5xx status code +func (o *DeleteGroupsV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this delete groups v1 o k response a status code equal to that given +func (o *DeleteGroupsV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the delete groups v1 o k response +func (o *DeleteGroupsV1OK) Code() int { + return 200 +} + +func (o *DeleteGroupsV1OK) Error() string { + return fmt.Sprintf("[DELETE /user-management/entities/groups/v1][%d] deleteGroupsV1OK %+v", 200, o.Payload) +} + +func (o *DeleteGroupsV1OK) String() string { + return fmt.Sprintf("[DELETE /user-management/entities/groups/v1][%d] deleteGroupsV1OK %+v", 200, o.Payload) +} + +func (o *DeleteGroupsV1OK) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *DeleteGroupsV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteGroupsV1BadRequest creates a DeleteGroupsV1BadRequest with default headers values +func NewDeleteGroupsV1BadRequest() *DeleteGroupsV1BadRequest { + return &DeleteGroupsV1BadRequest{} +} + +/* +DeleteGroupsV1BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type DeleteGroupsV1BadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this delete groups v1 bad request response has a 2xx status code +func (o *DeleteGroupsV1BadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete groups v1 bad request response has a 3xx status code +func (o *DeleteGroupsV1BadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete groups v1 bad request response has a 4xx status code +func (o *DeleteGroupsV1BadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete groups v1 bad request response has a 5xx status code +func (o *DeleteGroupsV1BadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this delete groups v1 bad request response a status code equal to that given +func (o *DeleteGroupsV1BadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the delete groups v1 bad request response +func (o *DeleteGroupsV1BadRequest) Code() int { + return 400 +} + +func (o *DeleteGroupsV1BadRequest) Error() string { + return fmt.Sprintf("[DELETE /user-management/entities/groups/v1][%d] deleteGroupsV1BadRequest %+v", 400, o.Payload) +} + +func (o *DeleteGroupsV1BadRequest) String() string { + return fmt.Sprintf("[DELETE /user-management/entities/groups/v1][%d] deleteGroupsV1BadRequest %+v", 400, o.Payload) +} + +func (o *DeleteGroupsV1BadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *DeleteGroupsV1BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteGroupsV1Forbidden creates a DeleteGroupsV1Forbidden with default headers values +func NewDeleteGroupsV1Forbidden() *DeleteGroupsV1Forbidden { + return &DeleteGroupsV1Forbidden{} +} + +/* +DeleteGroupsV1Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type DeleteGroupsV1Forbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this delete groups v1 forbidden response has a 2xx status code +func (o *DeleteGroupsV1Forbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete groups v1 forbidden response has a 3xx status code +func (o *DeleteGroupsV1Forbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete groups v1 forbidden response has a 4xx status code +func (o *DeleteGroupsV1Forbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete groups v1 forbidden response has a 5xx status code +func (o *DeleteGroupsV1Forbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this delete groups v1 forbidden response a status code equal to that given +func (o *DeleteGroupsV1Forbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the delete groups v1 forbidden response +func (o *DeleteGroupsV1Forbidden) Code() int { + return 403 +} + +func (o *DeleteGroupsV1Forbidden) Error() string { + return fmt.Sprintf("[DELETE /user-management/entities/groups/v1][%d] deleteGroupsV1Forbidden %+v", 403, o.Payload) +} + +func (o *DeleteGroupsV1Forbidden) String() string { + return fmt.Sprintf("[DELETE /user-management/entities/groups/v1][%d] deleteGroupsV1Forbidden %+v", 403, o.Payload) +} + +func (o *DeleteGroupsV1Forbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *DeleteGroupsV1Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteGroupsV1TooManyRequests creates a DeleteGroupsV1TooManyRequests with default headers values +func NewDeleteGroupsV1TooManyRequests() *DeleteGroupsV1TooManyRequests { + return &DeleteGroupsV1TooManyRequests{} +} + +/* +DeleteGroupsV1TooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type DeleteGroupsV1TooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this delete groups v1 too many requests response has a 2xx status code +func (o *DeleteGroupsV1TooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete groups v1 too many requests response has a 3xx status code +func (o *DeleteGroupsV1TooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete groups v1 too many requests response has a 4xx status code +func (o *DeleteGroupsV1TooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete groups v1 too many requests response has a 5xx status code +func (o *DeleteGroupsV1TooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this delete groups v1 too many requests response a status code equal to that given +func (o *DeleteGroupsV1TooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the delete groups v1 too many requests response +func (o *DeleteGroupsV1TooManyRequests) Code() int { + return 429 +} + +func (o *DeleteGroupsV1TooManyRequests) Error() string { + return fmt.Sprintf("[DELETE /user-management/entities/groups/v1][%d] deleteGroupsV1TooManyRequests %+v", 429, o.Payload) +} + +func (o *DeleteGroupsV1TooManyRequests) String() string { + return fmt.Sprintf("[DELETE /user-management/entities/groups/v1][%d] deleteGroupsV1TooManyRequests %+v", 429, o.Payload) +} + +func (o *DeleteGroupsV1TooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *DeleteGroupsV1TooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteGroupsV1InternalServerError creates a DeleteGroupsV1InternalServerError with default headers values +func NewDeleteGroupsV1InternalServerError() *DeleteGroupsV1InternalServerError { + return &DeleteGroupsV1InternalServerError{} +} + +/* +DeleteGroupsV1InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type DeleteGroupsV1InternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this delete groups v1 internal server error response has a 2xx status code +func (o *DeleteGroupsV1InternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete groups v1 internal server error response has a 3xx status code +func (o *DeleteGroupsV1InternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete groups v1 internal server error response has a 4xx status code +func (o *DeleteGroupsV1InternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete groups v1 internal server error response has a 5xx status code +func (o *DeleteGroupsV1InternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this delete groups v1 internal server error response a status code equal to that given +func (o *DeleteGroupsV1InternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the delete groups v1 internal server error response +func (o *DeleteGroupsV1InternalServerError) Code() int { + return 500 +} + +func (o *DeleteGroupsV1InternalServerError) Error() string { + return fmt.Sprintf("[DELETE /user-management/entities/groups/v1][%d] deleteGroupsV1InternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteGroupsV1InternalServerError) String() string { + return fmt.Sprintf("[DELETE /user-management/entities/groups/v1][%d] deleteGroupsV1InternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteGroupsV1InternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *DeleteGroupsV1InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/profile_groups/get_group_users_v1_parameters.go b/falcon/client/profile_groups/get_group_users_v1_parameters.go new file mode 100644 index 000000000..4052337f1 --- /dev/null +++ b/falcon/client/profile_groups/get_group_users_v1_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewGetGroupUsersV1Params creates a new GetGroupUsersV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetGroupUsersV1Params() *GetGroupUsersV1Params { + return &GetGroupUsersV1Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetGroupUsersV1ParamsWithTimeout creates a new GetGroupUsersV1Params object +// with the ability to set a timeout on a request. +func NewGetGroupUsersV1ParamsWithTimeout(timeout time.Duration) *GetGroupUsersV1Params { + return &GetGroupUsersV1Params{ + timeout: timeout, + } +} + +// NewGetGroupUsersV1ParamsWithContext creates a new GetGroupUsersV1Params object +// with the ability to set a context for a request. +func NewGetGroupUsersV1ParamsWithContext(ctx context.Context) *GetGroupUsersV1Params { + return &GetGroupUsersV1Params{ + Context: ctx, + } +} + +// NewGetGroupUsersV1ParamsWithHTTPClient creates a new GetGroupUsersV1Params object +// with the ability to set a custom HTTPClient for a request. +func NewGetGroupUsersV1ParamsWithHTTPClient(client *http.Client) *GetGroupUsersV1Params { + return &GetGroupUsersV1Params{ + HTTPClient: client, + } +} + +/* +GetGroupUsersV1Params contains all the parameters to send to the API endpoint + + for the get group users v1 operation. + + Typically these are written to a http.Request. +*/ +type GetGroupUsersV1Params struct { + + // Body. + Body *models.FlightcontrolapiGroupUsersRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get group users v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetGroupUsersV1Params) WithDefaults() *GetGroupUsersV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get group users v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetGroupUsersV1Params) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get group users v1 params +func (o *GetGroupUsersV1Params) WithTimeout(timeout time.Duration) *GetGroupUsersV1Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get group users v1 params +func (o *GetGroupUsersV1Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get group users v1 params +func (o *GetGroupUsersV1Params) WithContext(ctx context.Context) *GetGroupUsersV1Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get group users v1 params +func (o *GetGroupUsersV1Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get group users v1 params +func (o *GetGroupUsersV1Params) WithHTTPClient(client *http.Client) *GetGroupUsersV1Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get group users v1 params +func (o *GetGroupUsersV1Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the get group users v1 params +func (o *GetGroupUsersV1Params) WithBody(body *models.FlightcontrolapiGroupUsersRequestV1) *GetGroupUsersV1Params { + o.SetBody(body) + return o +} + +// SetBody adds the body to the get group users v1 params +func (o *GetGroupUsersV1Params) SetBody(body *models.FlightcontrolapiGroupUsersRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *GetGroupUsersV1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/profile_groups/get_group_users_v1_responses.go b/falcon/client/profile_groups/get_group_users_v1_responses.go new file mode 100644 index 000000000..4a0a75855 --- /dev/null +++ b/falcon/client/profile_groups/get_group_users_v1_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// GetGroupUsersV1Reader is a Reader for the GetGroupUsersV1 structure. +type GetGroupUsersV1Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetGroupUsersV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetGroupUsersV1OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGetGroupUsersV1BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetGroupUsersV1Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewGetGroupUsersV1TooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetGroupUsersV1InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /user-management/entities/group-users/GET/v1] GetGroupUsersV1", response, response.Code()) + } +} + +// NewGetGroupUsersV1OK creates a GetGroupUsersV1OK with default headers values +func NewGetGroupUsersV1OK() *GetGroupUsersV1OK { + return &GetGroupUsersV1OK{} +} + +/* +GetGroupUsersV1OK describes a response with status code 200, with default header values. + +OK +*/ +type GetGroupUsersV1OK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiGroupUsersResponseV1 +} + +// IsSuccess returns true when this get group users v1 o k response has a 2xx status code +func (o *GetGroupUsersV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get group users v1 o k response has a 3xx status code +func (o *GetGroupUsersV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get group users v1 o k response has a 4xx status code +func (o *GetGroupUsersV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get group users v1 o k response has a 5xx status code +func (o *GetGroupUsersV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this get group users v1 o k response a status code equal to that given +func (o *GetGroupUsersV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get group users v1 o k response +func (o *GetGroupUsersV1OK) Code() int { + return 200 +} + +func (o *GetGroupUsersV1OK) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-users/GET/v1][%d] getGroupUsersV1OK %+v", 200, o.Payload) +} + +func (o *GetGroupUsersV1OK) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-users/GET/v1][%d] getGroupUsersV1OK %+v", 200, o.Payload) +} + +func (o *GetGroupUsersV1OK) GetPayload() *models.FlightcontrolapiGroupUsersResponseV1 { + return o.Payload +} + +func (o *GetGroupUsersV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiGroupUsersResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGroupUsersV1BadRequest creates a GetGroupUsersV1BadRequest with default headers values +func NewGetGroupUsersV1BadRequest() *GetGroupUsersV1BadRequest { + return &GetGroupUsersV1BadRequest{} +} + +/* +GetGroupUsersV1BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GetGroupUsersV1BadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiGroupUsersResponseV1 +} + +// IsSuccess returns true when this get group users v1 bad request response has a 2xx status code +func (o *GetGroupUsersV1BadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get group users v1 bad request response has a 3xx status code +func (o *GetGroupUsersV1BadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get group users v1 bad request response has a 4xx status code +func (o *GetGroupUsersV1BadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this get group users v1 bad request response has a 5xx status code +func (o *GetGroupUsersV1BadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this get group users v1 bad request response a status code equal to that given +func (o *GetGroupUsersV1BadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the get group users v1 bad request response +func (o *GetGroupUsersV1BadRequest) Code() int { + return 400 +} + +func (o *GetGroupUsersV1BadRequest) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-users/GET/v1][%d] getGroupUsersV1BadRequest %+v", 400, o.Payload) +} + +func (o *GetGroupUsersV1BadRequest) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-users/GET/v1][%d] getGroupUsersV1BadRequest %+v", 400, o.Payload) +} + +func (o *GetGroupUsersV1BadRequest) GetPayload() *models.FlightcontrolapiGroupUsersResponseV1 { + return o.Payload +} + +func (o *GetGroupUsersV1BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiGroupUsersResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGroupUsersV1Forbidden creates a GetGroupUsersV1Forbidden with default headers values +func NewGetGroupUsersV1Forbidden() *GetGroupUsersV1Forbidden { + return &GetGroupUsersV1Forbidden{} +} + +/* +GetGroupUsersV1Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GetGroupUsersV1Forbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiGroupUsersResponseV1 +} + +// IsSuccess returns true when this get group users v1 forbidden response has a 2xx status code +func (o *GetGroupUsersV1Forbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get group users v1 forbidden response has a 3xx status code +func (o *GetGroupUsersV1Forbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get group users v1 forbidden response has a 4xx status code +func (o *GetGroupUsersV1Forbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get group users v1 forbidden response has a 5xx status code +func (o *GetGroupUsersV1Forbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get group users v1 forbidden response a status code equal to that given +func (o *GetGroupUsersV1Forbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get group users v1 forbidden response +func (o *GetGroupUsersV1Forbidden) Code() int { + return 403 +} + +func (o *GetGroupUsersV1Forbidden) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-users/GET/v1][%d] getGroupUsersV1Forbidden %+v", 403, o.Payload) +} + +func (o *GetGroupUsersV1Forbidden) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-users/GET/v1][%d] getGroupUsersV1Forbidden %+v", 403, o.Payload) +} + +func (o *GetGroupUsersV1Forbidden) GetPayload() *models.FlightcontrolapiGroupUsersResponseV1 { + return o.Payload +} + +func (o *GetGroupUsersV1Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiGroupUsersResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGroupUsersV1TooManyRequests creates a GetGroupUsersV1TooManyRequests with default headers values +func NewGetGroupUsersV1TooManyRequests() *GetGroupUsersV1TooManyRequests { + return &GetGroupUsersV1TooManyRequests{} +} + +/* +GetGroupUsersV1TooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type GetGroupUsersV1TooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get group users v1 too many requests response has a 2xx status code +func (o *GetGroupUsersV1TooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get group users v1 too many requests response has a 3xx status code +func (o *GetGroupUsersV1TooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get group users v1 too many requests response has a 4xx status code +func (o *GetGroupUsersV1TooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this get group users v1 too many requests response has a 5xx status code +func (o *GetGroupUsersV1TooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this get group users v1 too many requests response a status code equal to that given +func (o *GetGroupUsersV1TooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the get group users v1 too many requests response +func (o *GetGroupUsersV1TooManyRequests) Code() int { + return 429 +} + +func (o *GetGroupUsersV1TooManyRequests) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-users/GET/v1][%d] getGroupUsersV1TooManyRequests %+v", 429, o.Payload) +} + +func (o *GetGroupUsersV1TooManyRequests) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-users/GET/v1][%d] getGroupUsersV1TooManyRequests %+v", 429, o.Payload) +} + +func (o *GetGroupUsersV1TooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetGroupUsersV1TooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGroupUsersV1InternalServerError creates a GetGroupUsersV1InternalServerError with default headers values +func NewGetGroupUsersV1InternalServerError() *GetGroupUsersV1InternalServerError { + return &GetGroupUsersV1InternalServerError{} +} + +/* +GetGroupUsersV1InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GetGroupUsersV1InternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiGroupUsersResponseV1 +} + +// IsSuccess returns true when this get group users v1 internal server error response has a 2xx status code +func (o *GetGroupUsersV1InternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get group users v1 internal server error response has a 3xx status code +func (o *GetGroupUsersV1InternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get group users v1 internal server error response has a 4xx status code +func (o *GetGroupUsersV1InternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get group users v1 internal server error response has a 5xx status code +func (o *GetGroupUsersV1InternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get group users v1 internal server error response a status code equal to that given +func (o *GetGroupUsersV1InternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get group users v1 internal server error response +func (o *GetGroupUsersV1InternalServerError) Code() int { + return 500 +} + +func (o *GetGroupUsersV1InternalServerError) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-users/GET/v1][%d] getGroupUsersV1InternalServerError %+v", 500, o.Payload) +} + +func (o *GetGroupUsersV1InternalServerError) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-users/GET/v1][%d] getGroupUsersV1InternalServerError %+v", 500, o.Payload) +} + +func (o *GetGroupUsersV1InternalServerError) GetPayload() *models.FlightcontrolapiGroupUsersResponseV1 { + return o.Payload +} + +func (o *GetGroupUsersV1InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiGroupUsersResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/profile_groups/get_groups_v1_mixin0_parameters.go b/falcon/client/profile_groups/get_groups_v1_mixin0_parameters.go new file mode 100644 index 000000000..d26531588 --- /dev/null +++ b/falcon/client/profile_groups/get_groups_v1_mixin0_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewGetGroupsV1Mixin0Params creates a new GetGroupsV1Mixin0Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetGroupsV1Mixin0Params() *GetGroupsV1Mixin0Params { + return &GetGroupsV1Mixin0Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetGroupsV1Mixin0ParamsWithTimeout creates a new GetGroupsV1Mixin0Params object +// with the ability to set a timeout on a request. +func NewGetGroupsV1Mixin0ParamsWithTimeout(timeout time.Duration) *GetGroupsV1Mixin0Params { + return &GetGroupsV1Mixin0Params{ + timeout: timeout, + } +} + +// NewGetGroupsV1Mixin0ParamsWithContext creates a new GetGroupsV1Mixin0Params object +// with the ability to set a context for a request. +func NewGetGroupsV1Mixin0ParamsWithContext(ctx context.Context) *GetGroupsV1Mixin0Params { + return &GetGroupsV1Mixin0Params{ + Context: ctx, + } +} + +// NewGetGroupsV1Mixin0ParamsWithHTTPClient creates a new GetGroupsV1Mixin0Params object +// with the ability to set a custom HTTPClient for a request. +func NewGetGroupsV1Mixin0ParamsWithHTTPClient(client *http.Client) *GetGroupsV1Mixin0Params { + return &GetGroupsV1Mixin0Params{ + HTTPClient: client, + } +} + +/* +GetGroupsV1Mixin0Params contains all the parameters to send to the API endpoint + + for the get groups v1 mixin0 operation. + + Typically these are written to a http.Request. +*/ +type GetGroupsV1Mixin0Params struct { + + // Body. + Body *models.FlightcontrolapiProfileGroupRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get groups v1 mixin0 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetGroupsV1Mixin0Params) WithDefaults() *GetGroupsV1Mixin0Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get groups v1 mixin0 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetGroupsV1Mixin0Params) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get groups v1 mixin0 params +func (o *GetGroupsV1Mixin0Params) WithTimeout(timeout time.Duration) *GetGroupsV1Mixin0Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get groups v1 mixin0 params +func (o *GetGroupsV1Mixin0Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get groups v1 mixin0 params +func (o *GetGroupsV1Mixin0Params) WithContext(ctx context.Context) *GetGroupsV1Mixin0Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get groups v1 mixin0 params +func (o *GetGroupsV1Mixin0Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get groups v1 mixin0 params +func (o *GetGroupsV1Mixin0Params) WithHTTPClient(client *http.Client) *GetGroupsV1Mixin0Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get groups v1 mixin0 params +func (o *GetGroupsV1Mixin0Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the get groups v1 mixin0 params +func (o *GetGroupsV1Mixin0Params) WithBody(body *models.FlightcontrolapiProfileGroupRequestV1) *GetGroupsV1Mixin0Params { + o.SetBody(body) + return o +} + +// SetBody adds the body to the get groups v1 mixin0 params +func (o *GetGroupsV1Mixin0Params) SetBody(body *models.FlightcontrolapiProfileGroupRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *GetGroupsV1Mixin0Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/profile_groups/get_groups_v1_mixin0_responses.go b/falcon/client/profile_groups/get_groups_v1_mixin0_responses.go new file mode 100644 index 000000000..8907069de --- /dev/null +++ b/falcon/client/profile_groups/get_groups_v1_mixin0_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// GetGroupsV1Mixin0Reader is a Reader for the GetGroupsV1Mixin0 structure. +type GetGroupsV1Mixin0Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetGroupsV1Mixin0Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetGroupsV1Mixin0OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGetGroupsV1Mixin0BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetGroupsV1Mixin0Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewGetGroupsV1Mixin0TooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetGroupsV1Mixin0InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /user-management/entities/groups/GET/v1] GetGroupsV1Mixin0", response, response.Code()) + } +} + +// NewGetGroupsV1Mixin0OK creates a GetGroupsV1Mixin0OK with default headers values +func NewGetGroupsV1Mixin0OK() *GetGroupsV1Mixin0OK { + return &GetGroupsV1Mixin0OK{} +} + +/* +GetGroupsV1Mixin0OK describes a response with status code 200, with default header values. + +OK +*/ +type GetGroupsV1Mixin0OK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiProfileGroupResponseV1 +} + +// IsSuccess returns true when this get groups v1 mixin0 o k response has a 2xx status code +func (o *GetGroupsV1Mixin0OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get groups v1 mixin0 o k response has a 3xx status code +func (o *GetGroupsV1Mixin0OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get groups v1 mixin0 o k response has a 4xx status code +func (o *GetGroupsV1Mixin0OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get groups v1 mixin0 o k response has a 5xx status code +func (o *GetGroupsV1Mixin0OK) IsServerError() bool { + return false +} + +// IsCode returns true when this get groups v1 mixin0 o k response a status code equal to that given +func (o *GetGroupsV1Mixin0OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get groups v1 mixin0 o k response +func (o *GetGroupsV1Mixin0OK) Code() int { + return 200 +} + +func (o *GetGroupsV1Mixin0OK) Error() string { + return fmt.Sprintf("[POST /user-management/entities/groups/GET/v1][%d] getGroupsV1Mixin0OK %+v", 200, o.Payload) +} + +func (o *GetGroupsV1Mixin0OK) String() string { + return fmt.Sprintf("[POST /user-management/entities/groups/GET/v1][%d] getGroupsV1Mixin0OK %+v", 200, o.Payload) +} + +func (o *GetGroupsV1Mixin0OK) GetPayload() *models.FlightcontrolapiProfileGroupResponseV1 { + return o.Payload +} + +func (o *GetGroupsV1Mixin0OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiProfileGroupResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGroupsV1Mixin0BadRequest creates a GetGroupsV1Mixin0BadRequest with default headers values +func NewGetGroupsV1Mixin0BadRequest() *GetGroupsV1Mixin0BadRequest { + return &GetGroupsV1Mixin0BadRequest{} +} + +/* +GetGroupsV1Mixin0BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GetGroupsV1Mixin0BadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiProfileGroupResponseV1 +} + +// IsSuccess returns true when this get groups v1 mixin0 bad request response has a 2xx status code +func (o *GetGroupsV1Mixin0BadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get groups v1 mixin0 bad request response has a 3xx status code +func (o *GetGroupsV1Mixin0BadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get groups v1 mixin0 bad request response has a 4xx status code +func (o *GetGroupsV1Mixin0BadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this get groups v1 mixin0 bad request response has a 5xx status code +func (o *GetGroupsV1Mixin0BadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this get groups v1 mixin0 bad request response a status code equal to that given +func (o *GetGroupsV1Mixin0BadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the get groups v1 mixin0 bad request response +func (o *GetGroupsV1Mixin0BadRequest) Code() int { + return 400 +} + +func (o *GetGroupsV1Mixin0BadRequest) Error() string { + return fmt.Sprintf("[POST /user-management/entities/groups/GET/v1][%d] getGroupsV1Mixin0BadRequest %+v", 400, o.Payload) +} + +func (o *GetGroupsV1Mixin0BadRequest) String() string { + return fmt.Sprintf("[POST /user-management/entities/groups/GET/v1][%d] getGroupsV1Mixin0BadRequest %+v", 400, o.Payload) +} + +func (o *GetGroupsV1Mixin0BadRequest) GetPayload() *models.FlightcontrolapiProfileGroupResponseV1 { + return o.Payload +} + +func (o *GetGroupsV1Mixin0BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiProfileGroupResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGroupsV1Mixin0Forbidden creates a GetGroupsV1Mixin0Forbidden with default headers values +func NewGetGroupsV1Mixin0Forbidden() *GetGroupsV1Mixin0Forbidden { + return &GetGroupsV1Mixin0Forbidden{} +} + +/* +GetGroupsV1Mixin0Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GetGroupsV1Mixin0Forbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiProfileGroupResponseV1 +} + +// IsSuccess returns true when this get groups v1 mixin0 forbidden response has a 2xx status code +func (o *GetGroupsV1Mixin0Forbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get groups v1 mixin0 forbidden response has a 3xx status code +func (o *GetGroupsV1Mixin0Forbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get groups v1 mixin0 forbidden response has a 4xx status code +func (o *GetGroupsV1Mixin0Forbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get groups v1 mixin0 forbidden response has a 5xx status code +func (o *GetGroupsV1Mixin0Forbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get groups v1 mixin0 forbidden response a status code equal to that given +func (o *GetGroupsV1Mixin0Forbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get groups v1 mixin0 forbidden response +func (o *GetGroupsV1Mixin0Forbidden) Code() int { + return 403 +} + +func (o *GetGroupsV1Mixin0Forbidden) Error() string { + return fmt.Sprintf("[POST /user-management/entities/groups/GET/v1][%d] getGroupsV1Mixin0Forbidden %+v", 403, o.Payload) +} + +func (o *GetGroupsV1Mixin0Forbidden) String() string { + return fmt.Sprintf("[POST /user-management/entities/groups/GET/v1][%d] getGroupsV1Mixin0Forbidden %+v", 403, o.Payload) +} + +func (o *GetGroupsV1Mixin0Forbidden) GetPayload() *models.FlightcontrolapiProfileGroupResponseV1 { + return o.Payload +} + +func (o *GetGroupsV1Mixin0Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiProfileGroupResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGroupsV1Mixin0TooManyRequests creates a GetGroupsV1Mixin0TooManyRequests with default headers values +func NewGetGroupsV1Mixin0TooManyRequests() *GetGroupsV1Mixin0TooManyRequests { + return &GetGroupsV1Mixin0TooManyRequests{} +} + +/* +GetGroupsV1Mixin0TooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type GetGroupsV1Mixin0TooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get groups v1 mixin0 too many requests response has a 2xx status code +func (o *GetGroupsV1Mixin0TooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get groups v1 mixin0 too many requests response has a 3xx status code +func (o *GetGroupsV1Mixin0TooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get groups v1 mixin0 too many requests response has a 4xx status code +func (o *GetGroupsV1Mixin0TooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this get groups v1 mixin0 too many requests response has a 5xx status code +func (o *GetGroupsV1Mixin0TooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this get groups v1 mixin0 too many requests response a status code equal to that given +func (o *GetGroupsV1Mixin0TooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the get groups v1 mixin0 too many requests response +func (o *GetGroupsV1Mixin0TooManyRequests) Code() int { + return 429 +} + +func (o *GetGroupsV1Mixin0TooManyRequests) Error() string { + return fmt.Sprintf("[POST /user-management/entities/groups/GET/v1][%d] getGroupsV1Mixin0TooManyRequests %+v", 429, o.Payload) +} + +func (o *GetGroupsV1Mixin0TooManyRequests) String() string { + return fmt.Sprintf("[POST /user-management/entities/groups/GET/v1][%d] getGroupsV1Mixin0TooManyRequests %+v", 429, o.Payload) +} + +func (o *GetGroupsV1Mixin0TooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetGroupsV1Mixin0TooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGroupsV1Mixin0InternalServerError creates a GetGroupsV1Mixin0InternalServerError with default headers values +func NewGetGroupsV1Mixin0InternalServerError() *GetGroupsV1Mixin0InternalServerError { + return &GetGroupsV1Mixin0InternalServerError{} +} + +/* +GetGroupsV1Mixin0InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GetGroupsV1Mixin0InternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiProfileGroupResponseV1 +} + +// IsSuccess returns true when this get groups v1 mixin0 internal server error response has a 2xx status code +func (o *GetGroupsV1Mixin0InternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get groups v1 mixin0 internal server error response has a 3xx status code +func (o *GetGroupsV1Mixin0InternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get groups v1 mixin0 internal server error response has a 4xx status code +func (o *GetGroupsV1Mixin0InternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get groups v1 mixin0 internal server error response has a 5xx status code +func (o *GetGroupsV1Mixin0InternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get groups v1 mixin0 internal server error response a status code equal to that given +func (o *GetGroupsV1Mixin0InternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get groups v1 mixin0 internal server error response +func (o *GetGroupsV1Mixin0InternalServerError) Code() int { + return 500 +} + +func (o *GetGroupsV1Mixin0InternalServerError) Error() string { + return fmt.Sprintf("[POST /user-management/entities/groups/GET/v1][%d] getGroupsV1Mixin0InternalServerError %+v", 500, o.Payload) +} + +func (o *GetGroupsV1Mixin0InternalServerError) String() string { + return fmt.Sprintf("[POST /user-management/entities/groups/GET/v1][%d] getGroupsV1Mixin0InternalServerError %+v", 500, o.Payload) +} + +func (o *GetGroupsV1Mixin0InternalServerError) GetPayload() *models.FlightcontrolapiProfileGroupResponseV1 { + return o.Payload +} + +func (o *GetGroupsV1Mixin0InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiProfileGroupResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/profile_groups/get_user_groups_v1_parameters.go b/falcon/client/profile_groups/get_user_groups_v1_parameters.go new file mode 100644 index 000000000..0fd65cf0a --- /dev/null +++ b/falcon/client/profile_groups/get_user_groups_v1_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewGetUserGroupsV1Params creates a new GetUserGroupsV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetUserGroupsV1Params() *GetUserGroupsV1Params { + return &GetUserGroupsV1Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetUserGroupsV1ParamsWithTimeout creates a new GetUserGroupsV1Params object +// with the ability to set a timeout on a request. +func NewGetUserGroupsV1ParamsWithTimeout(timeout time.Duration) *GetUserGroupsV1Params { + return &GetUserGroupsV1Params{ + timeout: timeout, + } +} + +// NewGetUserGroupsV1ParamsWithContext creates a new GetUserGroupsV1Params object +// with the ability to set a context for a request. +func NewGetUserGroupsV1ParamsWithContext(ctx context.Context) *GetUserGroupsV1Params { + return &GetUserGroupsV1Params{ + Context: ctx, + } +} + +// NewGetUserGroupsV1ParamsWithHTTPClient creates a new GetUserGroupsV1Params object +// with the ability to set a custom HTTPClient for a request. +func NewGetUserGroupsV1ParamsWithHTTPClient(client *http.Client) *GetUserGroupsV1Params { + return &GetUserGroupsV1Params{ + HTTPClient: client, + } +} + +/* +GetUserGroupsV1Params contains all the parameters to send to the API endpoint + + for the get user groups v1 operation. + + Typically these are written to a http.Request. +*/ +type GetUserGroupsV1Params struct { + + // Body. + Body *models.FlightcontrolapiUserGroupsRequestV1 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get user groups v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetUserGroupsV1Params) WithDefaults() *GetUserGroupsV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get user groups v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetUserGroupsV1Params) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get user groups v1 params +func (o *GetUserGroupsV1Params) WithTimeout(timeout time.Duration) *GetUserGroupsV1Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get user groups v1 params +func (o *GetUserGroupsV1Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get user groups v1 params +func (o *GetUserGroupsV1Params) WithContext(ctx context.Context) *GetUserGroupsV1Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get user groups v1 params +func (o *GetUserGroupsV1Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get user groups v1 params +func (o *GetUserGroupsV1Params) WithHTTPClient(client *http.Client) *GetUserGroupsV1Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get user groups v1 params +func (o *GetUserGroupsV1Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the get user groups v1 params +func (o *GetUserGroupsV1Params) WithBody(body *models.FlightcontrolapiUserGroupsRequestV1) *GetUserGroupsV1Params { + o.SetBody(body) + return o +} + +// SetBody adds the body to the get user groups v1 params +func (o *GetUserGroupsV1Params) SetBody(body *models.FlightcontrolapiUserGroupsRequestV1) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *GetUserGroupsV1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/profile_groups/get_user_groups_v1_responses.go b/falcon/client/profile_groups/get_user_groups_v1_responses.go new file mode 100644 index 000000000..3a8ab5c84 --- /dev/null +++ b/falcon/client/profile_groups/get_user_groups_v1_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// GetUserGroupsV1Reader is a Reader for the GetUserGroupsV1 structure. +type GetUserGroupsV1Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetUserGroupsV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetUserGroupsV1OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGetUserGroupsV1BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetUserGroupsV1Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewGetUserGroupsV1TooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetUserGroupsV1InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /user-management/entities/user-groups/GET/v1] GetUserGroupsV1", response, response.Code()) + } +} + +// NewGetUserGroupsV1OK creates a GetUserGroupsV1OK with default headers values +func NewGetUserGroupsV1OK() *GetUserGroupsV1OK { + return &GetUserGroupsV1OK{} +} + +/* +GetUserGroupsV1OK describes a response with status code 200, with default header values. + +OK +*/ +type GetUserGroupsV1OK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiUserGroupsResponseV1 +} + +// IsSuccess returns true when this get user groups v1 o k response has a 2xx status code +func (o *GetUserGroupsV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get user groups v1 o k response has a 3xx status code +func (o *GetUserGroupsV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get user groups v1 o k response has a 4xx status code +func (o *GetUserGroupsV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get user groups v1 o k response has a 5xx status code +func (o *GetUserGroupsV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this get user groups v1 o k response a status code equal to that given +func (o *GetUserGroupsV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get user groups v1 o k response +func (o *GetUserGroupsV1OK) Code() int { + return 200 +} + +func (o *GetUserGroupsV1OK) Error() string { + return fmt.Sprintf("[POST /user-management/entities/user-groups/GET/v1][%d] getUserGroupsV1OK %+v", 200, o.Payload) +} + +func (o *GetUserGroupsV1OK) String() string { + return fmt.Sprintf("[POST /user-management/entities/user-groups/GET/v1][%d] getUserGroupsV1OK %+v", 200, o.Payload) +} + +func (o *GetUserGroupsV1OK) GetPayload() *models.FlightcontrolapiUserGroupsResponseV1 { + return o.Payload +} + +func (o *GetUserGroupsV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiUserGroupsResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUserGroupsV1BadRequest creates a GetUserGroupsV1BadRequest with default headers values +func NewGetUserGroupsV1BadRequest() *GetUserGroupsV1BadRequest { + return &GetUserGroupsV1BadRequest{} +} + +/* +GetUserGroupsV1BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GetUserGroupsV1BadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiUserGroupsResponseV1 +} + +// IsSuccess returns true when this get user groups v1 bad request response has a 2xx status code +func (o *GetUserGroupsV1BadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get user groups v1 bad request response has a 3xx status code +func (o *GetUserGroupsV1BadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get user groups v1 bad request response has a 4xx status code +func (o *GetUserGroupsV1BadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this get user groups v1 bad request response has a 5xx status code +func (o *GetUserGroupsV1BadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this get user groups v1 bad request response a status code equal to that given +func (o *GetUserGroupsV1BadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the get user groups v1 bad request response +func (o *GetUserGroupsV1BadRequest) Code() int { + return 400 +} + +func (o *GetUserGroupsV1BadRequest) Error() string { + return fmt.Sprintf("[POST /user-management/entities/user-groups/GET/v1][%d] getUserGroupsV1BadRequest %+v", 400, o.Payload) +} + +func (o *GetUserGroupsV1BadRequest) String() string { + return fmt.Sprintf("[POST /user-management/entities/user-groups/GET/v1][%d] getUserGroupsV1BadRequest %+v", 400, o.Payload) +} + +func (o *GetUserGroupsV1BadRequest) GetPayload() *models.FlightcontrolapiUserGroupsResponseV1 { + return o.Payload +} + +func (o *GetUserGroupsV1BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiUserGroupsResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUserGroupsV1Forbidden creates a GetUserGroupsV1Forbidden with default headers values +func NewGetUserGroupsV1Forbidden() *GetUserGroupsV1Forbidden { + return &GetUserGroupsV1Forbidden{} +} + +/* +GetUserGroupsV1Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GetUserGroupsV1Forbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiUserGroupsResponseV1 +} + +// IsSuccess returns true when this get user groups v1 forbidden response has a 2xx status code +func (o *GetUserGroupsV1Forbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get user groups v1 forbidden response has a 3xx status code +func (o *GetUserGroupsV1Forbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get user groups v1 forbidden response has a 4xx status code +func (o *GetUserGroupsV1Forbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get user groups v1 forbidden response has a 5xx status code +func (o *GetUserGroupsV1Forbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get user groups v1 forbidden response a status code equal to that given +func (o *GetUserGroupsV1Forbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get user groups v1 forbidden response +func (o *GetUserGroupsV1Forbidden) Code() int { + return 403 +} + +func (o *GetUserGroupsV1Forbidden) Error() string { + return fmt.Sprintf("[POST /user-management/entities/user-groups/GET/v1][%d] getUserGroupsV1Forbidden %+v", 403, o.Payload) +} + +func (o *GetUserGroupsV1Forbidden) String() string { + return fmt.Sprintf("[POST /user-management/entities/user-groups/GET/v1][%d] getUserGroupsV1Forbidden %+v", 403, o.Payload) +} + +func (o *GetUserGroupsV1Forbidden) GetPayload() *models.FlightcontrolapiUserGroupsResponseV1 { + return o.Payload +} + +func (o *GetUserGroupsV1Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiUserGroupsResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUserGroupsV1TooManyRequests creates a GetUserGroupsV1TooManyRequests with default headers values +func NewGetUserGroupsV1TooManyRequests() *GetUserGroupsV1TooManyRequests { + return &GetUserGroupsV1TooManyRequests{} +} + +/* +GetUserGroupsV1TooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type GetUserGroupsV1TooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this get user groups v1 too many requests response has a 2xx status code +func (o *GetUserGroupsV1TooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get user groups v1 too many requests response has a 3xx status code +func (o *GetUserGroupsV1TooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get user groups v1 too many requests response has a 4xx status code +func (o *GetUserGroupsV1TooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this get user groups v1 too many requests response has a 5xx status code +func (o *GetUserGroupsV1TooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this get user groups v1 too many requests response a status code equal to that given +func (o *GetUserGroupsV1TooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the get user groups v1 too many requests response +func (o *GetUserGroupsV1TooManyRequests) Code() int { + return 429 +} + +func (o *GetUserGroupsV1TooManyRequests) Error() string { + return fmt.Sprintf("[POST /user-management/entities/user-groups/GET/v1][%d] getUserGroupsV1TooManyRequests %+v", 429, o.Payload) +} + +func (o *GetUserGroupsV1TooManyRequests) String() string { + return fmt.Sprintf("[POST /user-management/entities/user-groups/GET/v1][%d] getUserGroupsV1TooManyRequests %+v", 429, o.Payload) +} + +func (o *GetUserGroupsV1TooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GetUserGroupsV1TooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUserGroupsV1InternalServerError creates a GetUserGroupsV1InternalServerError with default headers values +func NewGetUserGroupsV1InternalServerError() *GetUserGroupsV1InternalServerError { + return &GetUserGroupsV1InternalServerError{} +} + +/* +GetUserGroupsV1InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GetUserGroupsV1InternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiUserGroupsResponseV1 +} + +// IsSuccess returns true when this get user groups v1 internal server error response has a 2xx status code +func (o *GetUserGroupsV1InternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get user groups v1 internal server error response has a 3xx status code +func (o *GetUserGroupsV1InternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get user groups v1 internal server error response has a 4xx status code +func (o *GetUserGroupsV1InternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get user groups v1 internal server error response has a 5xx status code +func (o *GetUserGroupsV1InternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get user groups v1 internal server error response a status code equal to that given +func (o *GetUserGroupsV1InternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get user groups v1 internal server error response +func (o *GetUserGroupsV1InternalServerError) Code() int { + return 500 +} + +func (o *GetUserGroupsV1InternalServerError) Error() string { + return fmt.Sprintf("[POST /user-management/entities/user-groups/GET/v1][%d] getUserGroupsV1InternalServerError %+v", 500, o.Payload) +} + +func (o *GetUserGroupsV1InternalServerError) String() string { + return fmt.Sprintf("[POST /user-management/entities/user-groups/GET/v1][%d] getUserGroupsV1InternalServerError %+v", 500, o.Payload) +} + +func (o *GetUserGroupsV1InternalServerError) GetPayload() *models.FlightcontrolapiUserGroupsResponseV1 { + return o.Payload +} + +func (o *GetUserGroupsV1InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiUserGroupsResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/profile_groups/group_actions_v1_mixin0_parameters.go b/falcon/client/profile_groups/group_actions_v1_mixin0_parameters.go new file mode 100644 index 000000000..5aa30326e --- /dev/null +++ b/falcon/client/profile_groups/group_actions_v1_mixin0_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewGroupActionsV1Mixin0Params creates a new GroupActionsV1Mixin0Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGroupActionsV1Mixin0Params() *GroupActionsV1Mixin0Params { + return &GroupActionsV1Mixin0Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewGroupActionsV1Mixin0ParamsWithTimeout creates a new GroupActionsV1Mixin0Params object +// with the ability to set a timeout on a request. +func NewGroupActionsV1Mixin0ParamsWithTimeout(timeout time.Duration) *GroupActionsV1Mixin0Params { + return &GroupActionsV1Mixin0Params{ + timeout: timeout, + } +} + +// NewGroupActionsV1Mixin0ParamsWithContext creates a new GroupActionsV1Mixin0Params object +// with the ability to set a context for a request. +func NewGroupActionsV1Mixin0ParamsWithContext(ctx context.Context) *GroupActionsV1Mixin0Params { + return &GroupActionsV1Mixin0Params{ + Context: ctx, + } +} + +// NewGroupActionsV1Mixin0ParamsWithHTTPClient creates a new GroupActionsV1Mixin0Params object +// with the ability to set a custom HTTPClient for a request. +func NewGroupActionsV1Mixin0ParamsWithHTTPClient(client *http.Client) *GroupActionsV1Mixin0Params { + return &GroupActionsV1Mixin0Params{ + HTTPClient: client, + } +} + +/* +GroupActionsV1Mixin0Params contains all the parameters to send to the API endpoint + + for the group actions v1 mixin0 operation. + + Typically these are written to a http.Request. +*/ +type GroupActionsV1Mixin0Params struct { + + /* ActionName. + + Action to perform + */ + ActionName string + + // Body. + Body *models.MsaEntityActionRequestV3 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the group actions v1 mixin0 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GroupActionsV1Mixin0Params) WithDefaults() *GroupActionsV1Mixin0Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the group actions v1 mixin0 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GroupActionsV1Mixin0Params) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the group actions v1 mixin0 params +func (o *GroupActionsV1Mixin0Params) WithTimeout(timeout time.Duration) *GroupActionsV1Mixin0Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the group actions v1 mixin0 params +func (o *GroupActionsV1Mixin0Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the group actions v1 mixin0 params +func (o *GroupActionsV1Mixin0Params) WithContext(ctx context.Context) *GroupActionsV1Mixin0Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the group actions v1 mixin0 params +func (o *GroupActionsV1Mixin0Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the group actions v1 mixin0 params +func (o *GroupActionsV1Mixin0Params) WithHTTPClient(client *http.Client) *GroupActionsV1Mixin0Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the group actions v1 mixin0 params +func (o *GroupActionsV1Mixin0Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithActionName adds the actionName to the group actions v1 mixin0 params +func (o *GroupActionsV1Mixin0Params) WithActionName(actionName string) *GroupActionsV1Mixin0Params { + o.SetActionName(actionName) + return o +} + +// SetActionName adds the actionName to the group actions v1 mixin0 params +func (o *GroupActionsV1Mixin0Params) SetActionName(actionName string) { + o.ActionName = actionName +} + +// WithBody adds the body to the group actions v1 mixin0 params +func (o *GroupActionsV1Mixin0Params) WithBody(body *models.MsaEntityActionRequestV3) *GroupActionsV1Mixin0Params { + o.SetBody(body) + return o +} + +// SetBody adds the body to the group actions v1 mixin0 params +func (o *GroupActionsV1Mixin0Params) SetBody(body *models.MsaEntityActionRequestV3) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *GroupActionsV1Mixin0Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param action_name + qrActionName := o.ActionName + qActionName := qrActionName + if qActionName != "" { + + if err := r.SetQueryParam("action_name", qActionName); err != nil { + return err + } + } + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/profile_groups/group_actions_v1_mixin0_responses.go b/falcon/client/profile_groups/group_actions_v1_mixin0_responses.go new file mode 100644 index 000000000..7ebd58ba4 --- /dev/null +++ b/falcon/client/profile_groups/group_actions_v1_mixin0_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// GroupActionsV1Mixin0Reader is a Reader for the GroupActionsV1Mixin0 structure. +type GroupActionsV1Mixin0Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GroupActionsV1Mixin0Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGroupActionsV1Mixin0OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGroupActionsV1Mixin0BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGroupActionsV1Mixin0Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewGroupActionsV1Mixin0TooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGroupActionsV1Mixin0InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /user-management/entities/group-actions/v1] GroupActionsV1Mixin0", response, response.Code()) + } +} + +// NewGroupActionsV1Mixin0OK creates a GroupActionsV1Mixin0OK with default headers values +func NewGroupActionsV1Mixin0OK() *GroupActionsV1Mixin0OK { + return &GroupActionsV1Mixin0OK{} +} + +/* +GroupActionsV1Mixin0OK describes a response with status code 200, with default header values. + +OK +*/ +type GroupActionsV1Mixin0OK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this group actions v1 mixin0 o k response has a 2xx status code +func (o *GroupActionsV1Mixin0OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this group actions v1 mixin0 o k response has a 3xx status code +func (o *GroupActionsV1Mixin0OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this group actions v1 mixin0 o k response has a 4xx status code +func (o *GroupActionsV1Mixin0OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this group actions v1 mixin0 o k response has a 5xx status code +func (o *GroupActionsV1Mixin0OK) IsServerError() bool { + return false +} + +// IsCode returns true when this group actions v1 mixin0 o k response a status code equal to that given +func (o *GroupActionsV1Mixin0OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the group actions v1 mixin0 o k response +func (o *GroupActionsV1Mixin0OK) Code() int { + return 200 +} + +func (o *GroupActionsV1Mixin0OK) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-actions/v1][%d] groupActionsV1Mixin0OK %+v", 200, o.Payload) +} + +func (o *GroupActionsV1Mixin0OK) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-actions/v1][%d] groupActionsV1Mixin0OK %+v", 200, o.Payload) +} + +func (o *GroupActionsV1Mixin0OK) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *GroupActionsV1Mixin0OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGroupActionsV1Mixin0BadRequest creates a GroupActionsV1Mixin0BadRequest with default headers values +func NewGroupActionsV1Mixin0BadRequest() *GroupActionsV1Mixin0BadRequest { + return &GroupActionsV1Mixin0BadRequest{} +} + +/* +GroupActionsV1Mixin0BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GroupActionsV1Mixin0BadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this group actions v1 mixin0 bad request response has a 2xx status code +func (o *GroupActionsV1Mixin0BadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this group actions v1 mixin0 bad request response has a 3xx status code +func (o *GroupActionsV1Mixin0BadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this group actions v1 mixin0 bad request response has a 4xx status code +func (o *GroupActionsV1Mixin0BadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this group actions v1 mixin0 bad request response has a 5xx status code +func (o *GroupActionsV1Mixin0BadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this group actions v1 mixin0 bad request response a status code equal to that given +func (o *GroupActionsV1Mixin0BadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the group actions v1 mixin0 bad request response +func (o *GroupActionsV1Mixin0BadRequest) Code() int { + return 400 +} + +func (o *GroupActionsV1Mixin0BadRequest) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-actions/v1][%d] groupActionsV1Mixin0BadRequest %+v", 400, o.Payload) +} + +func (o *GroupActionsV1Mixin0BadRequest) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-actions/v1][%d] groupActionsV1Mixin0BadRequest %+v", 400, o.Payload) +} + +func (o *GroupActionsV1Mixin0BadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *GroupActionsV1Mixin0BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGroupActionsV1Mixin0Forbidden creates a GroupActionsV1Mixin0Forbidden with default headers values +func NewGroupActionsV1Mixin0Forbidden() *GroupActionsV1Mixin0Forbidden { + return &GroupActionsV1Mixin0Forbidden{} +} + +/* +GroupActionsV1Mixin0Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GroupActionsV1Mixin0Forbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this group actions v1 mixin0 forbidden response has a 2xx status code +func (o *GroupActionsV1Mixin0Forbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this group actions v1 mixin0 forbidden response has a 3xx status code +func (o *GroupActionsV1Mixin0Forbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this group actions v1 mixin0 forbidden response has a 4xx status code +func (o *GroupActionsV1Mixin0Forbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this group actions v1 mixin0 forbidden response has a 5xx status code +func (o *GroupActionsV1Mixin0Forbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this group actions v1 mixin0 forbidden response a status code equal to that given +func (o *GroupActionsV1Mixin0Forbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the group actions v1 mixin0 forbidden response +func (o *GroupActionsV1Mixin0Forbidden) Code() int { + return 403 +} + +func (o *GroupActionsV1Mixin0Forbidden) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-actions/v1][%d] groupActionsV1Mixin0Forbidden %+v", 403, o.Payload) +} + +func (o *GroupActionsV1Mixin0Forbidden) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-actions/v1][%d] groupActionsV1Mixin0Forbidden %+v", 403, o.Payload) +} + +func (o *GroupActionsV1Mixin0Forbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *GroupActionsV1Mixin0Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGroupActionsV1Mixin0TooManyRequests creates a GroupActionsV1Mixin0TooManyRequests with default headers values +func NewGroupActionsV1Mixin0TooManyRequests() *GroupActionsV1Mixin0TooManyRequests { + return &GroupActionsV1Mixin0TooManyRequests{} +} + +/* +GroupActionsV1Mixin0TooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type GroupActionsV1Mixin0TooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this group actions v1 mixin0 too many requests response has a 2xx status code +func (o *GroupActionsV1Mixin0TooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this group actions v1 mixin0 too many requests response has a 3xx status code +func (o *GroupActionsV1Mixin0TooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this group actions v1 mixin0 too many requests response has a 4xx status code +func (o *GroupActionsV1Mixin0TooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this group actions v1 mixin0 too many requests response has a 5xx status code +func (o *GroupActionsV1Mixin0TooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this group actions v1 mixin0 too many requests response a status code equal to that given +func (o *GroupActionsV1Mixin0TooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the group actions v1 mixin0 too many requests response +func (o *GroupActionsV1Mixin0TooManyRequests) Code() int { + return 429 +} + +func (o *GroupActionsV1Mixin0TooManyRequests) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-actions/v1][%d] groupActionsV1Mixin0TooManyRequests %+v", 429, o.Payload) +} + +func (o *GroupActionsV1Mixin0TooManyRequests) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-actions/v1][%d] groupActionsV1Mixin0TooManyRequests %+v", 429, o.Payload) +} + +func (o *GroupActionsV1Mixin0TooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GroupActionsV1Mixin0TooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGroupActionsV1Mixin0InternalServerError creates a GroupActionsV1Mixin0InternalServerError with default headers values +func NewGroupActionsV1Mixin0InternalServerError() *GroupActionsV1Mixin0InternalServerError { + return &GroupActionsV1Mixin0InternalServerError{} +} + +/* +GroupActionsV1Mixin0InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GroupActionsV1Mixin0InternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this group actions v1 mixin0 internal server error response has a 2xx status code +func (o *GroupActionsV1Mixin0InternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this group actions v1 mixin0 internal server error response has a 3xx status code +func (o *GroupActionsV1Mixin0InternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this group actions v1 mixin0 internal server error response has a 4xx status code +func (o *GroupActionsV1Mixin0InternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this group actions v1 mixin0 internal server error response has a 5xx status code +func (o *GroupActionsV1Mixin0InternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this group actions v1 mixin0 internal server error response a status code equal to that given +func (o *GroupActionsV1Mixin0InternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the group actions v1 mixin0 internal server error response +func (o *GroupActionsV1Mixin0InternalServerError) Code() int { + return 500 +} + +func (o *GroupActionsV1Mixin0InternalServerError) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-actions/v1][%d] groupActionsV1Mixin0InternalServerError %+v", 500, o.Payload) +} + +func (o *GroupActionsV1Mixin0InternalServerError) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-actions/v1][%d] groupActionsV1Mixin0InternalServerError %+v", 500, o.Payload) +} + +func (o *GroupActionsV1Mixin0InternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *GroupActionsV1Mixin0InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/profile_groups/group_users_actions_v1_mixin0_parameters.go b/falcon/client/profile_groups/group_users_actions_v1_mixin0_parameters.go new file mode 100644 index 000000000..908e2f4cb --- /dev/null +++ b/falcon/client/profile_groups/group_users_actions_v1_mixin0_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewGroupUsersActionsV1Mixin0Params creates a new GroupUsersActionsV1Mixin0Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGroupUsersActionsV1Mixin0Params() *GroupUsersActionsV1Mixin0Params { + return &GroupUsersActionsV1Mixin0Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewGroupUsersActionsV1Mixin0ParamsWithTimeout creates a new GroupUsersActionsV1Mixin0Params object +// with the ability to set a timeout on a request. +func NewGroupUsersActionsV1Mixin0ParamsWithTimeout(timeout time.Duration) *GroupUsersActionsV1Mixin0Params { + return &GroupUsersActionsV1Mixin0Params{ + timeout: timeout, + } +} + +// NewGroupUsersActionsV1Mixin0ParamsWithContext creates a new GroupUsersActionsV1Mixin0Params object +// with the ability to set a context for a request. +func NewGroupUsersActionsV1Mixin0ParamsWithContext(ctx context.Context) *GroupUsersActionsV1Mixin0Params { + return &GroupUsersActionsV1Mixin0Params{ + Context: ctx, + } +} + +// NewGroupUsersActionsV1Mixin0ParamsWithHTTPClient creates a new GroupUsersActionsV1Mixin0Params object +// with the ability to set a custom HTTPClient for a request. +func NewGroupUsersActionsV1Mixin0ParamsWithHTTPClient(client *http.Client) *GroupUsersActionsV1Mixin0Params { + return &GroupUsersActionsV1Mixin0Params{ + HTTPClient: client, + } +} + +/* +GroupUsersActionsV1Mixin0Params contains all the parameters to send to the API endpoint + + for the group users actions v1 mixin0 operation. + + Typically these are written to a http.Request. +*/ +type GroupUsersActionsV1Mixin0Params struct { + + /* ActionName. + + Action to perform + */ + ActionName string + + // Body. + Body *models.MsaEntityActionRequestV3 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the group users actions v1 mixin0 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GroupUsersActionsV1Mixin0Params) WithDefaults() *GroupUsersActionsV1Mixin0Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the group users actions v1 mixin0 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GroupUsersActionsV1Mixin0Params) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the group users actions v1 mixin0 params +func (o *GroupUsersActionsV1Mixin0Params) WithTimeout(timeout time.Duration) *GroupUsersActionsV1Mixin0Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the group users actions v1 mixin0 params +func (o *GroupUsersActionsV1Mixin0Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the group users actions v1 mixin0 params +func (o *GroupUsersActionsV1Mixin0Params) WithContext(ctx context.Context) *GroupUsersActionsV1Mixin0Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the group users actions v1 mixin0 params +func (o *GroupUsersActionsV1Mixin0Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the group users actions v1 mixin0 params +func (o *GroupUsersActionsV1Mixin0Params) WithHTTPClient(client *http.Client) *GroupUsersActionsV1Mixin0Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the group users actions v1 mixin0 params +func (o *GroupUsersActionsV1Mixin0Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithActionName adds the actionName to the group users actions v1 mixin0 params +func (o *GroupUsersActionsV1Mixin0Params) WithActionName(actionName string) *GroupUsersActionsV1Mixin0Params { + o.SetActionName(actionName) + return o +} + +// SetActionName adds the actionName to the group users actions v1 mixin0 params +func (o *GroupUsersActionsV1Mixin0Params) SetActionName(actionName string) { + o.ActionName = actionName +} + +// WithBody adds the body to the group users actions v1 mixin0 params +func (o *GroupUsersActionsV1Mixin0Params) WithBody(body *models.MsaEntityActionRequestV3) *GroupUsersActionsV1Mixin0Params { + o.SetBody(body) + return o +} + +// SetBody adds the body to the group users actions v1 mixin0 params +func (o *GroupUsersActionsV1Mixin0Params) SetBody(body *models.MsaEntityActionRequestV3) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *GroupUsersActionsV1Mixin0Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param action_name + qrActionName := o.ActionName + qActionName := qrActionName + if qActionName != "" { + + if err := r.SetQueryParam("action_name", qActionName); err != nil { + return err + } + } + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/profile_groups/group_users_actions_v1_mixin0_responses.go b/falcon/client/profile_groups/group_users_actions_v1_mixin0_responses.go new file mode 100644 index 000000000..fa0aec8dc --- /dev/null +++ b/falcon/client/profile_groups/group_users_actions_v1_mixin0_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// GroupUsersActionsV1Mixin0Reader is a Reader for the GroupUsersActionsV1Mixin0 structure. +type GroupUsersActionsV1Mixin0Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GroupUsersActionsV1Mixin0Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGroupUsersActionsV1Mixin0OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGroupUsersActionsV1Mixin0BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGroupUsersActionsV1Mixin0Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewGroupUsersActionsV1Mixin0TooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGroupUsersActionsV1Mixin0InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /user-management/entities/group-users-actions/v1] GroupUsersActionsV1Mixin0", response, response.Code()) + } +} + +// NewGroupUsersActionsV1Mixin0OK creates a GroupUsersActionsV1Mixin0OK with default headers values +func NewGroupUsersActionsV1Mixin0OK() *GroupUsersActionsV1Mixin0OK { + return &GroupUsersActionsV1Mixin0OK{} +} + +/* +GroupUsersActionsV1Mixin0OK describes a response with status code 200, with default header values. + +OK +*/ +type GroupUsersActionsV1Mixin0OK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this group users actions v1 mixin0 o k response has a 2xx status code +func (o *GroupUsersActionsV1Mixin0OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this group users actions v1 mixin0 o k response has a 3xx status code +func (o *GroupUsersActionsV1Mixin0OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this group users actions v1 mixin0 o k response has a 4xx status code +func (o *GroupUsersActionsV1Mixin0OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this group users actions v1 mixin0 o k response has a 5xx status code +func (o *GroupUsersActionsV1Mixin0OK) IsServerError() bool { + return false +} + +// IsCode returns true when this group users actions v1 mixin0 o k response a status code equal to that given +func (o *GroupUsersActionsV1Mixin0OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the group users actions v1 mixin0 o k response +func (o *GroupUsersActionsV1Mixin0OK) Code() int { + return 200 +} + +func (o *GroupUsersActionsV1Mixin0OK) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-users-actions/v1][%d] groupUsersActionsV1Mixin0OK %+v", 200, o.Payload) +} + +func (o *GroupUsersActionsV1Mixin0OK) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-users-actions/v1][%d] groupUsersActionsV1Mixin0OK %+v", 200, o.Payload) +} + +func (o *GroupUsersActionsV1Mixin0OK) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *GroupUsersActionsV1Mixin0OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGroupUsersActionsV1Mixin0BadRequest creates a GroupUsersActionsV1Mixin0BadRequest with default headers values +func NewGroupUsersActionsV1Mixin0BadRequest() *GroupUsersActionsV1Mixin0BadRequest { + return &GroupUsersActionsV1Mixin0BadRequest{} +} + +/* +GroupUsersActionsV1Mixin0BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GroupUsersActionsV1Mixin0BadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this group users actions v1 mixin0 bad request response has a 2xx status code +func (o *GroupUsersActionsV1Mixin0BadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this group users actions v1 mixin0 bad request response has a 3xx status code +func (o *GroupUsersActionsV1Mixin0BadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this group users actions v1 mixin0 bad request response has a 4xx status code +func (o *GroupUsersActionsV1Mixin0BadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this group users actions v1 mixin0 bad request response has a 5xx status code +func (o *GroupUsersActionsV1Mixin0BadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this group users actions v1 mixin0 bad request response a status code equal to that given +func (o *GroupUsersActionsV1Mixin0BadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the group users actions v1 mixin0 bad request response +func (o *GroupUsersActionsV1Mixin0BadRequest) Code() int { + return 400 +} + +func (o *GroupUsersActionsV1Mixin0BadRequest) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-users-actions/v1][%d] groupUsersActionsV1Mixin0BadRequest %+v", 400, o.Payload) +} + +func (o *GroupUsersActionsV1Mixin0BadRequest) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-users-actions/v1][%d] groupUsersActionsV1Mixin0BadRequest %+v", 400, o.Payload) +} + +func (o *GroupUsersActionsV1Mixin0BadRequest) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *GroupUsersActionsV1Mixin0BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGroupUsersActionsV1Mixin0Forbidden creates a GroupUsersActionsV1Mixin0Forbidden with default headers values +func NewGroupUsersActionsV1Mixin0Forbidden() *GroupUsersActionsV1Mixin0Forbidden { + return &GroupUsersActionsV1Mixin0Forbidden{} +} + +/* +GroupUsersActionsV1Mixin0Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GroupUsersActionsV1Mixin0Forbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this group users actions v1 mixin0 forbidden response has a 2xx status code +func (o *GroupUsersActionsV1Mixin0Forbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this group users actions v1 mixin0 forbidden response has a 3xx status code +func (o *GroupUsersActionsV1Mixin0Forbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this group users actions v1 mixin0 forbidden response has a 4xx status code +func (o *GroupUsersActionsV1Mixin0Forbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this group users actions v1 mixin0 forbidden response has a 5xx status code +func (o *GroupUsersActionsV1Mixin0Forbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this group users actions v1 mixin0 forbidden response a status code equal to that given +func (o *GroupUsersActionsV1Mixin0Forbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the group users actions v1 mixin0 forbidden response +func (o *GroupUsersActionsV1Mixin0Forbidden) Code() int { + return 403 +} + +func (o *GroupUsersActionsV1Mixin0Forbidden) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-users-actions/v1][%d] groupUsersActionsV1Mixin0Forbidden %+v", 403, o.Payload) +} + +func (o *GroupUsersActionsV1Mixin0Forbidden) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-users-actions/v1][%d] groupUsersActionsV1Mixin0Forbidden %+v", 403, o.Payload) +} + +func (o *GroupUsersActionsV1Mixin0Forbidden) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *GroupUsersActionsV1Mixin0Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGroupUsersActionsV1Mixin0TooManyRequests creates a GroupUsersActionsV1Mixin0TooManyRequests with default headers values +func NewGroupUsersActionsV1Mixin0TooManyRequests() *GroupUsersActionsV1Mixin0TooManyRequests { + return &GroupUsersActionsV1Mixin0TooManyRequests{} +} + +/* +GroupUsersActionsV1Mixin0TooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type GroupUsersActionsV1Mixin0TooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this group users actions v1 mixin0 too many requests response has a 2xx status code +func (o *GroupUsersActionsV1Mixin0TooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this group users actions v1 mixin0 too many requests response has a 3xx status code +func (o *GroupUsersActionsV1Mixin0TooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this group users actions v1 mixin0 too many requests response has a 4xx status code +func (o *GroupUsersActionsV1Mixin0TooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this group users actions v1 mixin0 too many requests response has a 5xx status code +func (o *GroupUsersActionsV1Mixin0TooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this group users actions v1 mixin0 too many requests response a status code equal to that given +func (o *GroupUsersActionsV1Mixin0TooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the group users actions v1 mixin0 too many requests response +func (o *GroupUsersActionsV1Mixin0TooManyRequests) Code() int { + return 429 +} + +func (o *GroupUsersActionsV1Mixin0TooManyRequests) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-users-actions/v1][%d] groupUsersActionsV1Mixin0TooManyRequests %+v", 429, o.Payload) +} + +func (o *GroupUsersActionsV1Mixin0TooManyRequests) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-users-actions/v1][%d] groupUsersActionsV1Mixin0TooManyRequests %+v", 429, o.Payload) +} + +func (o *GroupUsersActionsV1Mixin0TooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *GroupUsersActionsV1Mixin0TooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGroupUsersActionsV1Mixin0InternalServerError creates a GroupUsersActionsV1Mixin0InternalServerError with default headers values +func NewGroupUsersActionsV1Mixin0InternalServerError() *GroupUsersActionsV1Mixin0InternalServerError { + return &GroupUsersActionsV1Mixin0InternalServerError{} +} + +/* +GroupUsersActionsV1Mixin0InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GroupUsersActionsV1Mixin0InternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecResponseFields +} + +// IsSuccess returns true when this group users actions v1 mixin0 internal server error response has a 2xx status code +func (o *GroupUsersActionsV1Mixin0InternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this group users actions v1 mixin0 internal server error response has a 3xx status code +func (o *GroupUsersActionsV1Mixin0InternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this group users actions v1 mixin0 internal server error response has a 4xx status code +func (o *GroupUsersActionsV1Mixin0InternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this group users actions v1 mixin0 internal server error response has a 5xx status code +func (o *GroupUsersActionsV1Mixin0InternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this group users actions v1 mixin0 internal server error response a status code equal to that given +func (o *GroupUsersActionsV1Mixin0InternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the group users actions v1 mixin0 internal server error response +func (o *GroupUsersActionsV1Mixin0InternalServerError) Code() int { + return 500 +} + +func (o *GroupUsersActionsV1Mixin0InternalServerError) Error() string { + return fmt.Sprintf("[POST /user-management/entities/group-users-actions/v1][%d] groupUsersActionsV1Mixin0InternalServerError %+v", 500, o.Payload) +} + +func (o *GroupUsersActionsV1Mixin0InternalServerError) String() string { + return fmt.Sprintf("[POST /user-management/entities/group-users-actions/v1][%d] groupUsersActionsV1Mixin0InternalServerError %+v", 500, o.Payload) +} + +func (o *GroupUsersActionsV1Mixin0InternalServerError) GetPayload() *models.MsaspecResponseFields { + return o.Payload +} + +func (o *GroupUsersActionsV1Mixin0InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecResponseFields) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/profile_groups/profile_groups_client.go b/falcon/client/profile_groups/profile_groups_client.go new file mode 100644 index 000000000..494212f5c --- /dev/null +++ b/falcon/client/profile_groups/profile_groups_client.go @@ -0,0 +1,476 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new profile groups API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for profile groups API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + CreateGroupV1Mixin0(params *CreateGroupV1Mixin0Params, opts ...ClientOption) (*CreateGroupV1Mixin0Created, error) + + DeleteGroupsV1(params *DeleteGroupsV1Params, opts ...ClientOption) (*DeleteGroupsV1OK, error) + + GetGroupUsersV1(params *GetGroupUsersV1Params, opts ...ClientOption) (*GetGroupUsersV1OK, error) + + GetGroupsV1Mixin0(params *GetGroupsV1Mixin0Params, opts ...ClientOption) (*GetGroupsV1Mixin0OK, error) + + GetUserGroupsV1(params *GetUserGroupsV1Params, opts ...ClientOption) (*GetUserGroupsV1OK, error) + + GroupActionsV1Mixin0(params *GroupActionsV1Mixin0Params, opts ...ClientOption) (*GroupActionsV1Mixin0OK, error) + + GroupUsersActionsV1Mixin0(params *GroupUsersActionsV1Mixin0Params, opts ...ClientOption) (*GroupUsersActionsV1Mixin0OK, error) + + QueryGroupsV1Mixin0(params *QueryGroupsV1Mixin0Params, opts ...ClientOption) (*QueryGroupsV1Mixin0OK, error) + + UpdateGroupV1Mixin0(params *UpdateGroupV1Mixin0Params, opts ...ClientOption) (*UpdateGroupV1Mixin0OK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + CreateGroupV1Mixin0 creates a new profile group + + Creates a new profile group. + +The group name is required and must be unique within the customer. Description is optional. + +In a Flight Control environment, CID can be used to specify which CID to create the group in. +*/ +func (a *Client) CreateGroupV1Mixin0(params *CreateGroupV1Mixin0Params, opts ...ClientOption) (*CreateGroupV1Mixin0Created, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCreateGroupV1Mixin0Params() + } + op := &runtime.ClientOperation{ + ID: "CreateGroupV1Mixin0", + Method: "POST", + PathPattern: "/user-management/entities/groups/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CreateGroupV1Mixin0Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CreateGroupV1Mixin0Created) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for CreateGroupV1Mixin0: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DeleteGroupsV1 deletes profile groups by i ds + + Deletes profile groups by IDs. + +Multiple group IDs can be specified. Deletion is idempotent - deleting a non-existent group does not produce an error. + +Users assigned only to deleted groups will lose their profile group-derived access when enforcement is enabled. +*/ +func (a *Client) DeleteGroupsV1(params *DeleteGroupsV1Params, opts ...ClientOption) (*DeleteGroupsV1OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteGroupsV1Params() + } + op := &runtime.ClientOperation{ + ID: "DeleteGroupsV1", + Method: "DELETE", + PathPattern: "/user-management/entities/groups/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &DeleteGroupsV1Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteGroupsV1OK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for DeleteGroupsV1: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetGroupUsersV1 gets a list of groups with users that belong to them + + Returns information about a group's users in a profile group. + +`ids` should be the list of requested group IDs to get group user info on. + +If the actor's CID is a parent, users on child CIDs may be requested and group user info may be returned as long as profile groups are available on the child CIDs. +*/ +func (a *Client) GetGroupUsersV1(params *GetGroupUsersV1Params, opts ...ClientOption) (*GetGroupUsersV1OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetGroupUsersV1Params() + } + op := &runtime.ClientOperation{ + ID: "GetGroupUsersV1", + Method: "POST", + PathPattern: "/user-management/entities/group-users/GET/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &GetGroupUsersV1Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetGroupUsersV1OK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for GetGroupUsersV1: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetGroupsV1Mixin0 gets profile groups by i ds with full details + + Returns profile groups with details, such as role, user group, and fine-grained access. + +`ids` should be the list of requested group IDs. + +If the actor's CID is a parent, then groups for child CIDs may be returned as long as profile groups are available on the child CIDs. +*/ +func (a *Client) GetGroupsV1Mixin0(params *GetGroupsV1Mixin0Params, opts ...ClientOption) (*GetGroupsV1Mixin0OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetGroupsV1Mixin0Params() + } + op := &runtime.ClientOperation{ + ID: "GetGroupsV1Mixin0", + Method: "POST", + PathPattern: "/user-management/entities/groups/GET/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &GetGroupsV1Mixin0Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetGroupsV1Mixin0OK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for GetGroupsV1Mixin0: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetUserGroupsV1 gets a list of users with the groups that they belong to + + Returns information about a user's groups in a profile group. + +`ids` should be the list of requested user UUIDs to get user groups info on. + +If the actor's CID is a parent, users on child CIDs may be requested and user groups info may be returned as long as profile groups are available on the child CIDs. +*/ +func (a *Client) GetUserGroupsV1(params *GetUserGroupsV1Params, opts ...ClientOption) (*GetUserGroupsV1OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetUserGroupsV1Params() + } + op := &runtime.ClientOperation{ + ID: "GetUserGroupsV1", + Method: "POST", + PathPattern: "/user-management/entities/user-groups/GET/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &GetUserGroupsV1Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetUserGroupsV1OK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for GetUserGroupsV1: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GroupActionsV1Mixin0 performs actions on profile groups add remove roles user groups f g a objects + + The available actions are `add_roles`, `remove_roles`, `add_user_groups`, `remove_user_groups`, `add_fga_objects`, and `remove_fga_objects`. + +These actions only work if SCIM enforcement is not enabled for the target customer. A maximum of 100 groups and 100 role assignments can be updated per request. + +`add_roles` assigns roles to users within the specified groups. This action accepts the following action parameters: `{ "name": "cid", "value": "$customer_id" }` and `{ "name": "role_id", "value": "$role_id" }`. Action parameters can be repeated to add multiple roles in a single request. + +`remove_roles` removes role assignments from users within the specified groups. This action accepts the following action parameters: `{ "name": "cid", "value": "$customer_id" }` and `{ "name": "role_id", "value": "$role_id" }`. Action parameters can be repeated to remove multiple roles in a single request. + +`add_user_groups` assigns user groups to users within the specified groups. This action accepts the following action parameters: `{ "name": "cid", "value": "$customer_id" }` and `{ "name": "user_group_id", "value": "$user_group_id" }`. Action parameters can be repeated to add multiple user groups in a single request. + +`remove_user_groups` removes user group assignments from users within the specified groups. This action accepts the following action parameters: `{ "name": "cid", "value": "$customer_id" }` and `{ "name": "user_group_id", "value": "$user_group_id" }`. Action parameters can be repeated to remove multiple user groups in a single request. + +`add_fga_objects` assigns FGA (Fine-Grained Access) objects to users within the specified groups. This action accepts the following action parameters: `{ "name": "cid", "value": "$customer_id" }`, `{ "name": "fga_object_type", "value": "$fga_object_type" }`, and `{ "name": "fga_object_id", "value": "$fga_object_id" }`. Action parameters can be repeated to add multiple FGA objects in a single request. + +`remove_fga_objects` removes FGA (Fine-Grained Access) object assignments from users within the specified groups. This action accepts the following action parameters: `{ "name": "cid", "value": "$customer_id" }`, `{ "name": "fga_object_type", "value": "$fga_object_type" }`, and `{ "name": "fga_object_id", "value": "$fga_object_id" }`. Action parameters can be repeated to remove multiple FGA objects in a single request. + +To add or remove access to "all" of one type of FGA, use the following object IDs: +- All Host Groups: `all_hosts` +- All Cloud Groups: `all_asset_groups` +- All Access Scopes: `all_access_scopes` +*/ +func (a *Client) GroupActionsV1Mixin0(params *GroupActionsV1Mixin0Params, opts ...ClientOption) (*GroupActionsV1Mixin0OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGroupActionsV1Mixin0Params() + } + op := &runtime.ClientOperation{ + ID: "GroupActionsV1Mixin0", + Method: "POST", + PathPattern: "/user-management/entities/group-actions/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &GroupActionsV1Mixin0Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GroupActionsV1Mixin0OK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for GroupActionsV1Mixin0: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GroupUsersActionsV1Mixin0 adds or remove users from profile groups + + The available actions are `add_users` and `remove_users`. + +These actions only work if SCIM enforcement is not enabled for the target customer. Maximum 100 users can be updated per request. + +`add_users` adds users to the specified groups. This action accepts the following action parameter: `{ "name": "user_uuid", "value": "$user_uuid" }`. Action parameters can be repeated to add multiple users in a single request. + +`remove_users` removes users from the specified groups. This action accepts the following action parameter: `{ "name": "user_uuid", "value": "$user_uuid" }`. Action parameters can be repeated to remove multiple users in a single request. +*/ +func (a *Client) GroupUsersActionsV1Mixin0(params *GroupUsersActionsV1Mixin0Params, opts ...ClientOption) (*GroupUsersActionsV1Mixin0OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGroupUsersActionsV1Mixin0Params() + } + op := &runtime.ClientOperation{ + ID: "GroupUsersActionsV1Mixin0", + Method: "POST", + PathPattern: "/user-management/entities/group-users-actions/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &GroupUsersActionsV1Mixin0Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GroupUsersActionsV1Mixin0OK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for GroupUsersActionsV1Mixin0: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + QueryGroupsV1Mixin0 queries profile group i ds with f q l filtering pagination and sorting + + Returns a list of profile group IDs available to the actor, paginated, sorted, and filtered as requested. + +If the actor's CID is a parent, group IDs may be returned for child CIDs even if profile groups are disabled for the parent CID. Profile groups are disabled on a CID if SCIM is in production mode on the same CID. SCIM provisioning enablement does not propagate down to child CIDs. + +`filter` accepts a valid Falcon Query Language (FQL) query to filter groups by. Groups can be filtered by `name` or `cid`. + +`sort` specifies a field to sort by, followed by the direction in the format of `field|dir`. Groups can be sorted by `name`, `updated_at`, and `member_count`. Direction may be `asc` or `desc`. + +`offset` specifies the number of groups to skip. If provided, the offset should at minimum be 0. The default value is 0. + +`limit` specifies the maximum number of groups to return. If provided, the value must be within 1-500 inclusive. The default value is 100. +*/ +func (a *Client) QueryGroupsV1Mixin0(params *QueryGroupsV1Mixin0Params, opts ...ClientOption) (*QueryGroupsV1Mixin0OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewQueryGroupsV1Mixin0Params() + } + op := &runtime.ClientOperation{ + ID: "QueryGroupsV1Mixin0", + Method: "GET", + PathPattern: "/user-management/queries/groups/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &QueryGroupsV1Mixin0Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*QueryGroupsV1Mixin0OK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for QueryGroupsV1Mixin0: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UpdateGroupV1Mixin0 updates profile group metadata name description + + Updates an existing profile group's metadata. + +The group ID is specified as a query parameter. Only provided fields are updated. + +Name and description can be modified. To modify assignments (roles, user groups, fine-grained access), use the group-actions endpoint instead. +*/ +func (a *Client) UpdateGroupV1Mixin0(params *UpdateGroupV1Mixin0Params, opts ...ClientOption) (*UpdateGroupV1Mixin0OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdateGroupV1Mixin0Params() + } + op := &runtime.ClientOperation{ + ID: "UpdateGroupV1Mixin0", + Method: "PATCH", + PathPattern: "/user-management/entities/groups/v1", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &UpdateGroupV1Mixin0Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UpdateGroupV1Mixin0OK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for UpdateGroupV1Mixin0: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/falcon/client/profile_groups/query_groups_v1_mixin0_parameters.go b/falcon/client/profile_groups/query_groups_v1_mixin0_parameters.go new file mode 100644 index 000000000..9554d64f5 --- /dev/null +++ b/falcon/client/profile_groups/query_groups_v1_mixin0_parameters.go @@ -0,0 +1,287 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewQueryGroupsV1Mixin0Params creates a new QueryGroupsV1Mixin0Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewQueryGroupsV1Mixin0Params() *QueryGroupsV1Mixin0Params { + return &QueryGroupsV1Mixin0Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewQueryGroupsV1Mixin0ParamsWithTimeout creates a new QueryGroupsV1Mixin0Params object +// with the ability to set a timeout on a request. +func NewQueryGroupsV1Mixin0ParamsWithTimeout(timeout time.Duration) *QueryGroupsV1Mixin0Params { + return &QueryGroupsV1Mixin0Params{ + timeout: timeout, + } +} + +// NewQueryGroupsV1Mixin0ParamsWithContext creates a new QueryGroupsV1Mixin0Params object +// with the ability to set a context for a request. +func NewQueryGroupsV1Mixin0ParamsWithContext(ctx context.Context) *QueryGroupsV1Mixin0Params { + return &QueryGroupsV1Mixin0Params{ + Context: ctx, + } +} + +// NewQueryGroupsV1Mixin0ParamsWithHTTPClient creates a new QueryGroupsV1Mixin0Params object +// with the ability to set a custom HTTPClient for a request. +func NewQueryGroupsV1Mixin0ParamsWithHTTPClient(client *http.Client) *QueryGroupsV1Mixin0Params { + return &QueryGroupsV1Mixin0Params{ + HTTPClient: client, + } +} + +/* +QueryGroupsV1Mixin0Params contains all the parameters to send to the API endpoint + + for the query groups v1 mixin0 operation. + + Typically these are written to a http.Request. +*/ +type QueryGroupsV1Mixin0Params struct { + + /* Filter. + + FQL filter expression to filter groups by name or cid + */ + Filter *string + + /* Limit. + + Maximum groups to return [1-500] + + Default: 100 + */ + Limit *int64 + + /* Offset. + + Number of groups to skip + */ + Offset *int64 + + /* Sort. + + Sort by field|direction (name, updated_at, member_count) + + Default: "name|desc" + */ + Sort *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the query groups v1 mixin0 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *QueryGroupsV1Mixin0Params) WithDefaults() *QueryGroupsV1Mixin0Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the query groups v1 mixin0 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *QueryGroupsV1Mixin0Params) SetDefaults() { + var ( + limitDefault = int64(100) + + offsetDefault = int64(0) + + sortDefault = string("name|desc") + ) + + val := QueryGroupsV1Mixin0Params{ + Limit: &limitDefault, + Offset: &offsetDefault, + Sort: &sortDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) WithTimeout(timeout time.Duration) *QueryGroupsV1Mixin0Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) WithContext(ctx context.Context) *QueryGroupsV1Mixin0Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) WithHTTPClient(client *http.Client) *QueryGroupsV1Mixin0Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilter adds the filter to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) WithFilter(filter *string) *QueryGroupsV1Mixin0Params { + o.SetFilter(filter) + return o +} + +// SetFilter adds the filter to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) SetFilter(filter *string) { + o.Filter = filter +} + +// WithLimit adds the limit to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) WithLimit(limit *int64) *QueryGroupsV1Mixin0Params { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) WithOffset(offset *int64) *QueryGroupsV1Mixin0Params { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithSort adds the sort to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) WithSort(sort *string) *QueryGroupsV1Mixin0Params { + o.SetSort(sort) + return o +} + +// SetSort adds the sort to the query groups v1 mixin0 params +func (o *QueryGroupsV1Mixin0Params) SetSort(sort *string) { + o.Sort = sort +} + +// WriteToRequest writes these params to a swagger request +func (o *QueryGroupsV1Mixin0Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filter != nil { + + // query param filter + var qrFilter string + + if o.Filter != nil { + qrFilter = *o.Filter + } + qFilter := qrFilter + if qFilter != "" { + + if err := r.SetQueryParam("filter", qFilter); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Sort != nil { + + // query param sort + var qrSort string + + if o.Sort != nil { + qrSort = *o.Sort + } + qSort := qrSort + if qSort != "" { + + if err := r.SetQueryParam("sort", qSort); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/profile_groups/query_groups_v1_mixin0_responses.go b/falcon/client/profile_groups/query_groups_v1_mixin0_responses.go new file mode 100644 index 000000000..e3f6f2f70 --- /dev/null +++ b/falcon/client/profile_groups/query_groups_v1_mixin0_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// QueryGroupsV1Mixin0Reader is a Reader for the QueryGroupsV1Mixin0 structure. +type QueryGroupsV1Mixin0Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *QueryGroupsV1Mixin0Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewQueryGroupsV1Mixin0OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewQueryGroupsV1Mixin0BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewQueryGroupsV1Mixin0Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewQueryGroupsV1Mixin0TooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewQueryGroupsV1Mixin0InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /user-management/queries/groups/v1] QueryGroupsV1Mixin0", response, response.Code()) + } +} + +// NewQueryGroupsV1Mixin0OK creates a QueryGroupsV1Mixin0OK with default headers values +func NewQueryGroupsV1Mixin0OK() *QueryGroupsV1Mixin0OK { + return &QueryGroupsV1Mixin0OK{} +} + +/* +QueryGroupsV1Mixin0OK describes a response with status code 200, with default header values. + +OK +*/ +type QueryGroupsV1Mixin0OK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecQueryResponse +} + +// IsSuccess returns true when this query groups v1 mixin0 o k response has a 2xx status code +func (o *QueryGroupsV1Mixin0OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this query groups v1 mixin0 o k response has a 3xx status code +func (o *QueryGroupsV1Mixin0OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query groups v1 mixin0 o k response has a 4xx status code +func (o *QueryGroupsV1Mixin0OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this query groups v1 mixin0 o k response has a 5xx status code +func (o *QueryGroupsV1Mixin0OK) IsServerError() bool { + return false +} + +// IsCode returns true when this query groups v1 mixin0 o k response a status code equal to that given +func (o *QueryGroupsV1Mixin0OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the query groups v1 mixin0 o k response +func (o *QueryGroupsV1Mixin0OK) Code() int { + return 200 +} + +func (o *QueryGroupsV1Mixin0OK) Error() string { + return fmt.Sprintf("[GET /user-management/queries/groups/v1][%d] queryGroupsV1Mixin0OK %+v", 200, o.Payload) +} + +func (o *QueryGroupsV1Mixin0OK) String() string { + return fmt.Sprintf("[GET /user-management/queries/groups/v1][%d] queryGroupsV1Mixin0OK %+v", 200, o.Payload) +} + +func (o *QueryGroupsV1Mixin0OK) GetPayload() *models.MsaspecQueryResponse { + return o.Payload +} + +func (o *QueryGroupsV1Mixin0OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecQueryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryGroupsV1Mixin0BadRequest creates a QueryGroupsV1Mixin0BadRequest with default headers values +func NewQueryGroupsV1Mixin0BadRequest() *QueryGroupsV1Mixin0BadRequest { + return &QueryGroupsV1Mixin0BadRequest{} +} + +/* +QueryGroupsV1Mixin0BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type QueryGroupsV1Mixin0BadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecQueryResponse +} + +// IsSuccess returns true when this query groups v1 mixin0 bad request response has a 2xx status code +func (o *QueryGroupsV1Mixin0BadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query groups v1 mixin0 bad request response has a 3xx status code +func (o *QueryGroupsV1Mixin0BadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query groups v1 mixin0 bad request response has a 4xx status code +func (o *QueryGroupsV1Mixin0BadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this query groups v1 mixin0 bad request response has a 5xx status code +func (o *QueryGroupsV1Mixin0BadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this query groups v1 mixin0 bad request response a status code equal to that given +func (o *QueryGroupsV1Mixin0BadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the query groups v1 mixin0 bad request response +func (o *QueryGroupsV1Mixin0BadRequest) Code() int { + return 400 +} + +func (o *QueryGroupsV1Mixin0BadRequest) Error() string { + return fmt.Sprintf("[GET /user-management/queries/groups/v1][%d] queryGroupsV1Mixin0BadRequest %+v", 400, o.Payload) +} + +func (o *QueryGroupsV1Mixin0BadRequest) String() string { + return fmt.Sprintf("[GET /user-management/queries/groups/v1][%d] queryGroupsV1Mixin0BadRequest %+v", 400, o.Payload) +} + +func (o *QueryGroupsV1Mixin0BadRequest) GetPayload() *models.MsaspecQueryResponse { + return o.Payload +} + +func (o *QueryGroupsV1Mixin0BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecQueryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryGroupsV1Mixin0Forbidden creates a QueryGroupsV1Mixin0Forbidden with default headers values +func NewQueryGroupsV1Mixin0Forbidden() *QueryGroupsV1Mixin0Forbidden { + return &QueryGroupsV1Mixin0Forbidden{} +} + +/* +QueryGroupsV1Mixin0Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type QueryGroupsV1Mixin0Forbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecQueryResponse +} + +// IsSuccess returns true when this query groups v1 mixin0 forbidden response has a 2xx status code +func (o *QueryGroupsV1Mixin0Forbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query groups v1 mixin0 forbidden response has a 3xx status code +func (o *QueryGroupsV1Mixin0Forbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query groups v1 mixin0 forbidden response has a 4xx status code +func (o *QueryGroupsV1Mixin0Forbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this query groups v1 mixin0 forbidden response has a 5xx status code +func (o *QueryGroupsV1Mixin0Forbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this query groups v1 mixin0 forbidden response a status code equal to that given +func (o *QueryGroupsV1Mixin0Forbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the query groups v1 mixin0 forbidden response +func (o *QueryGroupsV1Mixin0Forbidden) Code() int { + return 403 +} + +func (o *QueryGroupsV1Mixin0Forbidden) Error() string { + return fmt.Sprintf("[GET /user-management/queries/groups/v1][%d] queryGroupsV1Mixin0Forbidden %+v", 403, o.Payload) +} + +func (o *QueryGroupsV1Mixin0Forbidden) String() string { + return fmt.Sprintf("[GET /user-management/queries/groups/v1][%d] queryGroupsV1Mixin0Forbidden %+v", 403, o.Payload) +} + +func (o *QueryGroupsV1Mixin0Forbidden) GetPayload() *models.MsaspecQueryResponse { + return o.Payload +} + +func (o *QueryGroupsV1Mixin0Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecQueryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryGroupsV1Mixin0TooManyRequests creates a QueryGroupsV1Mixin0TooManyRequests with default headers values +func NewQueryGroupsV1Mixin0TooManyRequests() *QueryGroupsV1Mixin0TooManyRequests { + return &QueryGroupsV1Mixin0TooManyRequests{} +} + +/* +QueryGroupsV1Mixin0TooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type QueryGroupsV1Mixin0TooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this query groups v1 mixin0 too many requests response has a 2xx status code +func (o *QueryGroupsV1Mixin0TooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query groups v1 mixin0 too many requests response has a 3xx status code +func (o *QueryGroupsV1Mixin0TooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query groups v1 mixin0 too many requests response has a 4xx status code +func (o *QueryGroupsV1Mixin0TooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this query groups v1 mixin0 too many requests response has a 5xx status code +func (o *QueryGroupsV1Mixin0TooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this query groups v1 mixin0 too many requests response a status code equal to that given +func (o *QueryGroupsV1Mixin0TooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the query groups v1 mixin0 too many requests response +func (o *QueryGroupsV1Mixin0TooManyRequests) Code() int { + return 429 +} + +func (o *QueryGroupsV1Mixin0TooManyRequests) Error() string { + return fmt.Sprintf("[GET /user-management/queries/groups/v1][%d] queryGroupsV1Mixin0TooManyRequests %+v", 429, o.Payload) +} + +func (o *QueryGroupsV1Mixin0TooManyRequests) String() string { + return fmt.Sprintf("[GET /user-management/queries/groups/v1][%d] queryGroupsV1Mixin0TooManyRequests %+v", 429, o.Payload) +} + +func (o *QueryGroupsV1Mixin0TooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *QueryGroupsV1Mixin0TooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewQueryGroupsV1Mixin0InternalServerError creates a QueryGroupsV1Mixin0InternalServerError with default headers values +func NewQueryGroupsV1Mixin0InternalServerError() *QueryGroupsV1Mixin0InternalServerError { + return &QueryGroupsV1Mixin0InternalServerError{} +} + +/* +QueryGroupsV1Mixin0InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type QueryGroupsV1Mixin0InternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.MsaspecQueryResponse +} + +// IsSuccess returns true when this query groups v1 mixin0 internal server error response has a 2xx status code +func (o *QueryGroupsV1Mixin0InternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this query groups v1 mixin0 internal server error response has a 3xx status code +func (o *QueryGroupsV1Mixin0InternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this query groups v1 mixin0 internal server error response has a 4xx status code +func (o *QueryGroupsV1Mixin0InternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this query groups v1 mixin0 internal server error response has a 5xx status code +func (o *QueryGroupsV1Mixin0InternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this query groups v1 mixin0 internal server error response a status code equal to that given +func (o *QueryGroupsV1Mixin0InternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the query groups v1 mixin0 internal server error response +func (o *QueryGroupsV1Mixin0InternalServerError) Code() int { + return 500 +} + +func (o *QueryGroupsV1Mixin0InternalServerError) Error() string { + return fmt.Sprintf("[GET /user-management/queries/groups/v1][%d] queryGroupsV1Mixin0InternalServerError %+v", 500, o.Payload) +} + +func (o *QueryGroupsV1Mixin0InternalServerError) String() string { + return fmt.Sprintf("[GET /user-management/queries/groups/v1][%d] queryGroupsV1Mixin0InternalServerError %+v", 500, o.Payload) +} + +func (o *QueryGroupsV1Mixin0InternalServerError) GetPayload() *models.MsaspecQueryResponse { + return o.Payload +} + +func (o *QueryGroupsV1Mixin0InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.MsaspecQueryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/profile_groups/update_group_v1_mixin0_parameters.go b/falcon/client/profile_groups/update_group_v1_mixin0_parameters.go new file mode 100644 index 000000000..f8f5fa6c7 --- /dev/null +++ b/falcon/client/profile_groups/update_group_v1_mixin0_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// NewUpdateGroupV1Mixin0Params creates a new UpdateGroupV1Mixin0Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUpdateGroupV1Mixin0Params() *UpdateGroupV1Mixin0Params { + return &UpdateGroupV1Mixin0Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewUpdateGroupV1Mixin0ParamsWithTimeout creates a new UpdateGroupV1Mixin0Params object +// with the ability to set a timeout on a request. +func NewUpdateGroupV1Mixin0ParamsWithTimeout(timeout time.Duration) *UpdateGroupV1Mixin0Params { + return &UpdateGroupV1Mixin0Params{ + timeout: timeout, + } +} + +// NewUpdateGroupV1Mixin0ParamsWithContext creates a new UpdateGroupV1Mixin0Params object +// with the ability to set a context for a request. +func NewUpdateGroupV1Mixin0ParamsWithContext(ctx context.Context) *UpdateGroupV1Mixin0Params { + return &UpdateGroupV1Mixin0Params{ + Context: ctx, + } +} + +// NewUpdateGroupV1Mixin0ParamsWithHTTPClient creates a new UpdateGroupV1Mixin0Params object +// with the ability to set a custom HTTPClient for a request. +func NewUpdateGroupV1Mixin0ParamsWithHTTPClient(client *http.Client) *UpdateGroupV1Mixin0Params { + return &UpdateGroupV1Mixin0Params{ + HTTPClient: client, + } +} + +/* +UpdateGroupV1Mixin0Params contains all the parameters to send to the API endpoint + + for the update group v1 mixin0 operation. + + Typically these are written to a http.Request. +*/ +type UpdateGroupV1Mixin0Params struct { + + // Body. + Body *models.FlightcontrolapiUpdateGroupRequestV1 + + /* ID. + + ID of the group to update + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the update group v1 mixin0 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateGroupV1Mixin0Params) WithDefaults() *UpdateGroupV1Mixin0Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the update group v1 mixin0 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateGroupV1Mixin0Params) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the update group v1 mixin0 params +func (o *UpdateGroupV1Mixin0Params) WithTimeout(timeout time.Duration) *UpdateGroupV1Mixin0Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the update group v1 mixin0 params +func (o *UpdateGroupV1Mixin0Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the update group v1 mixin0 params +func (o *UpdateGroupV1Mixin0Params) WithContext(ctx context.Context) *UpdateGroupV1Mixin0Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the update group v1 mixin0 params +func (o *UpdateGroupV1Mixin0Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the update group v1 mixin0 params +func (o *UpdateGroupV1Mixin0Params) WithHTTPClient(client *http.Client) *UpdateGroupV1Mixin0Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the update group v1 mixin0 params +func (o *UpdateGroupV1Mixin0Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the update group v1 mixin0 params +func (o *UpdateGroupV1Mixin0Params) WithBody(body *models.FlightcontrolapiUpdateGroupRequestV1) *UpdateGroupV1Mixin0Params { + o.SetBody(body) + return o +} + +// SetBody adds the body to the update group v1 mixin0 params +func (o *UpdateGroupV1Mixin0Params) SetBody(body *models.FlightcontrolapiUpdateGroupRequestV1) { + o.Body = body +} + +// WithID adds the id to the update group v1 mixin0 params +func (o *UpdateGroupV1Mixin0Params) WithID(id string) *UpdateGroupV1Mixin0Params { + o.SetID(id) + return o +} + +// SetID adds the id to the update group v1 mixin0 params +func (o *UpdateGroupV1Mixin0Params) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *UpdateGroupV1Mixin0Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // query param id + qrID := o.ID + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/client/profile_groups/update_group_v1_mixin0_responses.go b/falcon/client/profile_groups/update_group_v1_mixin0_responses.go new file mode 100644 index 000000000..e1764bd2f --- /dev/null +++ b/falcon/client/profile_groups/update_group_v1_mixin0_responses.go @@ -0,0 +1,626 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package profile_groups + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/crowdstrike/gofalcon/falcon/models" +) + +// UpdateGroupV1Mixin0Reader is a Reader for the UpdateGroupV1Mixin0 structure. +type UpdateGroupV1Mixin0Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateGroupV1Mixin0Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUpdateGroupV1Mixin0OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewUpdateGroupV1Mixin0BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewUpdateGroupV1Mixin0Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewUpdateGroupV1Mixin0TooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUpdateGroupV1Mixin0InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[PATCH /user-management/entities/groups/v1] UpdateGroupV1Mixin0", response, response.Code()) + } +} + +// NewUpdateGroupV1Mixin0OK creates a UpdateGroupV1Mixin0OK with default headers values +func NewUpdateGroupV1Mixin0OK() *UpdateGroupV1Mixin0OK { + return &UpdateGroupV1Mixin0OK{} +} + +/* +UpdateGroupV1Mixin0OK describes a response with status code 200, with default header values. + +OK +*/ +type UpdateGroupV1Mixin0OK struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiProfileGroupResponseV1 +} + +// IsSuccess returns true when this update group v1 mixin0 o k response has a 2xx status code +func (o *UpdateGroupV1Mixin0OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update group v1 mixin0 o k response has a 3xx status code +func (o *UpdateGroupV1Mixin0OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update group v1 mixin0 o k response has a 4xx status code +func (o *UpdateGroupV1Mixin0OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update group v1 mixin0 o k response has a 5xx status code +func (o *UpdateGroupV1Mixin0OK) IsServerError() bool { + return false +} + +// IsCode returns true when this update group v1 mixin0 o k response a status code equal to that given +func (o *UpdateGroupV1Mixin0OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the update group v1 mixin0 o k response +func (o *UpdateGroupV1Mixin0OK) Code() int { + return 200 +} + +func (o *UpdateGroupV1Mixin0OK) Error() string { + return fmt.Sprintf("[PATCH /user-management/entities/groups/v1][%d] updateGroupV1Mixin0OK %+v", 200, o.Payload) +} + +func (o *UpdateGroupV1Mixin0OK) String() string { + return fmt.Sprintf("[PATCH /user-management/entities/groups/v1][%d] updateGroupV1Mixin0OK %+v", 200, o.Payload) +} + +func (o *UpdateGroupV1Mixin0OK) GetPayload() *models.FlightcontrolapiProfileGroupResponseV1 { + return o.Payload +} + +func (o *UpdateGroupV1Mixin0OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiProfileGroupResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateGroupV1Mixin0BadRequest creates a UpdateGroupV1Mixin0BadRequest with default headers values +func NewUpdateGroupV1Mixin0BadRequest() *UpdateGroupV1Mixin0BadRequest { + return &UpdateGroupV1Mixin0BadRequest{} +} + +/* +UpdateGroupV1Mixin0BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type UpdateGroupV1Mixin0BadRequest struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiProfileGroupResponseV1 +} + +// IsSuccess returns true when this update group v1 mixin0 bad request response has a 2xx status code +func (o *UpdateGroupV1Mixin0BadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update group v1 mixin0 bad request response has a 3xx status code +func (o *UpdateGroupV1Mixin0BadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update group v1 mixin0 bad request response has a 4xx status code +func (o *UpdateGroupV1Mixin0BadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this update group v1 mixin0 bad request response has a 5xx status code +func (o *UpdateGroupV1Mixin0BadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this update group v1 mixin0 bad request response a status code equal to that given +func (o *UpdateGroupV1Mixin0BadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the update group v1 mixin0 bad request response +func (o *UpdateGroupV1Mixin0BadRequest) Code() int { + return 400 +} + +func (o *UpdateGroupV1Mixin0BadRequest) Error() string { + return fmt.Sprintf("[PATCH /user-management/entities/groups/v1][%d] updateGroupV1Mixin0BadRequest %+v", 400, o.Payload) +} + +func (o *UpdateGroupV1Mixin0BadRequest) String() string { + return fmt.Sprintf("[PATCH /user-management/entities/groups/v1][%d] updateGroupV1Mixin0BadRequest %+v", 400, o.Payload) +} + +func (o *UpdateGroupV1Mixin0BadRequest) GetPayload() *models.FlightcontrolapiProfileGroupResponseV1 { + return o.Payload +} + +func (o *UpdateGroupV1Mixin0BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiProfileGroupResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateGroupV1Mixin0Forbidden creates a UpdateGroupV1Mixin0Forbidden with default headers values +func NewUpdateGroupV1Mixin0Forbidden() *UpdateGroupV1Mixin0Forbidden { + return &UpdateGroupV1Mixin0Forbidden{} +} + +/* +UpdateGroupV1Mixin0Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type UpdateGroupV1Mixin0Forbidden struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiProfileGroupResponseV1 +} + +// IsSuccess returns true when this update group v1 mixin0 forbidden response has a 2xx status code +func (o *UpdateGroupV1Mixin0Forbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update group v1 mixin0 forbidden response has a 3xx status code +func (o *UpdateGroupV1Mixin0Forbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update group v1 mixin0 forbidden response has a 4xx status code +func (o *UpdateGroupV1Mixin0Forbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this update group v1 mixin0 forbidden response has a 5xx status code +func (o *UpdateGroupV1Mixin0Forbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this update group v1 mixin0 forbidden response a status code equal to that given +func (o *UpdateGroupV1Mixin0Forbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the update group v1 mixin0 forbidden response +func (o *UpdateGroupV1Mixin0Forbidden) Code() int { + return 403 +} + +func (o *UpdateGroupV1Mixin0Forbidden) Error() string { + return fmt.Sprintf("[PATCH /user-management/entities/groups/v1][%d] updateGroupV1Mixin0Forbidden %+v", 403, o.Payload) +} + +func (o *UpdateGroupV1Mixin0Forbidden) String() string { + return fmt.Sprintf("[PATCH /user-management/entities/groups/v1][%d] updateGroupV1Mixin0Forbidden %+v", 403, o.Payload) +} + +func (o *UpdateGroupV1Mixin0Forbidden) GetPayload() *models.FlightcontrolapiProfileGroupResponseV1 { + return o.Payload +} + +func (o *UpdateGroupV1Mixin0Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiProfileGroupResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateGroupV1Mixin0TooManyRequests creates a UpdateGroupV1Mixin0TooManyRequests with default headers values +func NewUpdateGroupV1Mixin0TooManyRequests() *UpdateGroupV1Mixin0TooManyRequests { + return &UpdateGroupV1Mixin0TooManyRequests{} +} + +/* +UpdateGroupV1Mixin0TooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type UpdateGroupV1Mixin0TooManyRequests struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + /* Too many requests, retry after this time (as milliseconds since epoch) + */ + XRateLimitRetryAfter int64 + + Payload *models.MsaReplyMetaOnly +} + +// IsSuccess returns true when this update group v1 mixin0 too many requests response has a 2xx status code +func (o *UpdateGroupV1Mixin0TooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update group v1 mixin0 too many requests response has a 3xx status code +func (o *UpdateGroupV1Mixin0TooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update group v1 mixin0 too many requests response has a 4xx status code +func (o *UpdateGroupV1Mixin0TooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this update group v1 mixin0 too many requests response has a 5xx status code +func (o *UpdateGroupV1Mixin0TooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this update group v1 mixin0 too many requests response a status code equal to that given +func (o *UpdateGroupV1Mixin0TooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the update group v1 mixin0 too many requests response +func (o *UpdateGroupV1Mixin0TooManyRequests) Code() int { + return 429 +} + +func (o *UpdateGroupV1Mixin0TooManyRequests) Error() string { + return fmt.Sprintf("[PATCH /user-management/entities/groups/v1][%d] updateGroupV1Mixin0TooManyRequests %+v", 429, o.Payload) +} + +func (o *UpdateGroupV1Mixin0TooManyRequests) String() string { + return fmt.Sprintf("[PATCH /user-management/entities/groups/v1][%d] updateGroupV1Mixin0TooManyRequests %+v", 429, o.Payload) +} + +func (o *UpdateGroupV1Mixin0TooManyRequests) GetPayload() *models.MsaReplyMetaOnly { + return o.Payload +} + +func (o *UpdateGroupV1Mixin0TooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + // hydrates response header X-RateLimit-RetryAfter + hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter") + + if hdrXRateLimitRetryAfter != "" { + valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter) + if err != nil { + return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter) + } + o.XRateLimitRetryAfter = valxRateLimitRetryAfter + } + + o.Payload = new(models.MsaReplyMetaOnly) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateGroupV1Mixin0InternalServerError creates a UpdateGroupV1Mixin0InternalServerError with default headers values +func NewUpdateGroupV1Mixin0InternalServerError() *UpdateGroupV1Mixin0InternalServerError { + return &UpdateGroupV1Mixin0InternalServerError{} +} + +/* +UpdateGroupV1Mixin0InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type UpdateGroupV1Mixin0InternalServerError struct { + + /* Trace-ID: submit to support if resolving an issue + */ + XCSTRACEID string + + /* Request limit per minute. + */ + XRateLimitLimit int64 + + /* The number of requests remaining for the sliding one minute window. + */ + XRateLimitRemaining int64 + + Payload *models.FlightcontrolapiProfileGroupResponseV1 +} + +// IsSuccess returns true when this update group v1 mixin0 internal server error response has a 2xx status code +func (o *UpdateGroupV1Mixin0InternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update group v1 mixin0 internal server error response has a 3xx status code +func (o *UpdateGroupV1Mixin0InternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update group v1 mixin0 internal server error response has a 4xx status code +func (o *UpdateGroupV1Mixin0InternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this update group v1 mixin0 internal server error response has a 5xx status code +func (o *UpdateGroupV1Mixin0InternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this update group v1 mixin0 internal server error response a status code equal to that given +func (o *UpdateGroupV1Mixin0InternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the update group v1 mixin0 internal server error response +func (o *UpdateGroupV1Mixin0InternalServerError) Code() int { + return 500 +} + +func (o *UpdateGroupV1Mixin0InternalServerError) Error() string { + return fmt.Sprintf("[PATCH /user-management/entities/groups/v1][%d] updateGroupV1Mixin0InternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateGroupV1Mixin0InternalServerError) String() string { + return fmt.Sprintf("[PATCH /user-management/entities/groups/v1][%d] updateGroupV1Mixin0InternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateGroupV1Mixin0InternalServerError) GetPayload() *models.FlightcontrolapiProfileGroupResponseV1 { + return o.Payload +} + +func (o *UpdateGroupV1Mixin0InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header X-CS-TRACEID + hdrXCSTRACEID := response.GetHeader("X-CS-TRACEID") + + if hdrXCSTRACEID != "" { + o.XCSTRACEID = hdrXCSTRACEID + } + + // hydrates response header X-RateLimit-Limit + hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit") + + if hdrXRateLimitLimit != "" { + valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit) + if err != nil { + return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit) + } + o.XRateLimitLimit = valxRateLimitLimit + } + + // hydrates response header X-RateLimit-Remaining + hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining") + + if hdrXRateLimitRemaining != "" { + valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining) + if err != nil { + return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining) + } + o.XRateLimitRemaining = valxRateLimitRemaining + } + + o.Payload = new(models.FlightcontrolapiProfileGroupResponseV1) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/falcon/client/quick_scan_pro/query_scan_results_parameters.go b/falcon/client/quick_scan_pro/query_scan_results_parameters.go index bc9c551e8..b21178b62 100644 --- a/falcon/client/quick_scan_pro/query_scan_results_parameters.go +++ b/falcon/client/quick_scan_pro/query_scan_results_parameters.go @@ -65,10 +65,10 @@ type QueryScanResultsParams struct { /* Filter. Empty value means to not filter on anything - Available filter fields that supports match (~): _all, mitre_attacks.description - Available filter fields that supports exact match: cid,sha256,id,status,type,entity,executor,verdict,verdict_reason,verdict_source,file_size,file_type,mime_type,adversary,file_type_short,first_content_bytes_hex,first_content_bytes_ascii,artifacts.file_artifacts.sha256,artifacts.file_artifacts.filename,artifacts.file_artifacts.verdict,artifacts.file_artifacts.verdict_reasons,artifacts.url_artifacts.url,artifacts.url_artifacts.verdict,artifacts.url_artifacts.verdict_reasons,mitre_attacks.attack_id,mitre_attacks.attack_id_wiki,mitre_attacks.tactic,mitre_attacks.technique,mitre_attacks.capec_id,mitre_attacks.parent.attack_id,mitre_attacks.parent.attack_id_wiki,mitre_attacks.parent.technique,static_indicators,malware_config.url,malware_config.domain,malware_config.ip,artifacts_tree.nodes.type,artifacts_tree.nodes.value,artifacts_tree.nodes.verdict,artifacts_tree.edges.from,artifacts_tree.edges.to,artifacts_tree.edges.label - Available filter fields that supports wildcard (*): mitre_attacks.description - Available filter fields that supports range comparisons (>, <, >=, <=): created_timestamp, updated_timestamp, file_size + Available filter fields that supports match (~): _all, mitre_attacks.description, yara_rules.description + Available filter fields that supports exact match: cid,sha256,id,status,type,entity,executor,verdict,verdict_reason,verdict_reasons,verdict_source,file_size,file_type,mime_type,adversary,file_type_short,first_content_bytes_hex,first_content_bytes_ascii,artifacts.file_artifacts.sha256,artifacts.file_artifacts.filename,artifacts.file_artifacts.verdict,artifacts.file_artifacts.verdict_reasons,artifacts.url_artifacts.url,artifacts.url_artifacts.verdict,artifacts.url_artifacts.verdict_reasons,mitre_attacks.attack_id,mitre_attacks.attack_id_wiki,mitre_attacks.tactic,mitre_attacks.technique,mitre_attacks.capec_id,mitre_attacks.parent.attack_id,mitre_attacks.parent.attack_id_wiki,mitre_attacks.parent.technique,static_indicators,malware_config.url,malware_config.domain,malware_config.ip,artifacts_tree.nodes.type,artifacts_tree.nodes.value,artifacts_tree.nodes.verdict,artifacts_tree.edges.from,artifacts_tree.edges.to,artifacts_tree.edges.label,yara_rules.rule_name,yara_rules.sha256,yara_rules.tags + Available filter fields that supports wildcard (*): mitre_attacks.description, yara_rules.description + Available filter fields that supports range comparisons (>, <, >=, <=): created_timestamp, updated_timestamp, file_size, yara_rules.created_at, yara_rules.updated_at All filter fields and operations supports negation (!). _all field is used to search between all fields. */ diff --git a/falcon/client/recon/query_notifications_v1_parameters.go b/falcon/client/recon/query_notifications_v1_parameters.go index 66e2cbfbb..1755acdfb 100644 --- a/falcon/client/recon/query_notifications_v1_parameters.go +++ b/falcon/client/recon/query_notifications_v1_parameters.go @@ -64,7 +64,7 @@ type QueryNotificationsV1Params struct { /* Filter. - FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid status rule_id rule_name rule_topic rule_priority item_type item_site typosquatting.id typosquatting.unicode_format typosquatting.punycode_format typosquatting.parent_domain.id typosquatting.parent_domain.unicode_format typosquatting.parent_domain.punycode_format typosquatting.base_domain.id typosquatting.base_domain.unicode_format typosquatting.base_domain.punycode_format typosquatting.base_domain.is_registered typosquatting.base_domain.whois.registrar.name typosquatting.base_domain.whois.registrar.status typosquatting.base_domain.whois.registrant.email typosquatting.base_domain.whois.registrant.name typosquatting.base_domain.whois.registrant.org typosquatting.base_domain.whois.name_servers created_date updated_date assigned_to_uuid breach_summary.credential_statuses breach_summary.is_retroactively_deduped] + FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid status rule_id rule_name rule_topic rule_priority item_type item_site typosquatting.id typosquatting.unicode_format typosquatting.punycode_format typosquatting.parent_domain.id typosquatting.parent_domain.unicode_format typosquatting.parent_domain.punycode_format typosquatting.base_domain.id typosquatting.base_domain.unicode_format typosquatting.base_domain.punycode_format typosquatting.base_domain.is_registered typosquatting.base_domain.whois.registrar.name typosquatting.base_domain.whois.registrar.status typosquatting.base_domain.whois.registrant.email typosquatting.base_domain.whois.registrant.name typosquatting.base_domain.whois.registrant.org typosquatting.base_domain.whois.name_servers created_date updated_date assigned_to_uuid risk_score_label breach_summary.credential_statuses breach_summary.is_retroactively_deduped] */ Filter *string diff --git a/falcon/client/workflows/workflow_activities_combined_parameters.go b/falcon/client/workflows/workflow_activities_combined_parameters.go index 532d09963..474331663 100644 --- a/falcon/client/workflows/workflow_activities_combined_parameters.go +++ b/falcon/client/workflows/workflow_activities_combined_parameters.go @@ -80,6 +80,12 @@ type WorkflowActivitiesCombinedParams struct { */ Offset *string + /* SkipArtifactResolution. + + When true, skip Foundry artifact resolution and return the latest version of the activity, regardless of whether the associated Foundry app is installed + */ + SkipArtifactResolution *bool + /* Sort. Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. @@ -103,7 +109,18 @@ func (o *WorkflowActivitiesCombinedParams) WithDefaults() *WorkflowActivitiesCom // // All values with no default are reset to their zero value. func (o *WorkflowActivitiesCombinedParams) SetDefaults() { - // no default values defined for this parameter + var ( + skipArtifactResolutionDefault = bool(false) + ) + + val := WorkflowActivitiesCombinedParams{ + SkipArtifactResolution: &skipArtifactResolutionDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val } // WithTimeout adds the timeout to the workflow activities combined params @@ -172,6 +189,17 @@ func (o *WorkflowActivitiesCombinedParams) SetOffset(offset *string) { o.Offset = offset } +// WithSkipArtifactResolution adds the skipArtifactResolution to the workflow activities combined params +func (o *WorkflowActivitiesCombinedParams) WithSkipArtifactResolution(skipArtifactResolution *bool) *WorkflowActivitiesCombinedParams { + o.SetSkipArtifactResolution(skipArtifactResolution) + return o +} + +// SetSkipArtifactResolution adds the skipArtifactResolution to the workflow activities combined params +func (o *WorkflowActivitiesCombinedParams) SetSkipArtifactResolution(skipArtifactResolution *bool) { + o.SkipArtifactResolution = skipArtifactResolution +} + // WithSort adds the sort to the workflow activities combined params func (o *WorkflowActivitiesCombinedParams) WithSort(sort *string) *WorkflowActivitiesCombinedParams { o.SetSort(sort) @@ -233,6 +261,23 @@ func (o *WorkflowActivitiesCombinedParams) WriteToRequest(r runtime.ClientReques } } + if o.SkipArtifactResolution != nil { + + // query param skip_artifact_resolution + var qrSkipArtifactResolution bool + + if o.SkipArtifactResolution != nil { + qrSkipArtifactResolution = *o.SkipArtifactResolution + } + qSkipArtifactResolution := swag.FormatBool(qrSkipArtifactResolution) + if qSkipArtifactResolution != "" { + + if err := r.SetQueryParam("skip_artifact_resolution", qSkipArtifactResolution); err != nil { + return err + } + } + } + if o.Sort != nil { // query param sort diff --git a/falcon/models/accessscopemanager_v1_access_scope.go b/falcon/models/accessscopemanager_v1_access_scope.go new file mode 100644 index 000000000..d254e90e1 --- /dev/null +++ b/falcon/models/accessscopemanager_v1_access_scope.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AccessscopemanagerV1AccessScope accessscopemanager v1 access scope +// +// swagger:model accessscopemanager.v1.AccessScope +type AccessscopemanagerV1AccessScope struct { + + // created at + // Format: date-time + CreatedAt strfmt.DateTime `json:"created_at,omitempty"` + + // created by + CreatedBy string `json:"created_by,omitempty"` + + // description + Description string `json:"description,omitempty"` + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // updated at + // Format: date-time + UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` +} + +// Validate validates this accessscopemanager v1 access scope +func (m *AccessscopemanagerV1AccessScope) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccessscopemanagerV1AccessScope) validateCreatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.CreatedAt) { // not required + return nil + } + + if err := validate.FormatOf("created_at", "body", "date-time", m.CreatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *AccessscopemanagerV1AccessScope) validateUpdatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.UpdatedAt) { // not required + return nil + } + + if err := validate.FormatOf("updated_at", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this accessscopemanager v1 access scope based on context it is used +func (m *AccessscopemanagerV1AccessScope) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AccessscopemanagerV1AccessScope) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccessscopemanagerV1AccessScope) UnmarshalBinary(b []byte) error { + var res AccessscopemanagerV1AccessScope + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/accessscopemanager_v1_error.go b/falcon/models/accessscopemanager_v1_error.go new file mode 100644 index 000000000..3c176971a --- /dev/null +++ b/falcon/models/accessscopemanager_v1_error.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccessscopemanagerV1Error accessscopemanager v1 error +// +// swagger:model accessscopemanager.v1.Error +type AccessscopemanagerV1Error struct { + + // code + Code string `json:"code,omitempty"` + + // id + ID string `json:"id,omitempty"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this accessscopemanager v1 error +func (m *AccessscopemanagerV1Error) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this accessscopemanager v1 error based on context it is used +func (m *AccessscopemanagerV1Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AccessscopemanagerV1Error) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccessscopemanagerV1Error) UnmarshalBinary(b []byte) error { + var res AccessscopemanagerV1Error + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/accessscopemanager_v1_list_access_scopes_response_external.go b/falcon/models/accessscopemanager_v1_list_access_scopes_response_external.go new file mode 100644 index 000000000..a8ecad2a9 --- /dev/null +++ b/falcon/models/accessscopemanager_v1_list_access_scopes_response_external.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccessscopemanagerV1ListAccessScopesResponseExternal accessscopemanager v1 list access scopes response external +// +// swagger:model accessscopemanager.v1.ListAccessScopesResponseExternal +type AccessscopemanagerV1ListAccessScopesResponseExternal struct { + + // error + Error *AccessscopemanagerV1Error `json:"error,omitempty"` + + // meta + Meta *AccessscopemanagerV1Meta `json:"meta,omitempty"` + + // resources + Resources []*AccessscopemanagerV1AccessScope `json:"resources"` +} + +// Validate validates this accessscopemanager v1 list access scopes response external +func (m *AccessscopemanagerV1ListAccessScopesResponseExternal) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateError(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccessscopemanagerV1ListAccessScopesResponseExternal) validateError(formats strfmt.Registry) error { + if swag.IsZero(m.Error) { // not required + return nil + } + + if m.Error != nil { + if err := m.Error.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") + } + return err + } + } + + return nil +} + +func (m *AccessscopemanagerV1ListAccessScopesResponseExternal) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *AccessscopemanagerV1ListAccessScopesResponseExternal) validateResources(formats strfmt.Registry) error { + if swag.IsZero(m.Resources) { // not required + return nil + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this accessscopemanager v1 list access scopes response external based on the context it is used +func (m *AccessscopemanagerV1ListAccessScopesResponseExternal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateError(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccessscopemanagerV1ListAccessScopesResponseExternal) contextValidateError(ctx context.Context, formats strfmt.Registry) error { + + if m.Error != nil { + + if swag.IsZero(m.Error) { // not required + return nil + } + + if err := m.Error.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") + } + return err + } + } + + return nil +} + +func (m *AccessscopemanagerV1ListAccessScopesResponseExternal) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *AccessscopemanagerV1ListAccessScopesResponseExternal) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccessscopemanagerV1ListAccessScopesResponseExternal) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccessscopemanagerV1ListAccessScopesResponseExternal) UnmarshalBinary(b []byte) error { + var res AccessscopemanagerV1ListAccessScopesResponseExternal + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/accessscopemanager_v1_m_s_a_response.go b/falcon/models/accessscopemanager_v1_m_s_a_response.go new file mode 100644 index 000000000..2355c19db --- /dev/null +++ b/falcon/models/accessscopemanager_v1_m_s_a_response.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccessscopemanagerV1MSAResponse accessscopemanager v1 m s a response +// +// swagger:model accessscopemanager.v1.MSAResponse +type AccessscopemanagerV1MSAResponse struct { + + // errors + Errors []*AccessscopemanagerV1Error `json:"errors"` + + // meta + Meta *AccessscopemanagerV1Meta `json:"meta,omitempty"` + + // Example resources + Resources []string `json:"resources"` +} + +// Validate validates this accessscopemanager v1 m s a response +func (m *AccessscopemanagerV1MSAResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccessscopemanagerV1MSAResponse) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AccessscopemanagerV1MSAResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +// ContextValidate validate this accessscopemanager v1 m s a response based on the context it is used +func (m *AccessscopemanagerV1MSAResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccessscopemanagerV1MSAResponse) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AccessscopemanagerV1MSAResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccessscopemanagerV1MSAResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccessscopemanagerV1MSAResponse) UnmarshalBinary(b []byte) error { + var res AccessscopemanagerV1MSAResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/accessscopemanager_v1_meta.go b/falcon/models/accessscopemanager_v1_meta.go new file mode 100644 index 000000000..3345327c2 --- /dev/null +++ b/falcon/models/accessscopemanager_v1_meta.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccessscopemanagerV1Meta accessscopemanager v1 meta +// +// swagger:model accessscopemanager.v1.Meta +type AccessscopemanagerV1Meta struct { + + // pagination + Pagination *AccessscopemanagerV1Pagination `json:"pagination,omitempty"` + + // powered by + PoweredBy string `json:"powered_by,omitempty"` + + // query time + QueryTime float32 `json:"query_time,omitempty"` + + // trace id + TraceID string `json:"trace_id,omitempty"` +} + +// Validate validates this accessscopemanager v1 meta +func (m *AccessscopemanagerV1Meta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePagination(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccessscopemanagerV1Meta) validatePagination(formats strfmt.Registry) error { + if swag.IsZero(m.Pagination) { // not required + return nil + } + + if m.Pagination != nil { + if err := m.Pagination.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pagination") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pagination") + } + return err + } + } + + return nil +} + +// ContextValidate validate this accessscopemanager v1 meta based on the context it is used +func (m *AccessscopemanagerV1Meta) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePagination(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccessscopemanagerV1Meta) contextValidatePagination(ctx context.Context, formats strfmt.Registry) error { + + if m.Pagination != nil { + + if swag.IsZero(m.Pagination) { // not required + return nil + } + + if err := m.Pagination.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pagination") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pagination") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccessscopemanagerV1Meta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccessscopemanagerV1Meta) UnmarshalBinary(b []byte) error { + var res AccessscopemanagerV1Meta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/accessscopemanager_v1_pagination.go b/falcon/models/accessscopemanager_v1_pagination.go new file mode 100644 index 000000000..c31499a82 --- /dev/null +++ b/falcon/models/accessscopemanager_v1_pagination.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccessscopemanagerV1Pagination accessscopemanager v1 pagination +// +// swagger:model accessscopemanager.v1.Pagination +type AccessscopemanagerV1Pagination struct { + + // limit + Limit int64 `json:"limit,omitempty"` + + // offset + Offset int64 `json:"offset,omitempty"` + + // total + Total int64 `json:"total,omitempty"` +} + +// Validate validates this accessscopemanager v1 pagination +func (m *AccessscopemanagerV1Pagination) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this accessscopemanager v1 pagination based on context it is used +func (m *AccessscopemanagerV1Pagination) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AccessscopemanagerV1Pagination) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccessscopemanagerV1Pagination) UnmarshalBinary(b []byte) error { + var res AccessscopemanagerV1Pagination + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/accessscopemanager_v1_query_access_scopes_response_external.go b/falcon/models/accessscopemanager_v1_query_access_scopes_response_external.go new file mode 100644 index 000000000..c458a663d --- /dev/null +++ b/falcon/models/accessscopemanager_v1_query_access_scopes_response_external.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccessscopemanagerV1QueryAccessScopesResponseExternal accessscopemanager v1 query access scopes response external +// +// swagger:model accessscopemanager.v1.QueryAccessScopesResponseExternal +type AccessscopemanagerV1QueryAccessScopesResponseExternal struct { + + // error + Error *AccessscopemanagerV1Error `json:"error,omitempty"` + + // meta + Meta *AccessscopemanagerV1Meta `json:"meta,omitempty"` + + // Access Scope IDs + Resources []string `json:"resources"` +} + +// Validate validates this accessscopemanager v1 query access scopes response external +func (m *AccessscopemanagerV1QueryAccessScopesResponseExternal) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateError(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccessscopemanagerV1QueryAccessScopesResponseExternal) validateError(formats strfmt.Registry) error { + if swag.IsZero(m.Error) { // not required + return nil + } + + if m.Error != nil { + if err := m.Error.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") + } + return err + } + } + + return nil +} + +func (m *AccessscopemanagerV1QueryAccessScopesResponseExternal) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +// ContextValidate validate this accessscopemanager v1 query access scopes response external based on the context it is used +func (m *AccessscopemanagerV1QueryAccessScopesResponseExternal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateError(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccessscopemanagerV1QueryAccessScopesResponseExternal) contextValidateError(ctx context.Context, formats strfmt.Registry) error { + + if m.Error != nil { + + if swag.IsZero(m.Error) { // not required + return nil + } + + if err := m.Error.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") + } + return err + } + } + + return nil +} + +func (m *AccessscopemanagerV1QueryAccessScopesResponseExternal) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccessscopemanagerV1QueryAccessScopesResponseExternal) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccessscopemanagerV1QueryAccessScopesResponseExternal) UnmarshalBinary(b []byte) error { + var res AccessscopemanagerV1QueryAccessScopesResponseExternal + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/actor_actor_paginated_response.go b/falcon/models/actor_actor_paginated_response.go new file mode 100644 index 000000000..0e1ca860b --- /dev/null +++ b/falcon/models/actor_actor_paginated_response.go @@ -0,0 +1,237 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ActorActorPaginatedResponse actor actor paginated response +// +// swagger:model actor.ActorPaginatedResponse +type ActorActorPaginatedResponse struct { + + // Array of API Errors + // Required: true + Errors []*MsaAPIError `json:"errors"` + + // Meta information of a request, including traceID of the request and pagination information + // Required: true + Meta *ActorMsaMetaInfoWithPaging `json:"meta"` + + // resources + // Required: true + Resources []*ActorActorDocument `json:"resources"` +} + +// Validate validates this actor actor paginated response +func (m *ActorActorPaginatedResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ActorActorPaginatedResponse) validateErrors(formats strfmt.Registry) error { + + if err := validate.Required("errors", "body", m.Errors); err != nil { + return err + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ActorActorPaginatedResponse) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *ActorActorPaginatedResponse) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this actor actor paginated response based on the context it is used +func (m *ActorActorPaginatedResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ActorActorPaginatedResponse) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ActorActorPaginatedResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *ActorActorPaginatedResponse) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ActorActorPaginatedResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ActorActorPaginatedResponse) UnmarshalBinary(b []byte) error { + var res ActorActorPaginatedResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_actors_response.go b/falcon/models/actor_actor_response.go similarity index 79% rename from falcon/models/domain_actors_response.go rename to falcon/models/actor_actor_response.go index b89163830..81e3ae9e5 100644 --- a/falcon/models/domain_actors_response.go +++ b/falcon/models/actor_actor_response.go @@ -15,16 +15,16 @@ import ( "github.com/go-openapi/validate" ) -// DomainActorsResponse domain actors response +// ActorActorResponse actor actor response // -// swagger:model domain.ActorsResponse -type DomainActorsResponse struct { +// swagger:model actor.ActorResponse +type ActorActorResponse struct { // Array of API Errors // Required: true Errors []*MsaAPIError `json:"errors"` - // Meta information of a request, including traceID of the request and pagination information + // Meta information of a request, including traceID of the request // Required: true Meta *MsaMetaInfo `json:"meta"` @@ -33,8 +33,8 @@ type DomainActorsResponse struct { Resources []*ActorActorDocument `json:"resources"` } -// Validate validates this domain actors response -func (m *DomainActorsResponse) Validate(formats strfmt.Registry) error { +// Validate validates this actor actor response +func (m *ActorActorResponse) Validate(formats strfmt.Registry) error { var res []error if err := m.validateErrors(formats); err != nil { @@ -55,7 +55,7 @@ func (m *DomainActorsResponse) Validate(formats strfmt.Registry) error { return nil } -func (m *DomainActorsResponse) validateErrors(formats strfmt.Registry) error { +func (m *ActorActorResponse) validateErrors(formats strfmt.Registry) error { if err := validate.Required("errors", "body", m.Errors); err != nil { return err @@ -82,7 +82,7 @@ func (m *DomainActorsResponse) validateErrors(formats strfmt.Registry) error { return nil } -func (m *DomainActorsResponse) validateMeta(formats strfmt.Registry) error { +func (m *ActorActorResponse) validateMeta(formats strfmt.Registry) error { if err := validate.Required("meta", "body", m.Meta); err != nil { return err @@ -102,7 +102,7 @@ func (m *DomainActorsResponse) validateMeta(formats strfmt.Registry) error { return nil } -func (m *DomainActorsResponse) validateResources(formats strfmt.Registry) error { +func (m *ActorActorResponse) validateResources(formats strfmt.Registry) error { if err := validate.Required("resources", "body", m.Resources); err != nil { return err @@ -129,8 +129,8 @@ func (m *DomainActorsResponse) validateResources(formats strfmt.Registry) error return nil } -// ContextValidate validate this domain actors response based on the context it is used -func (m *DomainActorsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this actor actor response based on the context it is used +func (m *ActorActorResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateErrors(ctx, formats); err != nil { @@ -151,7 +151,7 @@ func (m *DomainActorsResponse) ContextValidate(ctx context.Context, formats strf return nil } -func (m *DomainActorsResponse) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { +func (m *ActorActorResponse) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Errors); i++ { @@ -176,7 +176,7 @@ func (m *DomainActorsResponse) contextValidateErrors(ctx context.Context, format return nil } -func (m *DomainActorsResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { +func (m *ActorActorResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { if m.Meta != nil { @@ -193,7 +193,7 @@ func (m *DomainActorsResponse) contextValidateMeta(ctx context.Context, formats return nil } -func (m *DomainActorsResponse) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { +func (m *ActorActorResponse) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Resources); i++ { @@ -219,7 +219,7 @@ func (m *DomainActorsResponse) contextValidateResources(ctx context.Context, for } // MarshalBinary interface implementation -func (m *DomainActorsResponse) MarshalBinary() ([]byte, error) { +func (m *ActorActorResponse) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -227,8 +227,8 @@ func (m *DomainActorsResponse) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *DomainActorsResponse) UnmarshalBinary(b []byte) error { - var res DomainActorsResponse +func (m *ActorActorResponse) UnmarshalBinary(b []byte) error { + var res ActorActorResponse if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/falcon/models/actor_msa_meta_info_with_paging.go b/falcon/models/actor_msa_meta_info_with_paging.go new file mode 100644 index 000000000..2051c3c08 --- /dev/null +++ b/falcon/models/actor_msa_meta_info_with_paging.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ActorMsaMetaInfoWithPaging actor msa meta info with paging +// +// swagger:model actor.MsaMetaInfoWithPaging +type ActorMsaMetaInfoWithPaging struct { + + // msa meta info + // Required: true + MsaMetaInfo *MsaMetaInfo `json:"MsaMetaInfo"` + + // paging + Paging *MsaPaging `json:"paging,omitempty"` + + // trace id + TraceID string `json:"trace_id,omitempty"` +} + +// Validate validates this actor msa meta info with paging +func (m *ActorMsaMetaInfoWithPaging) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMsaMetaInfo(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePaging(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ActorMsaMetaInfoWithPaging) validateMsaMetaInfo(formats strfmt.Registry) error { + + if err := validate.Required("MsaMetaInfo", "body", m.MsaMetaInfo); err != nil { + return err + } + + if m.MsaMetaInfo != nil { + if err := m.MsaMetaInfo.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("MsaMetaInfo") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("MsaMetaInfo") + } + return err + } + } + + return nil +} + +func (m *ActorMsaMetaInfoWithPaging) validatePaging(formats strfmt.Registry) error { + if swag.IsZero(m.Paging) { // not required + return nil + } + + if m.Paging != nil { + if err := m.Paging.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("paging") + } + return err + } + } + + return nil +} + +// ContextValidate validate this actor msa meta info with paging based on the context it is used +func (m *ActorMsaMetaInfoWithPaging) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMsaMetaInfo(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePaging(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ActorMsaMetaInfoWithPaging) contextValidateMsaMetaInfo(ctx context.Context, formats strfmt.Registry) error { + + if m.MsaMetaInfo != nil { + + if err := m.MsaMetaInfo.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("MsaMetaInfo") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("MsaMetaInfo") + } + return err + } + } + + return nil +} + +func (m *ActorMsaMetaInfoWithPaging) contextValidatePaging(ctx context.Context, formats strfmt.Registry) error { + + if m.Paging != nil { + + if swag.IsZero(m.Paging) { // not required + return nil + } + + if err := m.Paging.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("paging") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("paging") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ActorMsaMetaInfoWithPaging) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ActorMsaMetaInfoWithPaging) UnmarshalBinary(b []byte) error { + var res ActorMsaMetaInfoWithPaging + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_accessible_scopes_response.go b/falcon/models/api_accessible_scopes_response.go new file mode 100644 index 000000000..47cbaff8a --- /dev/null +++ b/falcon/models/api_accessible_scopes_response.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIAccessibleScopesResponse api accessible scopes response +// +// swagger:model api.AccessibleScopesResponse +type APIAccessibleScopesResponse struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + // Required: true + Resources []*MsaspecScope `json:"resources"` +} + +// Validate validates this api accessible scopes response +func (m *APIAccessibleScopesResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIAccessibleScopesResponse) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIAccessibleScopesResponse) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIAccessibleScopesResponse) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api accessible scopes response based on the context it is used +func (m *APIAccessibleScopesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIAccessibleScopesResponse) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIAccessibleScopesResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIAccessibleScopesResponse) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIAccessibleScopesResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIAccessibleScopesResponse) UnmarshalBinary(b []byte) error { + var res APIAccessibleScopesResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_agent_tools_metadata.go b/falcon/models/api_agent_tools_metadata.go new file mode 100644 index 000000000..37c52f584 --- /dev/null +++ b/falcon/models/api_agent_tools_metadata.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIAgentToolsMetadata api agent tools metadata +// +// swagger:model api.AgentToolsMetadata +type APIAgentToolsMetadata struct { + + // enabled + // Required: true + Enabled *bool `json:"enabled"` +} + +// Validate validates this api agent tools metadata +func (m *APIAgentToolsMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEnabled(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIAgentToolsMetadata) validateEnabled(formats strfmt.Registry) error { + + if err := validate.Required("enabled", "body", m.Enabled); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api agent tools metadata based on context it is used +func (m *APIAgentToolsMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APIAgentToolsMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIAgentToolsMetadata) UnmarshalBinary(b []byte) error { + var res APIAgentToolsMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_array_gap.go b/falcon/models/api_array_gap.go new file mode 100644 index 000000000..9bc286d63 --- /dev/null +++ b/falcon/models/api_array_gap.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIArrayGap api array gap +// +// swagger:model api.ArrayGap +type APIArrayGap struct { + + // Exclusive end index of the gap + // Required: true + EndsAtIndex *int32 `json:"ends_at_index"` + + // Inclusive start index of the gap + // Required: true + StartsAtIndex *int32 `json:"starts_at_index"` +} + +// Validate validates this api array gap +func (m *APIArrayGap) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEndsAtIndex(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartsAtIndex(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIArrayGap) validateEndsAtIndex(formats strfmt.Registry) error { + + if err := validate.Required("ends_at_index", "body", m.EndsAtIndex); err != nil { + return err + } + + return nil +} + +func (m *APIArrayGap) validateStartsAtIndex(formats strfmt.Registry) error { + + if err := validate.Required("starts_at_index", "body", m.StartsAtIndex); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api array gap based on context it is used +func (m *APIArrayGap) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APIArrayGap) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIArrayGap) UnmarshalBinary(b []byte) error { + var res APIArrayGap + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_array_with_gap.go b/falcon/models/api_array_with_gap.go new file mode 100644 index 000000000..645d80839 --- /dev/null +++ b/falcon/models/api_array_with_gap.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIArrayWithGap api array with gap +// +// swagger:model api.ArrayWithGap +type APIArrayWithGap struct { + + // Gaps identified for the array prefix + // Required: true + Gaps []*APIArrayGap `json:"gaps"` + + // Prefix up to where the gap was identified + // Required: true + LastValidPrefix *string `json:"last_valid_prefix"` +} + +// Validate validates this api array with gap +func (m *APIArrayWithGap) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGaps(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastValidPrefix(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIArrayWithGap) validateGaps(formats strfmt.Registry) error { + + if err := validate.Required("gaps", "body", m.Gaps); err != nil { + return err + } + + for i := 0; i < len(m.Gaps); i++ { + if swag.IsZero(m.Gaps[i]) { // not required + continue + } + + if m.Gaps[i] != nil { + if err := m.Gaps[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gaps" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("gaps" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIArrayWithGap) validateLastValidPrefix(formats strfmt.Registry) error { + + if err := validate.Required("last_valid_prefix", "body", m.LastValidPrefix); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this api array with gap based on the context it is used +func (m *APIArrayWithGap) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateGaps(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIArrayWithGap) contextValidateGaps(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Gaps); i++ { + + if m.Gaps[i] != nil { + + if swag.IsZero(m.Gaps[i]) { // not required + return nil + } + + if err := m.Gaps[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gaps" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("gaps" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIArrayWithGap) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIArrayWithGap) UnmarshalBinary(b []byte) error { + var res APIArrayWithGap + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_create_dashboard_item.go b/falcon/models/api_bulk_create_dashboard_item.go new file mode 100644 index 000000000..1562d5f6e --- /dev/null +++ b/falcon/models/api_bulk_create_dashboard_item.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkCreateDashboardItem api bulk create dashboard item +// +// swagger:model api.BulkCreateDashboardItem +type APIBulkCreateDashboardItem struct { + + // The name of the dashboard + // Required: true + Name *string `json:"name"` + + // The YAML representation of the dashboard to create + // Required: true + YamlTemplate *string `json:"yaml_template"` +} + +// Validate validates this api bulk create dashboard item +func (m *APIBulkCreateDashboardItem) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateYamlTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateDashboardItem) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *APIBulkCreateDashboardItem) validateYamlTemplate(formats strfmt.Registry) error { + + if err := validate.Required("yaml_template", "body", m.YamlTemplate); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api bulk create dashboard item based on context it is used +func (m *APIBulkCreateDashboardItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkCreateDashboardItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkCreateDashboardItem) UnmarshalBinary(b []byte) error { + var res APIBulkCreateDashboardItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_create_dashboards_from_template_request_v1.go b/falcon/models/api_bulk_create_dashboards_from_template_request_v1.go new file mode 100644 index 000000000..b8de315df --- /dev/null +++ b/falcon/models/api_bulk_create_dashboards_from_template_request_v1.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkCreateDashboardsFromTemplateRequestV1 api bulk create dashboards from template request v1 +// +// swagger:model api.BulkCreateDashboardsFromTemplateRequestV1 +type APIBulkCreateDashboardsFromTemplateRequestV1 struct { + + // List of dashboards to create + // Required: true + DashboardItems []*APIBulkCreateDashboardItem `json:"dashboard_items"` + + // The name of the search domain where the dashboards will be created + // Required: true + SearchDomain *string `json:"search_domain"` +} + +// Validate validates this api bulk create dashboards from template request v1 +func (m *APIBulkCreateDashboardsFromTemplateRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDashboardItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSearchDomain(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateDashboardsFromTemplateRequestV1) validateDashboardItems(formats strfmt.Registry) error { + + if err := validate.Required("dashboard_items", "body", m.DashboardItems); err != nil { + return err + } + + for i := 0; i < len(m.DashboardItems); i++ { + if swag.IsZero(m.DashboardItems[i]) { // not required + continue + } + + if m.DashboardItems[i] != nil { + if err := m.DashboardItems[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dashboard_items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dashboard_items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkCreateDashboardsFromTemplateRequestV1) validateSearchDomain(formats strfmt.Registry) error { + + if err := validate.Required("search_domain", "body", m.SearchDomain); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this api bulk create dashboards from template request v1 based on the context it is used +func (m *APIBulkCreateDashboardsFromTemplateRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDashboardItems(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateDashboardsFromTemplateRequestV1) contextValidateDashboardItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.DashboardItems); i++ { + + if m.DashboardItems[i] != nil { + + if swag.IsZero(m.DashboardItems[i]) { // not required + return nil + } + + if err := m.DashboardItems[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dashboard_items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dashboard_items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkCreateDashboardsFromTemplateRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkCreateDashboardsFromTemplateRequestV1) UnmarshalBinary(b []byte) error { + var res APIBulkCreateDashboardsFromTemplateRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_create_dashboards_from_template_response_v1.go b/falcon/models/api_bulk_create_dashboards_from_template_response_v1.go new file mode 100644 index 000000000..c95894a9d --- /dev/null +++ b/falcon/models/api_bulk_create_dashboards_from_template_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkCreateDashboardsFromTemplateResponseV1 api bulk create dashboards from template response v1 +// +// swagger:model api.BulkCreateDashboardsFromTemplateResponseV1 +type APIBulkCreateDashboardsFromTemplateResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // Array of per-item create results + // Required: true + Resources []*APIDashboardBulkCreateResult `json:"resources"` +} + +// Validate validates this api bulk create dashboards from template response v1 +func (m *APIBulkCreateDashboardsFromTemplateResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateDashboardsFromTemplateResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkCreateDashboardsFromTemplateResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkCreateDashboardsFromTemplateResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api bulk create dashboards from template response v1 based on the context it is used +func (m *APIBulkCreateDashboardsFromTemplateResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateDashboardsFromTemplateResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkCreateDashboardsFromTemplateResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkCreateDashboardsFromTemplateResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkCreateDashboardsFromTemplateResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkCreateDashboardsFromTemplateResponseV1) UnmarshalBinary(b []byte) error { + var res APIBulkCreateDashboardsFromTemplateResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_create_lookup_files_request_v1.go b/falcon/models/api_bulk_create_lookup_files_request_v1.go new file mode 100644 index 000000000..49b887a0d --- /dev/null +++ b/falcon/models/api_bulk_create_lookup_files_request_v1.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkCreateLookupFilesRequestV1 api bulk create lookup files request v1 +// +// swagger:model api.BulkCreateLookupFilesRequestV1 +type APIBulkCreateLookupFilesRequestV1 struct { + + // List of lookup files to create + // Required: true + LookupFiles []*APILookupFileToCreate `json:"lookup_files"` + + // The name of the search domain where the lookup files will be created + // Required: true + SearchDomain *string `json:"search_domain"` +} + +// Validate validates this api bulk create lookup files request v1 +func (m *APIBulkCreateLookupFilesRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLookupFiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSearchDomain(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateLookupFilesRequestV1) validateLookupFiles(formats strfmt.Registry) error { + + if err := validate.Required("lookup_files", "body", m.LookupFiles); err != nil { + return err + } + + for i := 0; i < len(m.LookupFiles); i++ { + if swag.IsZero(m.LookupFiles[i]) { // not required + continue + } + + if m.LookupFiles[i] != nil { + if err := m.LookupFiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lookup_files" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lookup_files" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkCreateLookupFilesRequestV1) validateSearchDomain(formats strfmt.Registry) error { + + if err := validate.Required("search_domain", "body", m.SearchDomain); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this api bulk create lookup files request v1 based on the context it is used +func (m *APIBulkCreateLookupFilesRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLookupFiles(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateLookupFilesRequestV1) contextValidateLookupFiles(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.LookupFiles); i++ { + + if m.LookupFiles[i] != nil { + + if swag.IsZero(m.LookupFiles[i]) { // not required + return nil + } + + if err := m.LookupFiles[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lookup_files" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lookup_files" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkCreateLookupFilesRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkCreateLookupFilesRequestV1) UnmarshalBinary(b []byte) error { + var res APIBulkCreateLookupFilesRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_create_lookup_files_response_v1.go b/falcon/models/api_bulk_create_lookup_files_response_v1.go new file mode 100644 index 000000000..8d84e5e9e --- /dev/null +++ b/falcon/models/api_bulk_create_lookup_files_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkCreateLookupFilesResponseV1 api bulk create lookup files response v1 +// +// swagger:model api.BulkCreateLookupFilesResponseV1 +type APIBulkCreateLookupFilesResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // Array of per-item create results + // Required: true + Resources []*APILookupFileBulkCreateResult `json:"resources"` +} + +// Validate validates this api bulk create lookup files response v1 +func (m *APIBulkCreateLookupFilesResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateLookupFilesResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkCreateLookupFilesResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkCreateLookupFilesResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api bulk create lookup files response v1 based on the context it is used +func (m *APIBulkCreateLookupFilesResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateLookupFilesResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkCreateLookupFilesResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkCreateLookupFilesResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkCreateLookupFilesResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkCreateLookupFilesResponseV1) UnmarshalBinary(b []byte) error { + var res APIBulkCreateLookupFilesResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_create_saved_queries_from_template_request_v1.go b/falcon/models/api_bulk_create_saved_queries_from_template_request_v1.go new file mode 100644 index 000000000..5104f4785 --- /dev/null +++ b/falcon/models/api_bulk_create_saved_queries_from_template_request_v1.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkCreateSavedQueriesFromTemplateRequestV1 api bulk create saved queries from template request v1 +// +// swagger:model api.BulkCreateSavedQueriesFromTemplateRequestV1 +type APIBulkCreateSavedQueriesFromTemplateRequestV1 struct { + + // List of saved queries to create + // Required: true + SavedQueryItems []*APIBulkCreateSavedQueryItem `json:"saved_query_items"` + + // The name of the search domain where saved queries will be created + // Required: true + SearchDomain *string `json:"search_domain"` +} + +// Validate validates this api bulk create saved queries from template request v1 +func (m *APIBulkCreateSavedQueriesFromTemplateRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSavedQueryItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSearchDomain(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateSavedQueriesFromTemplateRequestV1) validateSavedQueryItems(formats strfmt.Registry) error { + + if err := validate.Required("saved_query_items", "body", m.SavedQueryItems); err != nil { + return err + } + + for i := 0; i < len(m.SavedQueryItems); i++ { + if swag.IsZero(m.SavedQueryItems[i]) { // not required + continue + } + + if m.SavedQueryItems[i] != nil { + if err := m.SavedQueryItems[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("saved_query_items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("saved_query_items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkCreateSavedQueriesFromTemplateRequestV1) validateSearchDomain(formats strfmt.Registry) error { + + if err := validate.Required("search_domain", "body", m.SearchDomain); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this api bulk create saved queries from template request v1 based on the context it is used +func (m *APIBulkCreateSavedQueriesFromTemplateRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSavedQueryItems(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateSavedQueriesFromTemplateRequestV1) contextValidateSavedQueryItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.SavedQueryItems); i++ { + + if m.SavedQueryItems[i] != nil { + + if swag.IsZero(m.SavedQueryItems[i]) { // not required + return nil + } + + if err := m.SavedQueryItems[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("saved_query_items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("saved_query_items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkCreateSavedQueriesFromTemplateRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkCreateSavedQueriesFromTemplateRequestV1) UnmarshalBinary(b []byte) error { + var res APIBulkCreateSavedQueriesFromTemplateRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_create_saved_queries_from_template_response_v1.go b/falcon/models/api_bulk_create_saved_queries_from_template_response_v1.go new file mode 100644 index 000000000..45af73939 --- /dev/null +++ b/falcon/models/api_bulk_create_saved_queries_from_template_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkCreateSavedQueriesFromTemplateResponseV1 api bulk create saved queries from template response v1 +// +// swagger:model api.BulkCreateSavedQueriesFromTemplateResponseV1 +type APIBulkCreateSavedQueriesFromTemplateResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // Array of per-item create results + // Required: true + Resources []*APISavedQueryBulkCreateResult `json:"resources"` +} + +// Validate validates this api bulk create saved queries from template response v1 +func (m *APIBulkCreateSavedQueriesFromTemplateResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateSavedQueriesFromTemplateResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkCreateSavedQueriesFromTemplateResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkCreateSavedQueriesFromTemplateResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api bulk create saved queries from template response v1 based on the context it is used +func (m *APIBulkCreateSavedQueriesFromTemplateResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateSavedQueriesFromTemplateResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkCreateSavedQueriesFromTemplateResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkCreateSavedQueriesFromTemplateResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkCreateSavedQueriesFromTemplateResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkCreateSavedQueriesFromTemplateResponseV1) UnmarshalBinary(b []byte) error { + var res APIBulkCreateSavedQueriesFromTemplateResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_create_saved_query_item.go b/falcon/models/api_bulk_create_saved_query_item.go new file mode 100644 index 000000000..cb2884769 --- /dev/null +++ b/falcon/models/api_bulk_create_saved_query_item.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkCreateSavedQueryItem api bulk create saved query item +// +// swagger:model api.BulkCreateSavedQueryItem +type APIBulkCreateSavedQueryItem struct { + + // The YAML representation of the saved query to create + // Required: true + YamlTemplate *string `json:"yaml_template"` +} + +// Validate validates this api bulk create saved query item +func (m *APIBulkCreateSavedQueryItem) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateYamlTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkCreateSavedQueryItem) validateYamlTemplate(formats strfmt.Registry) error { + + if err := validate.Required("yaml_template", "body", m.YamlTemplate); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api bulk create saved query item based on context it is used +func (m *APIBulkCreateSavedQueryItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkCreateSavedQueryItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkCreateSavedQueryItem) UnmarshalBinary(b []byte) error { + var res APIBulkCreateSavedQueryItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_get_lookup_files_response_v1.go b/falcon/models/api_bulk_get_lookup_files_response_v1.go new file mode 100644 index 000000000..84f3104fe --- /dev/null +++ b/falcon/models/api_bulk_get_lookup_files_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkGetLookupFilesResponseV1 api bulk get lookup files response v1 +// +// swagger:model api.BulkGetLookupFilesResponseV1 +type APIBulkGetLookupFilesResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // Contains the retrieved lookup file information + // Required: true + Resources []*APILookupFileInfo `json:"resources"` +} + +// Validate validates this api bulk get lookup files response v1 +func (m *APIBulkGetLookupFilesResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkGetLookupFilesResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkGetLookupFilesResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkGetLookupFilesResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api bulk get lookup files response v1 based on the context it is used +func (m *APIBulkGetLookupFilesResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkGetLookupFilesResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkGetLookupFilesResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkGetLookupFilesResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkGetLookupFilesResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkGetLookupFilesResponseV1) UnmarshalBinary(b []byte) error { + var res APIBulkGetLookupFilesResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_update_dashboard_item.go b/falcon/models/api_bulk_update_dashboard_item.go new file mode 100644 index 000000000..29f5bd7b1 --- /dev/null +++ b/falcon/models/api_bulk_update_dashboard_item.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkUpdateDashboardItem api bulk update dashboard item +// +// swagger:model api.BulkUpdateDashboardItem +type APIBulkUpdateDashboardItem struct { + + // The unique identifier of the dashboard to update + // Required: true + ID *string `json:"id"` + + // The YAML representation of the dashboard to update + // Required: true + YamlTemplate *string `json:"yaml_template"` +} + +// Validate validates this api bulk update dashboard item +func (m *APIBulkUpdateDashboardItem) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateYamlTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateDashboardItem) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *APIBulkUpdateDashboardItem) validateYamlTemplate(formats strfmt.Registry) error { + + if err := validate.Required("yaml_template", "body", m.YamlTemplate); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api bulk update dashboard item based on context it is used +func (m *APIBulkUpdateDashboardItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkUpdateDashboardItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkUpdateDashboardItem) UnmarshalBinary(b []byte) error { + var res APIBulkUpdateDashboardItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_update_dashboards_from_template_request_v1.go b/falcon/models/api_bulk_update_dashboards_from_template_request_v1.go new file mode 100644 index 000000000..b7dc4a8c6 --- /dev/null +++ b/falcon/models/api_bulk_update_dashboards_from_template_request_v1.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkUpdateDashboardsFromTemplateRequestV1 api bulk update dashboards from template request v1 +// +// swagger:model api.BulkUpdateDashboardsFromTemplateRequestV1 +type APIBulkUpdateDashboardsFromTemplateRequestV1 struct { + + // Array of dashboards to update with their IDs and YAML templates + // Required: true + DashboardItems []*APIBulkUpdateDashboardItem `json:"dashboard_items"` + + // The name of the search domain containing the dashboards + // Required: true + SearchDomain *string `json:"search_domain"` +} + +// Validate validates this api bulk update dashboards from template request v1 +func (m *APIBulkUpdateDashboardsFromTemplateRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDashboardItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSearchDomain(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateDashboardsFromTemplateRequestV1) validateDashboardItems(formats strfmt.Registry) error { + + if err := validate.Required("dashboard_items", "body", m.DashboardItems); err != nil { + return err + } + + for i := 0; i < len(m.DashboardItems); i++ { + if swag.IsZero(m.DashboardItems[i]) { // not required + continue + } + + if m.DashboardItems[i] != nil { + if err := m.DashboardItems[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dashboard_items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dashboard_items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkUpdateDashboardsFromTemplateRequestV1) validateSearchDomain(formats strfmt.Registry) error { + + if err := validate.Required("search_domain", "body", m.SearchDomain); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this api bulk update dashboards from template request v1 based on the context it is used +func (m *APIBulkUpdateDashboardsFromTemplateRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDashboardItems(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateDashboardsFromTemplateRequestV1) contextValidateDashboardItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.DashboardItems); i++ { + + if m.DashboardItems[i] != nil { + + if swag.IsZero(m.DashboardItems[i]) { // not required + return nil + } + + if err := m.DashboardItems[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dashboard_items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dashboard_items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkUpdateDashboardsFromTemplateRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkUpdateDashboardsFromTemplateRequestV1) UnmarshalBinary(b []byte) error { + var res APIBulkUpdateDashboardsFromTemplateRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_update_dashboards_from_template_response_v1.go b/falcon/models/api_bulk_update_dashboards_from_template_response_v1.go new file mode 100644 index 000000000..53be91eae --- /dev/null +++ b/falcon/models/api_bulk_update_dashboards_from_template_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkUpdateDashboardsFromTemplateResponseV1 api bulk update dashboards from template response v1 +// +// swagger:model api.BulkUpdateDashboardsFromTemplateResponseV1 +type APIBulkUpdateDashboardsFromTemplateResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // Array of per-item update results + // Required: true + Resources []*APIDashboardBulkUpdateResult `json:"resources"` +} + +// Validate validates this api bulk update dashboards from template response v1 +func (m *APIBulkUpdateDashboardsFromTemplateResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateDashboardsFromTemplateResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkUpdateDashboardsFromTemplateResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkUpdateDashboardsFromTemplateResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api bulk update dashboards from template response v1 based on the context it is used +func (m *APIBulkUpdateDashboardsFromTemplateResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateDashboardsFromTemplateResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkUpdateDashboardsFromTemplateResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkUpdateDashboardsFromTemplateResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkUpdateDashboardsFromTemplateResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkUpdateDashboardsFromTemplateResponseV1) UnmarshalBinary(b []byte) error { + var res APIBulkUpdateDashboardsFromTemplateResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_update_lookup_files_request_v1.go b/falcon/models/api_bulk_update_lookup_files_request_v1.go new file mode 100644 index 000000000..15375e121 --- /dev/null +++ b/falcon/models/api_bulk_update_lookup_files_request_v1.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkUpdateLookupFilesRequestV1 api bulk update lookup files request v1 +// +// swagger:model api.BulkUpdateLookupFilesRequestV1 +type APIBulkUpdateLookupFilesRequestV1 struct { + + // List of lookup files to update + // Required: true + LookupFiles []*APILookupFileToUpdate `json:"lookup_files"` + + // The name of the search domain containing the lookup files + // Required: true + SearchDomain *string `json:"search_domain"` +} + +// Validate validates this api bulk update lookup files request v1 +func (m *APIBulkUpdateLookupFilesRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLookupFiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSearchDomain(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateLookupFilesRequestV1) validateLookupFiles(formats strfmt.Registry) error { + + if err := validate.Required("lookup_files", "body", m.LookupFiles); err != nil { + return err + } + + for i := 0; i < len(m.LookupFiles); i++ { + if swag.IsZero(m.LookupFiles[i]) { // not required + continue + } + + if m.LookupFiles[i] != nil { + if err := m.LookupFiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lookup_files" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lookup_files" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkUpdateLookupFilesRequestV1) validateSearchDomain(formats strfmt.Registry) error { + + if err := validate.Required("search_domain", "body", m.SearchDomain); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this api bulk update lookup files request v1 based on the context it is used +func (m *APIBulkUpdateLookupFilesRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLookupFiles(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateLookupFilesRequestV1) contextValidateLookupFiles(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.LookupFiles); i++ { + + if m.LookupFiles[i] != nil { + + if swag.IsZero(m.LookupFiles[i]) { // not required + return nil + } + + if err := m.LookupFiles[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lookup_files" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lookup_files" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkUpdateLookupFilesRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkUpdateLookupFilesRequestV1) UnmarshalBinary(b []byte) error { + var res APIBulkUpdateLookupFilesRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_update_lookup_files_response_v1.go b/falcon/models/api_bulk_update_lookup_files_response_v1.go new file mode 100644 index 000000000..208c3dc85 --- /dev/null +++ b/falcon/models/api_bulk_update_lookup_files_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkUpdateLookupFilesResponseV1 api bulk update lookup files response v1 +// +// swagger:model api.BulkUpdateLookupFilesResponseV1 +type APIBulkUpdateLookupFilesResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // Array of per-item update results + // Required: true + Resources []*APILookupFileBulkUpdateResult `json:"resources"` +} + +// Validate validates this api bulk update lookup files response v1 +func (m *APIBulkUpdateLookupFilesResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateLookupFilesResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkUpdateLookupFilesResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkUpdateLookupFilesResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api bulk update lookup files response v1 based on the context it is used +func (m *APIBulkUpdateLookupFilesResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateLookupFilesResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkUpdateLookupFilesResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkUpdateLookupFilesResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkUpdateLookupFilesResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkUpdateLookupFilesResponseV1) UnmarshalBinary(b []byte) error { + var res APIBulkUpdateLookupFilesResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_update_saved_queries_from_template_request_v1.go b/falcon/models/api_bulk_update_saved_queries_from_template_request_v1.go new file mode 100644 index 000000000..31bee98f5 --- /dev/null +++ b/falcon/models/api_bulk_update_saved_queries_from_template_request_v1.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkUpdateSavedQueriesFromTemplateRequestV1 api bulk update saved queries from template request v1 +// +// swagger:model api.BulkUpdateSavedQueriesFromTemplateRequestV1 +type APIBulkUpdateSavedQueriesFromTemplateRequestV1 struct { + + // Array of saved queries to update with their IDs and YAML templates + // Required: true + SavedQueryItems []*APIBulkUpdateSavedQueryItem `json:"saved_query_items"` + + // The name of the search domain containing the saved queries + // Required: true + SearchDomain *string `json:"search_domain"` +} + +// Validate validates this api bulk update saved queries from template request v1 +func (m *APIBulkUpdateSavedQueriesFromTemplateRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSavedQueryItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSearchDomain(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateSavedQueriesFromTemplateRequestV1) validateSavedQueryItems(formats strfmt.Registry) error { + + if err := validate.Required("saved_query_items", "body", m.SavedQueryItems); err != nil { + return err + } + + for i := 0; i < len(m.SavedQueryItems); i++ { + if swag.IsZero(m.SavedQueryItems[i]) { // not required + continue + } + + if m.SavedQueryItems[i] != nil { + if err := m.SavedQueryItems[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("saved_query_items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("saved_query_items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkUpdateSavedQueriesFromTemplateRequestV1) validateSearchDomain(formats strfmt.Registry) error { + + if err := validate.Required("search_domain", "body", m.SearchDomain); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this api bulk update saved queries from template request v1 based on the context it is used +func (m *APIBulkUpdateSavedQueriesFromTemplateRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSavedQueryItems(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateSavedQueriesFromTemplateRequestV1) contextValidateSavedQueryItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.SavedQueryItems); i++ { + + if m.SavedQueryItems[i] != nil { + + if swag.IsZero(m.SavedQueryItems[i]) { // not required + return nil + } + + if err := m.SavedQueryItems[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("saved_query_items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("saved_query_items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkUpdateSavedQueriesFromTemplateRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkUpdateSavedQueriesFromTemplateRequestV1) UnmarshalBinary(b []byte) error { + var res APIBulkUpdateSavedQueriesFromTemplateRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_update_saved_queries_from_template_response_v1.go b/falcon/models/api_bulk_update_saved_queries_from_template_response_v1.go new file mode 100644 index 000000000..b73a89f5f --- /dev/null +++ b/falcon/models/api_bulk_update_saved_queries_from_template_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkUpdateSavedQueriesFromTemplateResponseV1 api bulk update saved queries from template response v1 +// +// swagger:model api.BulkUpdateSavedQueriesFromTemplateResponseV1 +type APIBulkUpdateSavedQueriesFromTemplateResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // Array of per-item update results + // Required: true + Resources []*APISavedQueryBulkUpdateResult `json:"resources"` +} + +// Validate validates this api bulk update saved queries from template response v1 +func (m *APIBulkUpdateSavedQueriesFromTemplateResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateSavedQueriesFromTemplateResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkUpdateSavedQueriesFromTemplateResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkUpdateSavedQueriesFromTemplateResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api bulk update saved queries from template response v1 based on the context it is used +func (m *APIBulkUpdateSavedQueriesFromTemplateResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateSavedQueriesFromTemplateResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIBulkUpdateSavedQueriesFromTemplateResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *APIBulkUpdateSavedQueriesFromTemplateResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkUpdateSavedQueriesFromTemplateResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkUpdateSavedQueriesFromTemplateResponseV1) UnmarshalBinary(b []byte) error { + var res APIBulkUpdateSavedQueriesFromTemplateResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_bulk_update_saved_query_item.go b/falcon/models/api_bulk_update_saved_query_item.go new file mode 100644 index 000000000..f6bc864e0 --- /dev/null +++ b/falcon/models/api_bulk_update_saved_query_item.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIBulkUpdateSavedQueryItem api bulk update saved query item +// +// swagger:model api.BulkUpdateSavedQueryItem +type APIBulkUpdateSavedQueryItem struct { + + // The unique identifier of the saved query to update + // Required: true + ID *string `json:"id"` + + // The YAML representation of the saved query to update + // Required: true + YamlTemplate *string `json:"yaml_template"` +} + +// Validate validates this api bulk update saved query item +func (m *APIBulkUpdateSavedQueryItem) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateYamlTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIBulkUpdateSavedQueryItem) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *APIBulkUpdateSavedQueryItem) validateYamlTemplate(formats strfmt.Registry) error { + + if err := validate.Required("yaml_template", "body", m.YamlTemplate); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api bulk update saved query item based on context it is used +func (m *APIBulkUpdateSavedQueryItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APIBulkUpdateSavedQueryItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIBulkUpdateSavedQueryItem) UnmarshalBinary(b []byte) error { + var res APIBulkUpdateSavedQueryItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_client_request.go b/falcon/models/api_client_request.go new file mode 100644 index 000000000..8be723eed --- /dev/null +++ b/falcon/models/api_client_request.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIClientRequest api client request +// +// swagger:model api.ClientRequest +type APIClientRequest struct { + + // description + // Required: true + Description *string `json:"description"` + + // name + // Required: true + Name *string `json:"name"` + + // scopes + // Required: true + Scopes []string `json:"scopes"` +} + +// Validate validates this api client request +func (m *APIClientRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScopes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIClientRequest) validateDescription(formats strfmt.Registry) error { + + if err := validate.Required("description", "body", m.Description); err != nil { + return err + } + + return nil +} + +func (m *APIClientRequest) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *APIClientRequest) validateScopes(formats strfmt.Registry) error { + + if err := validate.Required("scopes", "body", m.Scopes); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api client request based on context it is used +func (m *APIClientRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APIClientRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIClientRequest) UnmarshalBinary(b []byte) error { + var res APIClientRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_cloud_application_update_request_v1.go b/falcon/models/api_cloud_application_update_request_v1.go index 6a4fc23c0..a7066e148 100644 --- a/falcon/models/api_cloud_application_update_request_v1.go +++ b/falcon/models/api_cloud_application_update_request_v1.go @@ -12,7 +12,6 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // APICloudApplicationUpdateRequestV1 api cloud application update request v1 @@ -21,15 +20,12 @@ import ( type APICloudApplicationUpdateRequestV1 struct { // description - // Required: true - Description *string `json:"description"` + Description string `json:"description,omitempty"` // name - // Required: true - Name *string `json:"name"` + Name string `json:"name,omitempty"` // urls - // Required: true Urls []*APIWebAppURL `json:"urls"` } @@ -37,14 +33,6 @@ type APICloudApplicationUpdateRequestV1 struct { func (m *APICloudApplicationUpdateRequestV1) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateDescription(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - if err := m.validateUrls(formats); err != nil { res = append(res, err) } @@ -55,28 +43,9 @@ func (m *APICloudApplicationUpdateRequestV1) Validate(formats strfmt.Registry) e return nil } -func (m *APICloudApplicationUpdateRequestV1) validateDescription(formats strfmt.Registry) error { - - if err := validate.Required("description", "body", m.Description); err != nil { - return err - } - - return nil -} - -func (m *APICloudApplicationUpdateRequestV1) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - func (m *APICloudApplicationUpdateRequestV1) validateUrls(formats strfmt.Registry) error { - - if err := validate.Required("urls", "body", m.Urls); err != nil { - return err + if swag.IsZero(m.Urls) { // not required + return nil } for i := 0; i < len(m.Urls); i++ { diff --git a/falcon/models/api_collection_metadata.go b/falcon/models/api_collection_metadata.go index 1cbfe1764..78e08f317 100644 --- a/falcon/models/api_collection_metadata.go +++ b/falcon/models/api_collection_metadata.go @@ -19,6 +19,9 @@ import ( // swagger:model api.CollectionMetadata type APICollectionMetadata struct { + // agent tools meta + AgentToolsMeta *APIAgentToolsMetadata `json:"agent_tools_meta,omitempty"` + // created by CreatedBy *APIUserMetadata `json:"created_by,omitempty"` @@ -78,6 +81,10 @@ type APICollectionMetadata struct { func (m *APICollectionMetadata) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAgentToolsMeta(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreatedBy(formats); err != nil { res = append(res, err) } @@ -124,6 +131,25 @@ func (m *APICollectionMetadata) Validate(formats strfmt.Registry) error { return nil } +func (m *APICollectionMetadata) validateAgentToolsMeta(formats strfmt.Registry) error { + if swag.IsZero(m.AgentToolsMeta) { // not required + return nil + } + + if m.AgentToolsMeta != nil { + if err := m.AgentToolsMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("agent_tools_meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("agent_tools_meta") + } + return err + } + } + + return nil +} + func (m *APICollectionMetadata) validateCreatedBy(formats strfmt.Registry) error { if swag.IsZero(m.CreatedBy) { // not required return nil @@ -256,6 +282,10 @@ func (m *APICollectionMetadata) validateWorkflowMeta(formats strfmt.Registry) er func (m *APICollectionMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAgentToolsMeta(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreatedBy(ctx, formats); err != nil { res = append(res, err) } @@ -274,6 +304,27 @@ func (m *APICollectionMetadata) ContextValidate(ctx context.Context, formats str return nil } +func (m *APICollectionMetadata) contextValidateAgentToolsMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.AgentToolsMeta != nil { + + if swag.IsZero(m.AgentToolsMeta) { // not required + return nil + } + + if err := m.AgentToolsMeta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("agent_tools_meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("agent_tools_meta") + } + return err + } + } + + return nil +} + func (m *APICollectionMetadata) contextValidateCreatedBy(ctx context.Context, formats strfmt.Registry) error { if m.CreatedBy != nil { diff --git a/falcon/models/api_content_pattern_update_request_v1.go b/falcon/models/api_content_pattern_update_request_v1.go index bd3fe6c38..13db7d4c2 100644 --- a/falcon/models/api_content_pattern_update_request_v1.go +++ b/falcon/models/api_content_pattern_update_request_v1.go @@ -8,10 +8,8 @@ package models import ( "context" - "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // APIContentPatternUpdateRequestV1 api content pattern update request v1 @@ -20,115 +18,26 @@ import ( type APIContentPatternUpdateRequestV1 struct { // description - // Required: true - Description *string `json:"description"` + Description string `json:"description,omitempty"` // example - // Required: true - Example *string `json:"example"` + Example string `json:"example,omitempty"` // id - // Required: true - ID *string `json:"id"` + ID string `json:"id,omitempty"` // min match threshold - // Required: true - MinMatchThreshold *int32 `json:"min_match_threshold"` + MinMatchThreshold int32 `json:"min_match_threshold,omitempty"` // name - // Required: true - Name *string `json:"name"` + Name string `json:"name,omitempty"` // regexes - // Required: true Regexes []string `json:"regexes"` } // Validate validates this api content pattern update request v1 func (m *APIContentPatternUpdateRequestV1) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDescription(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExample(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMinMatchThreshold(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRegexes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *APIContentPatternUpdateRequestV1) validateDescription(formats strfmt.Registry) error { - - if err := validate.Required("description", "body", m.Description); err != nil { - return err - } - - return nil -} - -func (m *APIContentPatternUpdateRequestV1) validateExample(formats strfmt.Registry) error { - - if err := validate.Required("example", "body", m.Example); err != nil { - return err - } - - return nil -} - -func (m *APIContentPatternUpdateRequestV1) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *APIContentPatternUpdateRequestV1) validateMinMatchThreshold(formats strfmt.Registry) error { - - if err := validate.Required("min_match_threshold", "body", m.MinMatchThreshold); err != nil { - return err - } - - return nil -} - -func (m *APIContentPatternUpdateRequestV1) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *APIContentPatternUpdateRequestV1) validateRegexes(formats strfmt.Registry) error { - - if err := validate.Required("regexes", "body", m.Regexes); err != nil { - return err - } - return nil } diff --git a/falcon/models/api_create_parser_extension_request_v1.go b/falcon/models/api_create_parser_extension_request_v1.go new file mode 100644 index 000000000..22ef63fcd --- /dev/null +++ b/falcon/models/api_create_parser_extension_request_v1.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APICreateParserExtensionRequestV1 api create parser extension request v1 +// +// swagger:model api.CreateParserExtensionRequestV1 +type APICreateParserExtensionRequestV1 struct { + + // base parser id + // Required: true + BaseParserID *string `json:"base_parser_id"` + + // extension name + // Required: true + ExtensionName *string `json:"extension_name"` + + // parser id + ParserID string `json:"parser_id,omitempty"` + + // post processing script + PostProcessingScript string `json:"post_processing_script,omitempty"` + + // pre processing script + PreProcessingScript string `json:"pre_processing_script,omitempty"` + + // test cases + TestCases []*APIParserTestCase `json:"test_cases"` +} + +// Validate validates this api create parser extension request v1 +func (m *APICreateParserExtensionRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBaseParserID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateExtensionName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTestCases(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APICreateParserExtensionRequestV1) validateBaseParserID(formats strfmt.Registry) error { + + if err := validate.Required("base_parser_id", "body", m.BaseParserID); err != nil { + return err + } + + return nil +} + +func (m *APICreateParserExtensionRequestV1) validateExtensionName(formats strfmt.Registry) error { + + if err := validate.Required("extension_name", "body", m.ExtensionName); err != nil { + return err + } + + return nil +} + +func (m *APICreateParserExtensionRequestV1) validateTestCases(formats strfmt.Registry) error { + if swag.IsZero(m.TestCases) { // not required + return nil + } + + for i := 0; i < len(m.TestCases); i++ { + if swag.IsZero(m.TestCases[i]) { // not required + continue + } + + if m.TestCases[i] != nil { + if err := m.TestCases[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("test_cases" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("test_cases" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api create parser extension request v1 based on the context it is used +func (m *APICreateParserExtensionRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTestCases(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APICreateParserExtensionRequestV1) contextValidateTestCases(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.TestCases); i++ { + + if m.TestCases[i] != nil { + + if swag.IsZero(m.TestCases[i]) { // not required + return nil + } + + if err := m.TestCases[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("test_cases" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("test_cases" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *APICreateParserExtensionRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APICreateParserExtensionRequestV1) UnmarshalBinary(b []byte) error { + var res APICreateParserExtensionRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_create_web_location_request_v2.go b/falcon/models/api_create_web_location_request_v2.go index 801d03dc3..8a84b0990 100644 --- a/falcon/models/api_create_web_location_request_v2.go +++ b/falcon/models/api_create_web_location_request_v2.go @@ -45,6 +45,9 @@ type APICreateWebLocationRequestV2 struct { // type // Required: true Type *string `json:"type"` + + // web location group ids + WebLocationGroupIds []string `json:"web_location_group_ids"` } // Validate validates this api create web location request v2 diff --git a/falcon/models/api_dashboard_bulk_create_result.go b/falcon/models/api_dashboard_bulk_create_result.go new file mode 100644 index 000000000..b77c9a1ab --- /dev/null +++ b/falcon/models/api_dashboard_bulk_create_result.go @@ -0,0 +1,91 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIDashboardBulkCreateResult api dashboard bulk create result +// +// swagger:model api.DashboardBulkCreateResult +type APIDashboardBulkCreateResult struct { + + // error + Error string `json:"error,omitempty"` + + // id + // Required: true + ID *string `json:"id"` + + // success + // Required: true + Success *bool `json:"success"` +} + +// Validate validates this api dashboard bulk create result +func (m *APIDashboardBulkCreateResult) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSuccess(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIDashboardBulkCreateResult) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *APIDashboardBulkCreateResult) validateSuccess(formats strfmt.Registry) error { + + if err := validate.Required("success", "body", m.Success); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api dashboard bulk create result based on context it is used +func (m *APIDashboardBulkCreateResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APIDashboardBulkCreateResult) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIDashboardBulkCreateResult) UnmarshalBinary(b []byte) error { + var res APIDashboardBulkCreateResult + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_dashboard_bulk_update_result.go b/falcon/models/api_dashboard_bulk_update_result.go new file mode 100644 index 000000000..e5cad15a7 --- /dev/null +++ b/falcon/models/api_dashboard_bulk_update_result.go @@ -0,0 +1,91 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APIDashboardBulkUpdateResult api dashboard bulk update result +// +// swagger:model api.DashboardBulkUpdateResult +type APIDashboardBulkUpdateResult struct { + + // error + Error string `json:"error,omitempty"` + + // id + // Required: true + ID *string `json:"id"` + + // success + // Required: true + Success *bool `json:"success"` +} + +// Validate validates this api dashboard bulk update result +func (m *APIDashboardBulkUpdateResult) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSuccess(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIDashboardBulkUpdateResult) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *APIDashboardBulkUpdateResult) validateSuccess(formats strfmt.Registry) error { + + if err := validate.Required("success", "body", m.Success); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api dashboard bulk update result based on context it is used +func (m *APIDashboardBulkUpdateResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APIDashboardBulkUpdateResult) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APIDashboardBulkUpdateResult) UnmarshalBinary(b []byte) error { + var res APIDashboardBulkUpdateResult + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_enterprise_account_update_request_v1.go b/falcon/models/api_enterprise_account_update_request_v1.go index 31422b190..f3d765d33 100644 --- a/falcon/models/api_enterprise_account_update_request_v1.go +++ b/falcon/models/api_enterprise_account_update_request_v1.go @@ -8,10 +8,8 @@ package models import ( "context" - "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // APIEnterpriseAccountUpdateRequestV1 api enterprise account update request v1 @@ -20,64 +18,17 @@ import ( type APIEnterpriseAccountUpdateRequestV1 struct { // domains - // Required: true Domains []string `json:"domains"` // id - // Required: true - ID *string `json:"id"` + ID string `json:"id,omitempty"` // name - // Required: true - Name *string `json:"name"` + Name string `json:"name,omitempty"` } // Validate validates this api enterprise account update request v1 func (m *APIEnterpriseAccountUpdateRequestV1) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDomains(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *APIEnterpriseAccountUpdateRequestV1) validateDomains(formats strfmt.Registry) error { - - if err := validate.Required("domains", "body", m.Domains); err != nil { - return err - } - - return nil -} - -func (m *APIEnterpriseAccountUpdateRequestV1) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *APIEnterpriseAccountUpdateRequestV1) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - return nil } diff --git a/falcon/models/api_lookup_file_bulk_create_result.go b/falcon/models/api_lookup_file_bulk_create_result.go new file mode 100644 index 000000000..6bbefa9b2 --- /dev/null +++ b/falcon/models/api_lookup_file_bulk_create_result.go @@ -0,0 +1,91 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APILookupFileBulkCreateResult api lookup file bulk create result +// +// swagger:model api.LookupFileBulkCreateResult +type APILookupFileBulkCreateResult struct { + + // error + Error string `json:"error,omitempty"` + + // filename + // Required: true + Filename *string `json:"filename"` + + // success + // Required: true + Success *bool `json:"success"` +} + +// Validate validates this api lookup file bulk create result +func (m *APILookupFileBulkCreateResult) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilename(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSuccess(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APILookupFileBulkCreateResult) validateFilename(formats strfmt.Registry) error { + + if err := validate.Required("filename", "body", m.Filename); err != nil { + return err + } + + return nil +} + +func (m *APILookupFileBulkCreateResult) validateSuccess(formats strfmt.Registry) error { + + if err := validate.Required("success", "body", m.Success); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api lookup file bulk create result based on context it is used +func (m *APILookupFileBulkCreateResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APILookupFileBulkCreateResult) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APILookupFileBulkCreateResult) UnmarshalBinary(b []byte) error { + var res APILookupFileBulkCreateResult + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_lookup_file_bulk_update_result.go b/falcon/models/api_lookup_file_bulk_update_result.go new file mode 100644 index 000000000..859cee070 --- /dev/null +++ b/falcon/models/api_lookup_file_bulk_update_result.go @@ -0,0 +1,91 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APILookupFileBulkUpdateResult api lookup file bulk update result +// +// swagger:model api.LookupFileBulkUpdateResult +type APILookupFileBulkUpdateResult struct { + + // error + Error string `json:"error,omitempty"` + + // filename + // Required: true + Filename *string `json:"filename"` + + // success + // Required: true + Success *bool `json:"success"` +} + +// Validate validates this api lookup file bulk update result +func (m *APILookupFileBulkUpdateResult) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilename(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSuccess(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APILookupFileBulkUpdateResult) validateFilename(formats strfmt.Registry) error { + + if err := validate.Required("filename", "body", m.Filename); err != nil { + return err + } + + return nil +} + +func (m *APILookupFileBulkUpdateResult) validateSuccess(formats strfmt.Registry) error { + + if err := validate.Required("success", "body", m.Success); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api lookup file bulk update result based on context it is used +func (m *APILookupFileBulkUpdateResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APILookupFileBulkUpdateResult) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APILookupFileBulkUpdateResult) UnmarshalBinary(b []byte) error { + var res APILookupFileBulkUpdateResult + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_lookup_file_info.go b/falcon/models/api_lookup_file_info.go new file mode 100644 index 000000000..eb97886ef --- /dev/null +++ b/falcon/models/api_lookup_file_info.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APILookupFileInfo api lookup file info +// +// swagger:model api.LookupFileInfo +type APILookupFileInfo struct { + + // The content of the lookup file (for specific filename requests) + Content string `json:"content,omitempty"` + + // The name of the lookup file + // Required: true + Filename *string `json:"filename"` +} + +// Validate validates this api lookup file info +func (m *APILookupFileInfo) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilename(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APILookupFileInfo) validateFilename(formats strfmt.Registry) error { + + if err := validate.Required("filename", "body", m.Filename); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api lookup file info based on context it is used +func (m *APILookupFileInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APILookupFileInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APILookupFileInfo) UnmarshalBinary(b []byte) error { + var res APILookupFileInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_lookup_file_to_create.go b/falcon/models/api_lookup_file_to_create.go new file mode 100644 index 000000000..63afc2143 --- /dev/null +++ b/falcon/models/api_lookup_file_to_create.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APILookupFileToCreate api lookup file to create +// +// swagger:model api.LookupFileToCreate +type APILookupFileToCreate struct { + + // The content of the lookup file (CSV or JSON format) + // Required: true + Content *string `json:"content"` + + // The name of the lookup file + // Required: true + Filename *string `json:"filename"` +} + +// Validate validates this api lookup file to create +func (m *APILookupFileToCreate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateContent(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFilename(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APILookupFileToCreate) validateContent(formats strfmt.Registry) error { + + if err := validate.Required("content", "body", m.Content); err != nil { + return err + } + + return nil +} + +func (m *APILookupFileToCreate) validateFilename(formats strfmt.Registry) error { + + if err := validate.Required("filename", "body", m.Filename); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api lookup file to create based on context it is used +func (m *APILookupFileToCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APILookupFileToCreate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APILookupFileToCreate) UnmarshalBinary(b []byte) error { + var res APILookupFileToCreate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_lookup_file_to_update.go b/falcon/models/api_lookup_file_to_update.go new file mode 100644 index 000000000..d9df99e2e --- /dev/null +++ b/falcon/models/api_lookup_file_to_update.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APILookupFileToUpdate api lookup file to update +// +// swagger:model api.LookupFileToUpdate +type APILookupFileToUpdate struct { + + // The new content of the lookup file (CSV or JSON format) + // Required: true + Content *string `json:"content"` + + // The name of the lookup file to update + // Required: true + Filename *string `json:"filename"` +} + +// Validate validates this api lookup file to update +func (m *APILookupFileToUpdate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateContent(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFilename(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APILookupFileToUpdate) validateContent(formats strfmt.Registry) error { + + if err := validate.Required("content", "body", m.Content); err != nil { + return err + } + + return nil +} + +func (m *APILookupFileToUpdate) validateFilename(formats strfmt.Registry) error { + + if err := validate.Required("filename", "body", m.Filename); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api lookup file to update based on context it is used +func (m *APILookupFileToUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APILookupFileToUpdate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APILookupFileToUpdate) UnmarshalBinary(b []byte) error { + var res APILookupFileToUpdate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_parser_test_case_output_failures.go b/falcon/models/api_parser_test_case_output_failures.go index 6818b6dbf..24fb57782 100644 --- a/falcon/models/api_parser_test_case_output_failures.go +++ b/falcon/models/api_parser_test_case_output_failures.go @@ -19,27 +19,70 @@ import ( // swagger:model api.ParserTestCaseOutputFailures type APIParserTestCaseOutputFailures struct { + // Arrays with gaps in their indices + ArraysWithGaps []*APIArrayWithGap `json:"arrays_with_gaps"` + // Assertion failures on fields AssertionFailuresOnFields []*APIAssertionFailureOnField `json:"assertion_failures_on_fields"` + // Fields starting with '#' that are not proper tags + FalselyTaggedFields []string `json:"falsely_tagged_fields"` + // Parsing errors ParsingErrors []string `json:"parsing_errors"` + + // Schema violations detected + SchemaViolations []*APISchemaViolation `json:"schema_violations"` } // Validate validates this api parser test case output failures func (m *APIParserTestCaseOutputFailures) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateArraysWithGaps(formats); err != nil { + res = append(res, err) + } + if err := m.validateAssertionFailuresOnFields(formats); err != nil { res = append(res, err) } + if err := m.validateSchemaViolations(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +func (m *APIParserTestCaseOutputFailures) validateArraysWithGaps(formats strfmt.Registry) error { + if swag.IsZero(m.ArraysWithGaps) { // not required + return nil + } + + for i := 0; i < len(m.ArraysWithGaps); i++ { + if swag.IsZero(m.ArraysWithGaps[i]) { // not required + continue + } + + if m.ArraysWithGaps[i] != nil { + if err := m.ArraysWithGaps[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("arrays_with_gaps" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("arrays_with_gaps" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *APIParserTestCaseOutputFailures) validateAssertionFailuresOnFields(formats strfmt.Registry) error { if swag.IsZero(m.AssertionFailuresOnFields) { // not required return nil @@ -66,20 +109,79 @@ func (m *APIParserTestCaseOutputFailures) validateAssertionFailuresOnFields(form return nil } +func (m *APIParserTestCaseOutputFailures) validateSchemaViolations(formats strfmt.Registry) error { + if swag.IsZero(m.SchemaViolations) { // not required + return nil + } + + for i := 0; i < len(m.SchemaViolations); i++ { + if swag.IsZero(m.SchemaViolations[i]) { // not required + continue + } + + if m.SchemaViolations[i] != nil { + if err := m.SchemaViolations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("schema_violations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("schema_violations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + // ContextValidate validate this api parser test case output failures based on the context it is used func (m *APIParserTestCaseOutputFailures) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateArraysWithGaps(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateAssertionFailuresOnFields(ctx, formats); err != nil { res = append(res, err) } + if err := m.contextValidateSchemaViolations(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +func (m *APIParserTestCaseOutputFailures) contextValidateArraysWithGaps(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ArraysWithGaps); i++ { + + if m.ArraysWithGaps[i] != nil { + + if swag.IsZero(m.ArraysWithGaps[i]) { // not required + return nil + } + + if err := m.ArraysWithGaps[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("arrays_with_gaps" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("arrays_with_gaps" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *APIParserTestCaseOutputFailures) contextValidateAssertionFailuresOnFields(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.AssertionFailuresOnFields); i++ { @@ -105,6 +207,31 @@ func (m *APIParserTestCaseOutputFailures) contextValidateAssertionFailuresOnFiel return nil } +func (m *APIParserTestCaseOutputFailures) contextValidateSchemaViolations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.SchemaViolations); i++ { + + if m.SchemaViolations[i] != nil { + + if swag.IsZero(m.SchemaViolations[i]) { // not required + return nil + } + + if err := m.SchemaViolations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("schema_violations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("schema_violations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *APIParserTestCaseOutputFailures) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/falcon/models/api_post_enrollment_details_v4.go b/falcon/models/api_post_enrollment_details_v4.go index 60e885cb8..816842897 100644 --- a/falcon/models/api_post_enrollment_details_v4.go +++ b/falcon/models/api_post_enrollment_details_v4.go @@ -31,6 +31,9 @@ type APIPostEnrollmentDetailsV4 struct { // Required: true // Format: date-time ExpiresAt *strfmt.DateTime `json:"expires_at"` + + // use network extension + UseNetworkExtension bool `json:"use_network_extension,omitempty"` } // Validate validates this api post enrollment details v4 diff --git a/falcon/models/api_saved_query_bulk_create_result.go b/falcon/models/api_saved_query_bulk_create_result.go new file mode 100644 index 000000000..3309b6aa2 --- /dev/null +++ b/falcon/models/api_saved_query_bulk_create_result.go @@ -0,0 +1,91 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APISavedQueryBulkCreateResult api saved query bulk create result +// +// swagger:model api.SavedQueryBulkCreateResult +type APISavedQueryBulkCreateResult struct { + + // error + Error string `json:"error,omitempty"` + + // id + // Required: true + ID *string `json:"id"` + + // success + // Required: true + Success *bool `json:"success"` +} + +// Validate validates this api saved query bulk create result +func (m *APISavedQueryBulkCreateResult) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSuccess(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APISavedQueryBulkCreateResult) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *APISavedQueryBulkCreateResult) validateSuccess(formats strfmt.Registry) error { + + if err := validate.Required("success", "body", m.Success); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api saved query bulk create result based on context it is used +func (m *APISavedQueryBulkCreateResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APISavedQueryBulkCreateResult) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APISavedQueryBulkCreateResult) UnmarshalBinary(b []byte) error { + var res APISavedQueryBulkCreateResult + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_saved_query_bulk_update_result.go b/falcon/models/api_saved_query_bulk_update_result.go new file mode 100644 index 000000000..34860b190 --- /dev/null +++ b/falcon/models/api_saved_query_bulk_update_result.go @@ -0,0 +1,91 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APISavedQueryBulkUpdateResult api saved query bulk update result +// +// swagger:model api.SavedQueryBulkUpdateResult +type APISavedQueryBulkUpdateResult struct { + + // error + Error string `json:"error,omitempty"` + + // id + // Required: true + ID *string `json:"id"` + + // success + // Required: true + Success *bool `json:"success"` +} + +// Validate validates this api saved query bulk update result +func (m *APISavedQueryBulkUpdateResult) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSuccess(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APISavedQueryBulkUpdateResult) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *APISavedQueryBulkUpdateResult) validateSuccess(formats strfmt.Registry) error { + + if err := validate.Required("success", "body", m.Success); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api saved query bulk update result based on context it is used +func (m *APISavedQueryBulkUpdateResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APISavedQueryBulkUpdateResult) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APISavedQueryBulkUpdateResult) UnmarshalBinary(b []byte) error { + var res APISavedQueryBulkUpdateResult + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_schema_violation.go b/falcon/models/api_schema_violation.go new file mode 100644 index 000000000..fcf95e14c --- /dev/null +++ b/falcon/models/api_schema_violation.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// APISchemaViolation api schema violation +// +// swagger:model api.SchemaViolation +type APISchemaViolation struct { + + // Description of the violation + // Required: true + ErrorMessage *string `json:"error_message"` + + // Name of the field with the violation + // Required: true + FieldName *string `json:"field_name"` +} + +// Validate validates this api schema violation +func (m *APISchemaViolation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrorMessage(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFieldName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APISchemaViolation) validateErrorMessage(formats strfmt.Registry) error { + + if err := validate.Required("error_message", "body", m.ErrorMessage); err != nil { + return err + } + + return nil +} + +func (m *APISchemaViolation) validateFieldName(formats strfmt.Registry) error { + + if err := validate.Required("field_name", "body", m.FieldName); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this api schema violation based on context it is used +func (m *APISchemaViolation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *APISchemaViolation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *APISchemaViolation) UnmarshalBinary(b []byte) error { + var res APISchemaViolation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/api_update_web_location_request_v2.go b/falcon/models/api_update_web_location_request_v2.go index 998782f4c..fb03e3d1a 100644 --- a/falcon/models/api_update_web_location_request_v2.go +++ b/falcon/models/api_update_web_location_request_v2.go @@ -49,6 +49,9 @@ type APIUpdateWebLocationRequestV2 struct { // type // Required: true Type *string `json:"type"` + + // web location group ids + WebLocationGroupIds []string `json:"web_location_group_ids"` } // Validate validates this api update web location request v2 diff --git a/falcon/models/api_web_location_v2.go b/falcon/models/api_web_location_v2.go index d709e6393..aac458386 100644 --- a/falcon/models/api_web_location_v2.go +++ b/falcon/models/api_web_location_v2.go @@ -63,6 +63,10 @@ type APIWebLocationV2 struct { // type // Required: true Type *string `json:"type"` + + // web location group ids + // Required: true + WebLocationGroupIds []string `json:"web_location_group_ids"` } // Validate validates this api web location v2 @@ -93,6 +97,10 @@ func (m *APIWebLocationV2) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateWebLocationGroupIds(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -159,6 +167,15 @@ func (m *APIWebLocationV2) validateType(formats strfmt.Registry) error { return nil } +func (m *APIWebLocationV2) validateWebLocationGroupIds(formats strfmt.Registry) error { + + if err := validate.Required("web_location_group_ids", "body", m.WebLocationGroupIds); err != nil { + return err + } + + return nil +} + // ContextValidate validates this api web location v2 based on context it is used func (m *APIWebLocationV2) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/falcon/models/apimodels_rule_selection_filter.go b/falcon/models/apimodels_rule_selection_filter.go index 7d157c0e7..d54fb2985 100644 --- a/falcon/models/apimodels_rule_selection_filter.go +++ b/falcon/models/apimodels_rule_selection_filter.go @@ -29,6 +29,12 @@ type ApimodelsRuleSelectionFilter struct { // rule providers RuleProviders []string `json:"rule_providers"` + // rule resource type names + RuleResourceTypeNames []string `json:"rule_resource_type_names"` + + // rule risk factors + RuleRiskFactors []string `json:"rule_risk_factors"` + // rule services RuleServices []string `json:"rule_services"` diff --git a/falcon/models/assetgroupmanager_v1_cloud_resource_filters.go b/falcon/models/assetgroupmanager_v1_cloud_resource_filters.go index 0ffb69f36..21157b490 100644 --- a/falcon/models/assetgroupmanager_v1_cloud_resource_filters.go +++ b/falcon/models/assetgroupmanager_v1_cloud_resource_filters.go @@ -17,6 +17,9 @@ import ( // swagger:model assetgroupmanager.v1.CloudResourceFilters type AssetgroupmanagerV1CloudResourceFilters struct { + // gcrn + Gcrn []string `json:"gcrn"` + // region Region []string `json:"region"` diff --git a/falcon/models/assetgroupmanager_v1_cloud_resource_selector.go b/falcon/models/assetgroupmanager_v1_cloud_resource_selector.go index 5326a1184..5915838ff 100644 --- a/falcon/models/assetgroupmanager_v1_cloud_resource_selector.go +++ b/falcon/models/assetgroupmanager_v1_cloud_resource_selector.go @@ -29,7 +29,7 @@ type AssetgroupmanagerV1CloudResourceSelector struct { // cloud provider // Required: true - // Enum: [aws azure gcp] + // Enum: [aws azure gcp oci] CloudProvider *string `json:"cloud_provider"` // Filter to be used to select the cloud resource. Selector will find assets matching the filters. @@ -59,7 +59,7 @@ var assetgroupmanagerV1CloudResourceSelectorTypeCloudProviderPropEnum []interfac func init() { var res []string - if err := json.Unmarshal([]byte(`["aws","azure","gcp"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["aws","azure","gcp","oci"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -77,6 +77,9 @@ const ( // AssetgroupmanagerV1CloudResourceSelectorCloudProviderGcp captures enum value "gcp" AssetgroupmanagerV1CloudResourceSelectorCloudProviderGcp string = "gcp" + + // AssetgroupmanagerV1CloudResourceSelectorCloudProviderOci captures enum value "oci" + AssetgroupmanagerV1CloudResourceSelectorCloudProviderOci string = "oci" ) // prop value enum diff --git a/falcon/models/assets_get_resources_request.go b/falcon/models/assets_get_resources_request.go new file mode 100644 index 000000000..4fa9be79a --- /dev/null +++ b/falcon/models/assets_get_resources_request.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AssetsGetResourcesRequest assets get resources request +// +// swagger:model assets.GetResourcesRequest +type AssetsGetResourcesRequest struct { + + // ids + // Required: true + Ids []string `json:"ids"` +} + +// Validate validates this assets get resources request +func (m *AssetsGetResourcesRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIds(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AssetsGetResourcesRequest) validateIds(formats strfmt.Registry) error { + + if err := validate.Required("ids", "body", m.Ids); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this assets get resources request based on context it is used +func (m *AssetsGetResourcesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AssetsGetResourcesRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AssetsGetResourcesRequest) UnmarshalBinary(b []byte) error { + var res AssetsGetResourcesRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_agentless_scanning_region_custom_network_configuration.go b/falcon/models/azure_agentless_scanning_region_custom_network_configuration.go new file mode 100644 index 000000000..85783815c --- /dev/null +++ b/falcon/models/azure_agentless_scanning_region_custom_network_configuration.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AzureAgentlessScanningRegionCustomNetworkConfiguration azure agentless scanning region custom network configuration +// +// swagger:model azure.AgentlessScanningRegionCustomNetworkConfiguration +type AzureAgentlessScanningRegionCustomNetworkConfiguration struct { + + // clones subnet id + ClonesSubnetID string `json:"clones_subnet_id,omitempty"` + + // scanners subnet id + ScannersSubnetID string `json:"scanners_subnet_id,omitempty"` +} + +// Validate validates this azure agentless scanning region custom network configuration +func (m *AzureAgentlessScanningRegionCustomNetworkConfiguration) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this azure agentless scanning region custom network configuration based on context it is used +func (m *AzureAgentlessScanningRegionCustomNetworkConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AzureAgentlessScanningRegionCustomNetworkConfiguration) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureAgentlessScanningRegionCustomNetworkConfiguration) UnmarshalBinary(b []byte) error { + var res AzureAgentlessScanningRegionCustomNetworkConfiguration + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_azure_registration_create_input.go b/falcon/models/azure_azure_registration_create_input.go index cbabf1d16..694d4b3a0 100644 --- a/falcon/models/azure_azure_registration_create_input.go +++ b/falcon/models/azure_azure_registration_create_input.go @@ -131,6 +131,20 @@ type AzureAzureRegistrationCreateInput struct { // tenant name // Required: true TenantName *string `json:"tenant_name"` + + // Map of region names to custom VNET configuration for Vulnerability Scanning + VulnerabilityScanningCustomVnetConfiguration AzureVulnerabilityScanningSettingsVulnerabilityScanningCustomVnetConfiguration `json:"vulnerability_scanning_custom_vnet_configuration,omitempty"` + + // vulnerability scanning host subscription id + VulnerabilityScanningHostSubscriptionID string `json:"vulnerability_scanning_host_subscription_id,omitempty"` + + // Network configuration type for Vulnerability Scanning + // Enum: [managed managed_no_nat custom] + VulnerabilityScanningNetworkConfigurationType string `json:"vulnerability_scanning_network_configuration_type,omitempty"` + + // vulnerability scanning regions + // Required: true + VulnerabilityScanningRegions []string `json:"vulnerability_scanning_regions"` } // Validate validates this azure azure registration create input @@ -193,6 +207,18 @@ func (m *AzureAzureRegistrationCreateInput) Validate(formats strfmt.Registry) er res = append(res, err) } + if err := m.validateVulnerabilityScanningCustomVnetConfiguration(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVulnerabilityScanningNetworkConfigurationType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVulnerabilityScanningRegions(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -424,6 +450,79 @@ func (m *AzureAzureRegistrationCreateInput) validateTenantName(formats strfmt.Re return nil } +func (m *AzureAzureRegistrationCreateInput) validateVulnerabilityScanningCustomVnetConfiguration(formats strfmt.Registry) error { + if swag.IsZero(m.VulnerabilityScanningCustomVnetConfiguration) { // not required + return nil + } + + if m.VulnerabilityScanningCustomVnetConfiguration != nil { + if err := m.VulnerabilityScanningCustomVnetConfiguration.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_custom_vnet_configuration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_custom_vnet_configuration") + } + return err + } + } + + return nil +} + +var azureAzureRegistrationCreateInputTypeVulnerabilityScanningNetworkConfigurationTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["managed","managed_no_nat","custom"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + azureAzureRegistrationCreateInputTypeVulnerabilityScanningNetworkConfigurationTypePropEnum = append(azureAzureRegistrationCreateInputTypeVulnerabilityScanningNetworkConfigurationTypePropEnum, v) + } +} + +const ( + + // AzureAzureRegistrationCreateInputVulnerabilityScanningNetworkConfigurationTypeManaged captures enum value "managed" + AzureAzureRegistrationCreateInputVulnerabilityScanningNetworkConfigurationTypeManaged string = "managed" + + // AzureAzureRegistrationCreateInputVulnerabilityScanningNetworkConfigurationTypeManagedNoNat captures enum value "managed_no_nat" + AzureAzureRegistrationCreateInputVulnerabilityScanningNetworkConfigurationTypeManagedNoNat string = "managed_no_nat" + + // AzureAzureRegistrationCreateInputVulnerabilityScanningNetworkConfigurationTypeCustom captures enum value "custom" + AzureAzureRegistrationCreateInputVulnerabilityScanningNetworkConfigurationTypeCustom string = "custom" +) + +// prop value enum +func (m *AzureAzureRegistrationCreateInput) validateVulnerabilityScanningNetworkConfigurationTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, azureAzureRegistrationCreateInputTypeVulnerabilityScanningNetworkConfigurationTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *AzureAzureRegistrationCreateInput) validateVulnerabilityScanningNetworkConfigurationType(formats strfmt.Registry) error { + if swag.IsZero(m.VulnerabilityScanningNetworkConfigurationType) { // not required + return nil + } + + // value enum + if err := m.validateVulnerabilityScanningNetworkConfigurationTypeEnum("vulnerability_scanning_network_configuration_type", "body", m.VulnerabilityScanningNetworkConfigurationType); err != nil { + return err + } + + return nil +} + +func (m *AzureAzureRegistrationCreateInput) validateVulnerabilityScanningRegions(formats strfmt.Registry) error { + + if err := validate.Required("vulnerability_scanning_regions", "body", m.VulnerabilityScanningRegions); err != nil { + return err + } + + return nil +} + // ContextValidate validate this azure azure registration create input based on the context it is used func (m *AzureAzureRegistrationCreateInput) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -444,6 +543,10 @@ func (m *AzureAzureRegistrationCreateInput) ContextValidate(ctx context.Context, res = append(res, err) } + if err := m.contextValidateVulnerabilityScanningCustomVnetConfiguration(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -543,6 +646,24 @@ func (m *AzureAzureRegistrationCreateInput) contextValidateProducts(ctx context. return nil } +func (m *AzureAzureRegistrationCreateInput) contextValidateVulnerabilityScanningCustomVnetConfiguration(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.VulnerabilityScanningCustomVnetConfiguration) { // not required + return nil + } + + if err := m.VulnerabilityScanningCustomVnetConfiguration.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_custom_vnet_configuration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_custom_vnet_configuration") + } + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *AzureAzureRegistrationCreateInput) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/falcon/models/azure_azure_registration_update_input.go b/falcon/models/azure_azure_registration_update_input.go index 97af78cf1..718794df1 100644 --- a/falcon/models/azure_azure_registration_update_input.go +++ b/falcon/models/azure_azure_registration_update_input.go @@ -133,6 +133,20 @@ type AzureAzureRegistrationUpdateInput struct { // tenant name // Required: true TenantName *string `json:"tenant_name"` + + // Map of region names to custom VNET configuration for Vulnerability Scanning + VulnerabilityScanningCustomVnetConfiguration AzureVulnerabilityScanningSettingsVulnerabilityScanningCustomVnetConfiguration `json:"vulnerability_scanning_custom_vnet_configuration,omitempty"` + + // vulnerability scanning host subscription id + VulnerabilityScanningHostSubscriptionID string `json:"vulnerability_scanning_host_subscription_id,omitempty"` + + // Network configuration type for Vulnerability Scanning + // Enum: [managed managed_no_nat custom] + VulnerabilityScanningNetworkConfigurationType string `json:"vulnerability_scanning_network_configuration_type,omitempty"` + + // vulnerability scanning regions + // Required: true + VulnerabilityScanningRegions []string `json:"vulnerability_scanning_regions"` } // Validate validates this azure azure registration update input @@ -191,6 +205,18 @@ func (m *AzureAzureRegistrationUpdateInput) Validate(formats strfmt.Registry) er res = append(res, err) } + if err := m.validateVulnerabilityScanningCustomVnetConfiguration(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVulnerabilityScanningNetworkConfigurationType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVulnerabilityScanningRegions(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -413,6 +439,79 @@ func (m *AzureAzureRegistrationUpdateInput) validateTenantName(formats strfmt.Re return nil } +func (m *AzureAzureRegistrationUpdateInput) validateVulnerabilityScanningCustomVnetConfiguration(formats strfmt.Registry) error { + if swag.IsZero(m.VulnerabilityScanningCustomVnetConfiguration) { // not required + return nil + } + + if m.VulnerabilityScanningCustomVnetConfiguration != nil { + if err := m.VulnerabilityScanningCustomVnetConfiguration.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_custom_vnet_configuration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_custom_vnet_configuration") + } + return err + } + } + + return nil +} + +var azureAzureRegistrationUpdateInputTypeVulnerabilityScanningNetworkConfigurationTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["managed","managed_no_nat","custom"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + azureAzureRegistrationUpdateInputTypeVulnerabilityScanningNetworkConfigurationTypePropEnum = append(azureAzureRegistrationUpdateInputTypeVulnerabilityScanningNetworkConfigurationTypePropEnum, v) + } +} + +const ( + + // AzureAzureRegistrationUpdateInputVulnerabilityScanningNetworkConfigurationTypeManaged captures enum value "managed" + AzureAzureRegistrationUpdateInputVulnerabilityScanningNetworkConfigurationTypeManaged string = "managed" + + // AzureAzureRegistrationUpdateInputVulnerabilityScanningNetworkConfigurationTypeManagedNoNat captures enum value "managed_no_nat" + AzureAzureRegistrationUpdateInputVulnerabilityScanningNetworkConfigurationTypeManagedNoNat string = "managed_no_nat" + + // AzureAzureRegistrationUpdateInputVulnerabilityScanningNetworkConfigurationTypeCustom captures enum value "custom" + AzureAzureRegistrationUpdateInputVulnerabilityScanningNetworkConfigurationTypeCustom string = "custom" +) + +// prop value enum +func (m *AzureAzureRegistrationUpdateInput) validateVulnerabilityScanningNetworkConfigurationTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, azureAzureRegistrationUpdateInputTypeVulnerabilityScanningNetworkConfigurationTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *AzureAzureRegistrationUpdateInput) validateVulnerabilityScanningNetworkConfigurationType(formats strfmt.Registry) error { + if swag.IsZero(m.VulnerabilityScanningNetworkConfigurationType) { // not required + return nil + } + + // value enum + if err := m.validateVulnerabilityScanningNetworkConfigurationTypeEnum("vulnerability_scanning_network_configuration_type", "body", m.VulnerabilityScanningNetworkConfigurationType); err != nil { + return err + } + + return nil +} + +func (m *AzureAzureRegistrationUpdateInput) validateVulnerabilityScanningRegions(formats strfmt.Registry) error { + + if err := validate.Required("vulnerability_scanning_regions", "body", m.VulnerabilityScanningRegions); err != nil { + return err + } + + return nil +} + // ContextValidate validate this azure azure registration update input based on the context it is used func (m *AzureAzureRegistrationUpdateInput) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -433,6 +532,10 @@ func (m *AzureAzureRegistrationUpdateInput) ContextValidate(ctx context.Context, res = append(res, err) } + if err := m.contextValidateVulnerabilityScanningCustomVnetConfiguration(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -532,6 +635,24 @@ func (m *AzureAzureRegistrationUpdateInput) contextValidateProducts(ctx context. return nil } +func (m *AzureAzureRegistrationUpdateInput) contextValidateVulnerabilityScanningCustomVnetConfiguration(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.VulnerabilityScanningCustomVnetConfiguration) { // not required + return nil + } + + if err := m.VulnerabilityScanningCustomVnetConfiguration.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_custom_vnet_configuration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_custom_vnet_configuration") + } + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *AzureAzureRegistrationUpdateInput) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/falcon/models/azure_d_s_p_m_region_custom_network_configuration.go b/falcon/models/azure_d_s_p_m_region_custom_network_configuration.go deleted file mode 100644 index b3db4a55c..000000000 --- a/falcon/models/azure_d_s_p_m_region_custom_network_configuration.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AzureDSPMRegionCustomNetworkConfiguration azure d s p m region custom network configuration -// -// swagger:model azure.DSPMRegionCustomNetworkConfiguration -type AzureDSPMRegionCustomNetworkConfiguration struct { - - // clones subnet id - ClonesSubnetID string `json:"clones_subnet_id,omitempty"` - - // scanners subnet id - ScannersSubnetID string `json:"scanners_subnet_id,omitempty"` -} - -// Validate validates this azure d s p m region custom network configuration -func (m *AzureDSPMRegionCustomNetworkConfiguration) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this azure d s p m region custom network configuration based on context it is used -func (m *AzureDSPMRegionCustomNetworkConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AzureDSPMRegionCustomNetworkConfiguration) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AzureDSPMRegionCustomNetworkConfiguration) UnmarshalBinary(b []byte) error { - var res AzureDSPMRegionCustomNetworkConfiguration - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/falcon/models/azure_d_s_p_m_settings_dspm_custom_vnet_configuration.go b/falcon/models/azure_d_s_p_m_settings_dspm_custom_vnet_configuration.go index 569c85715..768fc17f3 100644 --- a/falcon/models/azure_d_s_p_m_settings_dspm_custom_vnet_configuration.go +++ b/falcon/models/azure_d_s_p_m_settings_dspm_custom_vnet_configuration.go @@ -16,7 +16,7 @@ import ( // AzureDSPMSettingsDspmCustomVnetConfiguration azure d s p m settings dspm custom vnet configuration // // swagger:model azure.DSPMSettings.dspm_custom_vnet_configuration -type AzureDSPMSettingsDspmCustomVnetConfiguration map[string]AzureDSPMRegionCustomNetworkConfiguration +type AzureDSPMSettingsDspmCustomVnetConfiguration map[string]AzureAgentlessScanningRegionCustomNetworkConfiguration // Validate validates this azure d s p m settings dspm custom vnet configuration func (m AzureDSPMSettingsDspmCustomVnetConfiguration) Validate(formats strfmt.Registry) error { diff --git a/falcon/models/azure_event_hub_settings.go b/falcon/models/azure_event_hub_settings.go index 34d378b3f..3ac9cc312 100644 --- a/falcon/models/azure_event_hub_settings.go +++ b/falcon/models/azure_event_hub_settings.go @@ -31,6 +31,9 @@ type AzureEventHubSettings struct { // Required: true EventHubID *string `json:"event_hub_id"` + // management type + ManagementType string `json:"management_type,omitempty"` + // purpose // Required: true Purpose *string `json:"purpose"` diff --git a/falcon/models/azure_impacted_entities.go b/falcon/models/azure_impacted_entities.go new file mode 100644 index 000000000..869d78f9e --- /dev/null +++ b/falcon/models/azure_impacted_entities.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureImpactedEntities azure impacted entities +// +// swagger:model azure.ImpactedEntities +type AzureImpactedEntities struct { + + // affected + // Required: true + Affected *int32 `json:"affected"` + + // total + // Required: true + Total *int32 `json:"total"` +} + +// Validate validates this azure impacted entities +func (m *AzureImpactedEntities) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAffected(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureImpactedEntities) validateAffected(formats strfmt.Registry) error { + + if err := validate.Required("affected", "body", m.Affected); err != nil { + return err + } + + return nil +} + +func (m *AzureImpactedEntities) validateTotal(formats strfmt.Registry) error { + + if err := validate.Required("total", "body", m.Total); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this azure impacted entities based on context it is used +func (m *AzureImpactedEntities) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AzureImpactedEntities) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureImpactedEntities) UnmarshalBinary(b []byte) error { + var res AzureImpactedEntities + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_issue.go b/falcon/models/azure_issue.go new file mode 100644 index 000000000..b35d623e7 --- /dev/null +++ b/falcon/models/azure_issue.go @@ -0,0 +1,253 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureIssue azure issue +// +// swagger:model azure.Issue +type AzureIssue struct { + + // category + // Required: true + Category *string `json:"category"` + + // entity id + EntityID string `json:"entity_id,omitempty"` + + // entity name + EntityName string `json:"entity_name,omitempty"` + + // entity type + EntityType string `json:"entity_type,omitempty"` + + // feature + Feature string `json:"feature,omitempty"` + + // first seen + // Format: date-time + FirstSeen strfmt.DateTime `json:"first_seen,omitempty"` + + // impact + // Required: true + Impact *string `json:"impact"` + + // impacted entities + ImpactedEntities *AzureImpactedEntities `json:"impacted_entities,omitempty"` + + // issue + // Required: true + Issue *string `json:"issue"` + + // last seen + // Format: date-time + LastSeen strfmt.DateTime `json:"last_seen,omitempty"` + + // name + // Required: true + Name *string `json:"name"` + + // region + Region string `json:"region,omitempty"` + + // severity + // Required: true + Severity *string `json:"severity"` + + // status + Status string `json:"status,omitempty"` +} + +// Validate validates this azure issue +func (m *AzureIssue) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCategory(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFirstSeen(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImpact(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImpactedEntities(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIssue(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastSeen(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSeverity(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureIssue) validateCategory(formats strfmt.Registry) error { + + if err := validate.Required("category", "body", m.Category); err != nil { + return err + } + + return nil +} + +func (m *AzureIssue) validateFirstSeen(formats strfmt.Registry) error { + if swag.IsZero(m.FirstSeen) { // not required + return nil + } + + if err := validate.FormatOf("first_seen", "body", "date-time", m.FirstSeen.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *AzureIssue) validateImpact(formats strfmt.Registry) error { + + if err := validate.Required("impact", "body", m.Impact); err != nil { + return err + } + + return nil +} + +func (m *AzureIssue) validateImpactedEntities(formats strfmt.Registry) error { + if swag.IsZero(m.ImpactedEntities) { // not required + return nil + } + + if m.ImpactedEntities != nil { + if err := m.ImpactedEntities.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("impacted_entities") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("impacted_entities") + } + return err + } + } + + return nil +} + +func (m *AzureIssue) validateIssue(formats strfmt.Registry) error { + + if err := validate.Required("issue", "body", m.Issue); err != nil { + return err + } + + return nil +} + +func (m *AzureIssue) validateLastSeen(formats strfmt.Registry) error { + if swag.IsZero(m.LastSeen) { // not required + return nil + } + + if err := validate.FormatOf("last_seen", "body", "date-time", m.LastSeen.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *AzureIssue) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *AzureIssue) validateSeverity(formats strfmt.Registry) error { + + if err := validate.Required("severity", "body", m.Severity); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this azure issue based on the context it is used +func (m *AzureIssue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateImpactedEntities(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureIssue) contextValidateImpactedEntities(ctx context.Context, formats strfmt.Registry) error { + + if m.ImpactedEntities != nil { + + if swag.IsZero(m.ImpactedEntities) { // not required + return nil + } + + if err := m.ImpactedEntities.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("impacted_entities") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("impacted_entities") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AzureIssue) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureIssue) UnmarshalBinary(b []byte) error { + var res AzureIssue + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_issue_field_value.go b/falcon/models/azure_issue_field_value.go new file mode 100644 index 000000000..62bf2a2ca --- /dev/null +++ b/falcon/models/azure_issue_field_value.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureIssueFieldValue azure issue field value +// +// swagger:model azure.IssueFieldValue +type AzureIssueFieldValue struct { + + // count + // Required: true + Count *int32 `json:"count"` + + // value + // Required: true + Value *string `json:"value"` +} + +// Validate validates this azure issue field value +func (m *AzureIssueFieldValue) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureIssueFieldValue) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("count", "body", m.Count); err != nil { + return err + } + + return nil +} + +func (m *AzureIssueFieldValue) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this azure issue field value based on context it is used +func (m *AzureIssueFieldValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AzureIssueFieldValue) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureIssueFieldValue) UnmarshalBinary(b []byte) error { + var res AzureIssueFieldValue + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_issue_response_ext_v1.go b/falcon/models/azure_issue_response_ext_v1.go new file mode 100644 index 000000000..3cca5d54a --- /dev/null +++ b/falcon/models/azure_issue_response_ext_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureIssueResponseExtV1 azure issue response ext v1 +// +// swagger:model azure.IssueResponseExtV1 +type AzureIssueResponseExtV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + // Required: true + Resources []*AzureIssue `json:"resources"` +} + +// Validate validates this azure issue response ext v1 +func (m *AzureIssueResponseExtV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureIssueResponseExtV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AzureIssueResponseExtV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *AzureIssueResponseExtV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this azure issue response ext v1 based on the context it is used +func (m *AzureIssueResponseExtV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureIssueResponseExtV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AzureIssueResponseExtV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *AzureIssueResponseExtV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AzureIssueResponseExtV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureIssueResponseExtV1) UnmarshalBinary(b []byte) error { + var res AzureIssueResponseExtV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_issue_suppression_values_by_field_response.go b/falcon/models/azure_issue_suppression_values_by_field_response.go new file mode 100644 index 000000000..ae0d178b5 --- /dev/null +++ b/falcon/models/azure_issue_suppression_values_by_field_response.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureIssueSuppressionValuesByFieldResponse azure issue suppression values by field response +// +// swagger:model azure.IssueSuppressionValuesByFieldResponse +type AzureIssueSuppressionValuesByFieldResponse struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + // Required: true + Resources []*AzureIssueFieldValue `json:"resources"` +} + +// Validate validates this azure issue suppression values by field response +func (m *AzureIssueSuppressionValuesByFieldResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureIssueSuppressionValuesByFieldResponse) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AzureIssueSuppressionValuesByFieldResponse) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *AzureIssueSuppressionValuesByFieldResponse) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this azure issue suppression values by field response based on the context it is used +func (m *AzureIssueSuppressionValuesByFieldResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureIssueSuppressionValuesByFieldResponse) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AzureIssueSuppressionValuesByFieldResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *AzureIssueSuppressionValuesByFieldResponse) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AzureIssueSuppressionValuesByFieldResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureIssueSuppressionValuesByFieldResponse) UnmarshalBinary(b []byte) error { + var res AzureIssueSuppressionValuesByFieldResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_issue_values_by_field_response.go b/falcon/models/azure_issue_values_by_field_response.go new file mode 100644 index 000000000..5f6a621a8 --- /dev/null +++ b/falcon/models/azure_issue_values_by_field_response.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureIssueValuesByFieldResponse azure issue values by field response +// +// swagger:model azure.IssueValuesByFieldResponse +type AzureIssueValuesByFieldResponse struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + // Required: true + Resources []*AzureIssueFieldValue `json:"resources"` +} + +// Validate validates this azure issue values by field response +func (m *AzureIssueValuesByFieldResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureIssueValuesByFieldResponse) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AzureIssueValuesByFieldResponse) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *AzureIssueValuesByFieldResponse) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this azure issue values by field response based on the context it is used +func (m *AzureIssueValuesByFieldResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureIssueValuesByFieldResponse) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AzureIssueValuesByFieldResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *AzureIssueValuesByFieldResponse) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AzureIssueValuesByFieldResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureIssueValuesByFieldResponse) UnmarshalBinary(b []byte) error { + var res AzureIssueValuesByFieldResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_script_version.go b/falcon/models/azure_script_version.go new file mode 100644 index 000000000..3763a86ce --- /dev/null +++ b/falcon/models/azure_script_version.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureScriptVersion azure script version +// +// swagger:model azure.ScriptVersion +type AzureScriptVersion struct { + + // deployment method + // Required: true + DeploymentMethod *string `json:"deployment_method"` + + // download url + // Required: true + DownloadURL *string `json:"download_url"` + + // published date + // Required: true + // Format: date-time + PublishedDate *strfmt.DateTime `json:"published_date"` + + // version + // Required: true + Version *string `json:"version"` +} + +// Validate validates this azure script version +func (m *AzureScriptVersion) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeploymentMethod(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDownloadURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePublishedDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVersion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureScriptVersion) validateDeploymentMethod(formats strfmt.Registry) error { + + if err := validate.Required("deployment_method", "body", m.DeploymentMethod); err != nil { + return err + } + + return nil +} + +func (m *AzureScriptVersion) validateDownloadURL(formats strfmt.Registry) error { + + if err := validate.Required("download_url", "body", m.DownloadURL); err != nil { + return err + } + + return nil +} + +func (m *AzureScriptVersion) validatePublishedDate(formats strfmt.Registry) error { + + if err := validate.Required("published_date", "body", m.PublishedDate); err != nil { + return err + } + + if err := validate.FormatOf("published_date", "body", "date-time", m.PublishedDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *AzureScriptVersion) validateVersion(formats strfmt.Registry) error { + + if err := validate.Required("version", "body", m.Version); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this azure script version based on context it is used +func (m *AzureScriptVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AzureScriptVersion) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureScriptVersion) UnmarshalBinary(b []byte) error { + var res AzureScriptVersion + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_script_version_response_ext_v1.go b/falcon/models/azure_script_version_response_ext_v1.go new file mode 100644 index 000000000..a60e61157 --- /dev/null +++ b/falcon/models/azure_script_version_response_ext_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureScriptVersionResponseExtV1 azure script version response ext v1 +// +// swagger:model azure.ScriptVersionResponseExtV1 +type AzureScriptVersionResponseExtV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + // Required: true + Resources []*AzureScriptVersion `json:"resources"` +} + +// Validate validates this azure script version response ext v1 +func (m *AzureScriptVersionResponseExtV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureScriptVersionResponseExtV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AzureScriptVersionResponseExtV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *AzureScriptVersionResponseExtV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this azure script version response ext v1 based on the context it is used +func (m *AzureScriptVersionResponseExtV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureScriptVersionResponseExtV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AzureScriptVersionResponseExtV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *AzureScriptVersionResponseExtV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AzureScriptVersionResponseExtV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureScriptVersionResponseExtV1) UnmarshalBinary(b []byte) error { + var res AzureScriptVersionResponseExtV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_suppression.go b/falcon/models/azure_suppression.go new file mode 100644 index 000000000..fa075be7e --- /dev/null +++ b/falcon/models/azure_suppression.go @@ -0,0 +1,233 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureSuppression azure suppression +// +// swagger:model azure.Suppression +type AzureSuppression struct { + + // category + Category string `json:"category,omitempty"` + + // created at + // Format: date-time + CreatedAt strfmt.DateTime `json:"created_at,omitempty"` + + // entity id + // Required: true + EntityID *string `json:"entity_id"` + + // entity type + // Required: true + EntityType *string `json:"entity_type"` + + // impact + // Required: true + Impact *string `json:"impact"` + + // issue name + // Required: true + IssueName *string `json:"issue_name"` + + // reason + Reason string `json:"reason,omitempty"` + + // registration id + // Required: true + RegistrationID *string `json:"registration_id"` + + // severity + // Required: true + Severity *string `json:"severity"` + + // suppressed by + // Required: true + SuppressedBy *string `json:"suppressed_by"` + + // suppression id + // Required: true + SuppressionID *string `json:"suppression_id"` + + // type + // Required: true + Type *string `json:"type"` +} + +// Validate validates this azure suppression +func (m *AzureSuppression) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEntityID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEntityType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImpact(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIssueName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegistrationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSeverity(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSuppressedBy(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSuppressionID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureSuppression) validateCreatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.CreatedAt) { // not required + return nil + } + + if err := validate.FormatOf("created_at", "body", "date-time", m.CreatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *AzureSuppression) validateEntityID(formats strfmt.Registry) error { + + if err := validate.Required("entity_id", "body", m.EntityID); err != nil { + return err + } + + return nil +} + +func (m *AzureSuppression) validateEntityType(formats strfmt.Registry) error { + + if err := validate.Required("entity_type", "body", m.EntityType); err != nil { + return err + } + + return nil +} + +func (m *AzureSuppression) validateImpact(formats strfmt.Registry) error { + + if err := validate.Required("impact", "body", m.Impact); err != nil { + return err + } + + return nil +} + +func (m *AzureSuppression) validateIssueName(formats strfmt.Registry) error { + + if err := validate.Required("issue_name", "body", m.IssueName); err != nil { + return err + } + + return nil +} + +func (m *AzureSuppression) validateRegistrationID(formats strfmt.Registry) error { + + if err := validate.Required("registration_id", "body", m.RegistrationID); err != nil { + return err + } + + return nil +} + +func (m *AzureSuppression) validateSeverity(formats strfmt.Registry) error { + + if err := validate.Required("severity", "body", m.Severity); err != nil { + return err + } + + return nil +} + +func (m *AzureSuppression) validateSuppressedBy(formats strfmt.Registry) error { + + if err := validate.Required("suppressed_by", "body", m.SuppressedBy); err != nil { + return err + } + + return nil +} + +func (m *AzureSuppression) validateSuppressionID(formats strfmt.Registry) error { + + if err := validate.Required("suppression_id", "body", m.SuppressionID); err != nil { + return err + } + + return nil +} + +func (m *AzureSuppression) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this azure suppression based on context it is used +func (m *AzureSuppression) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AzureSuppression) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureSuppression) UnmarshalBinary(b []byte) error { + var res AzureSuppression + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_suppression_create_input.go b/falcon/models/azure_suppression_create_input.go new file mode 100644 index 000000000..26ef7dc9d --- /dev/null +++ b/falcon/models/azure_suppression_create_input.go @@ -0,0 +1,145 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureSuppressionCreateInput azure suppression create input +// +// swagger:model azure.SuppressionCreateInput +type AzureSuppressionCreateInput struct { + + // reason + Reason string `json:"reason,omitempty"` + + // registration id + // Required: true + RegistrationID *string `json:"registration_id"` + + // target + // Required: true + Target *AzureSuppressionTarget `json:"target"` + + // type + // Required: true + Type *string `json:"type"` +} + +// Validate validates this azure suppression create input +func (m *AzureSuppressionCreateInput) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRegistrationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTarget(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureSuppressionCreateInput) validateRegistrationID(formats strfmt.Registry) error { + + if err := validate.Required("registration_id", "body", m.RegistrationID); err != nil { + return err + } + + return nil +} + +func (m *AzureSuppressionCreateInput) validateTarget(formats strfmt.Registry) error { + + if err := validate.Required("target", "body", m.Target); err != nil { + return err + } + + if m.Target != nil { + if err := m.Target.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("target") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("target") + } + return err + } + } + + return nil +} + +func (m *AzureSuppressionCreateInput) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this azure suppression create input based on the context it is used +func (m *AzureSuppressionCreateInput) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTarget(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureSuppressionCreateInput) contextValidateTarget(ctx context.Context, formats strfmt.Registry) error { + + if m.Target != nil { + + if err := m.Target.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("target") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("target") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AzureSuppressionCreateInput) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureSuppressionCreateInput) UnmarshalBinary(b []byte) error { + var res AzureSuppressionCreateInput + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_suppression_create_request.go b/falcon/models/azure_suppression_create_request.go new file mode 100644 index 000000000..69c2abd22 --- /dev/null +++ b/falcon/models/azure_suppression_create_request.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureSuppressionCreateRequest azure suppression create request +// +// swagger:model azure.SuppressionCreateRequest +type AzureSuppressionCreateRequest struct { + + // resources + // Required: true + Resources []*AzureSuppressionCreateInput `json:"resources"` +} + +// Validate validates this azure suppression create request +func (m *AzureSuppressionCreateRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureSuppressionCreateRequest) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this azure suppression create request based on the context it is used +func (m *AzureSuppressionCreateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureSuppressionCreateRequest) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AzureSuppressionCreateRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureSuppressionCreateRequest) UnmarshalBinary(b []byte) error { + var res AzureSuppressionCreateRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_suppression_delete_request.go b/falcon/models/azure_suppression_delete_request.go new file mode 100644 index 000000000..f6eba8a50 --- /dev/null +++ b/falcon/models/azure_suppression_delete_request.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureSuppressionDeleteRequest azure suppression delete request +// +// swagger:model azure.SuppressionDeleteRequest +type AzureSuppressionDeleteRequest struct { + + // suppression ids + // Required: true + SuppressionIds []string `json:"suppression_ids"` +} + +// Validate validates this azure suppression delete request +func (m *AzureSuppressionDeleteRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSuppressionIds(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureSuppressionDeleteRequest) validateSuppressionIds(formats strfmt.Registry) error { + + if err := validate.Required("suppression_ids", "body", m.SuppressionIds); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this azure suppression delete request based on context it is used +func (m *AzureSuppressionDeleteRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AzureSuppressionDeleteRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureSuppressionDeleteRequest) UnmarshalBinary(b []byte) error { + var res AzureSuppressionDeleteRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_suppression_response_ext_v1.go b/falcon/models/azure_suppression_response_ext_v1.go new file mode 100644 index 000000000..ae5610c19 --- /dev/null +++ b/falcon/models/azure_suppression_response_ext_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureSuppressionResponseExtV1 azure suppression response ext v1 +// +// swagger:model azure.SuppressionResponseExtV1 +type AzureSuppressionResponseExtV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + // Required: true + Resources []*AzureSuppression `json:"resources"` +} + +// Validate validates this azure suppression response ext v1 +func (m *AzureSuppressionResponseExtV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureSuppressionResponseExtV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AzureSuppressionResponseExtV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *AzureSuppressionResponseExtV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this azure suppression response ext v1 based on the context it is used +func (m *AzureSuppressionResponseExtV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureSuppressionResponseExtV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AzureSuppressionResponseExtV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *AzureSuppressionResponseExtV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AzureSuppressionResponseExtV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureSuppressionResponseExtV1) UnmarshalBinary(b []byte) error { + var res AzureSuppressionResponseExtV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_suppression_target.go b/falcon/models/azure_suppression_target.go new file mode 100644 index 000000000..dec5cf2eb --- /dev/null +++ b/falcon/models/azure_suppression_target.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AzureSuppressionTarget azure suppression target +// +// swagger:model azure.SuppressionTarget +type AzureSuppressionTarget struct { + + // entity id + EntityID string `json:"entity_id,omitempty"` + + // entity type + EntityType string `json:"entity_type,omitempty"` + + // issue name + IssueName string `json:"issue_name,omitempty"` +} + +// Validate validates this azure suppression target +func (m *AzureSuppressionTarget) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this azure suppression target based on context it is used +func (m *AzureSuppressionTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AzureSuppressionTarget) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureSuppressionTarget) UnmarshalBinary(b []byte) error { + var res AzureSuppressionTarget + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_suppression_update_input.go b/falcon/models/azure_suppression_update_input.go new file mode 100644 index 000000000..001bf64ae --- /dev/null +++ b/falcon/models/azure_suppression_update_input.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureSuppressionUpdateInput azure suppression update input +// +// swagger:model azure.SuppressionUpdateInput +type AzureSuppressionUpdateInput struct { + + // reason + Reason string `json:"reason,omitempty"` + + // suppression id + // Required: true + SuppressionID *string `json:"suppression_id"` +} + +// Validate validates this azure suppression update input +func (m *AzureSuppressionUpdateInput) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSuppressionID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureSuppressionUpdateInput) validateSuppressionID(formats strfmt.Registry) error { + + if err := validate.Required("suppression_id", "body", m.SuppressionID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this azure suppression update input based on context it is used +func (m *AzureSuppressionUpdateInput) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AzureSuppressionUpdateInput) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureSuppressionUpdateInput) UnmarshalBinary(b []byte) error { + var res AzureSuppressionUpdateInput + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_suppression_update_request.go b/falcon/models/azure_suppression_update_request.go new file mode 100644 index 000000000..21d91aae9 --- /dev/null +++ b/falcon/models/azure_suppression_update_request.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AzureSuppressionUpdateRequest azure suppression update request +// +// swagger:model azure.SuppressionUpdateRequest +type AzureSuppressionUpdateRequest struct { + + // resources + // Required: true + Resources []*AzureSuppressionUpdateInput `json:"resources"` +} + +// Validate validates this azure suppression update request +func (m *AzureSuppressionUpdateRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureSuppressionUpdateRequest) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this azure suppression update request based on the context it is used +func (m *AzureSuppressionUpdateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AzureSuppressionUpdateRequest) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AzureSuppressionUpdateRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AzureSuppressionUpdateRequest) UnmarshalBinary(b []byte) error { + var res AzureSuppressionUpdateRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/azure_tenant_registration.go b/falcon/models/azure_tenant_registration.go index bc5b75d9f..0d5801000 100644 --- a/falcon/models/azure_tenant_registration.go +++ b/falcon/models/azure_tenant_registration.go @@ -128,9 +128,15 @@ type AzureTenantRegistration struct { // products Products []*DomainProductFeatures `json:"products"` + // registration description + RegistrationDescription string `json:"registration_description,omitempty"` + // registration id RegistrationID string `json:"registration_id,omitempty"` + // registration name + RegistrationName string `json:"registration_name,omitempty"` + // resource name prefix ResourceNamePrefix *string `json:"resource_name_prefix,omitempty"` @@ -162,6 +168,20 @@ type AzureTenantRegistration struct { // updated // Format: date-time Updated strfmt.DateTime `json:"updated,omitempty"` + + // Map of region names to custom VNET configuration for Vulnerability Scanning + VulnerabilityScanningCustomVnetConfiguration AzureVulnerabilityScanningSettingsVulnerabilityScanningCustomVnetConfiguration `json:"vulnerability_scanning_custom_vnet_configuration,omitempty"` + + // vulnerability scanning host subscription id + VulnerabilityScanningHostSubscriptionID string `json:"vulnerability_scanning_host_subscription_id,omitempty"` + + // Network configuration type for Vulnerability Scanning + // Enum: [managed managed_no_nat custom] + VulnerabilityScanningNetworkConfigurationType string `json:"vulnerability_scanning_network_configuration_type,omitempty"` + + // vulnerability scanning regions + // Required: true + VulnerabilityScanningRegions []string `json:"vulnerability_scanning_regions"` } // Validate validates this azure tenant registration @@ -240,6 +260,18 @@ func (m *AzureTenantRegistration) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVulnerabilityScanningCustomVnetConfiguration(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVulnerabilityScanningNetworkConfigurationType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVulnerabilityScanningRegions(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -527,6 +559,79 @@ func (m *AzureTenantRegistration) validateUpdated(formats strfmt.Registry) error return nil } +func (m *AzureTenantRegistration) validateVulnerabilityScanningCustomVnetConfiguration(formats strfmt.Registry) error { + if swag.IsZero(m.VulnerabilityScanningCustomVnetConfiguration) { // not required + return nil + } + + if m.VulnerabilityScanningCustomVnetConfiguration != nil { + if err := m.VulnerabilityScanningCustomVnetConfiguration.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_custom_vnet_configuration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_custom_vnet_configuration") + } + return err + } + } + + return nil +} + +var azureTenantRegistrationTypeVulnerabilityScanningNetworkConfigurationTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["managed","managed_no_nat","custom"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + azureTenantRegistrationTypeVulnerabilityScanningNetworkConfigurationTypePropEnum = append(azureTenantRegistrationTypeVulnerabilityScanningNetworkConfigurationTypePropEnum, v) + } +} + +const ( + + // AzureTenantRegistrationVulnerabilityScanningNetworkConfigurationTypeManaged captures enum value "managed" + AzureTenantRegistrationVulnerabilityScanningNetworkConfigurationTypeManaged string = "managed" + + // AzureTenantRegistrationVulnerabilityScanningNetworkConfigurationTypeManagedNoNat captures enum value "managed_no_nat" + AzureTenantRegistrationVulnerabilityScanningNetworkConfigurationTypeManagedNoNat string = "managed_no_nat" + + // AzureTenantRegistrationVulnerabilityScanningNetworkConfigurationTypeCustom captures enum value "custom" + AzureTenantRegistrationVulnerabilityScanningNetworkConfigurationTypeCustom string = "custom" +) + +// prop value enum +func (m *AzureTenantRegistration) validateVulnerabilityScanningNetworkConfigurationTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, azureTenantRegistrationTypeVulnerabilityScanningNetworkConfigurationTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *AzureTenantRegistration) validateVulnerabilityScanningNetworkConfigurationType(formats strfmt.Registry) error { + if swag.IsZero(m.VulnerabilityScanningNetworkConfigurationType) { // not required + return nil + } + + // value enum + if err := m.validateVulnerabilityScanningNetworkConfigurationTypeEnum("vulnerability_scanning_network_configuration_type", "body", m.VulnerabilityScanningNetworkConfigurationType); err != nil { + return err + } + + return nil +} + +func (m *AzureTenantRegistration) validateVulnerabilityScanningRegions(formats strfmt.Registry) error { + + if err := validate.Required("vulnerability_scanning_regions", "body", m.VulnerabilityScanningRegions); err != nil { + return err + } + + return nil +} + // ContextValidate validate this azure tenant registration based on the context it is used func (m *AzureTenantRegistration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -551,6 +656,10 @@ func (m *AzureTenantRegistration) ContextValidate(ctx context.Context, formats s res = append(res, err) } + if err := m.contextValidateVulnerabilityScanningCustomVnetConfiguration(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -667,6 +776,24 @@ func (m *AzureTenantRegistration) contextValidateProducts(ctx context.Context, f return nil } +func (m *AzureTenantRegistration) contextValidateVulnerabilityScanningCustomVnetConfiguration(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.VulnerabilityScanningCustomVnetConfiguration) { // not required + return nil + } + + if err := m.VulnerabilityScanningCustomVnetConfiguration.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_custom_vnet_configuration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_custom_vnet_configuration") + } + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *AzureTenantRegistration) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/falcon/models/azure_vulnerability_scanning_settings_vulnerability_scanning_custom_vnet_configuration.go b/falcon/models/azure_vulnerability_scanning_settings_vulnerability_scanning_custom_vnet_configuration.go new file mode 100644 index 000000000..bafe8a374 --- /dev/null +++ b/falcon/models/azure_vulnerability_scanning_settings_vulnerability_scanning_custom_vnet_configuration.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// AzureVulnerabilityScanningSettingsVulnerabilityScanningCustomVnetConfiguration azure vulnerability scanning settings vulnerability scanning custom vnet configuration +// +// swagger:model azure.VulnerabilityScanningSettings.vulnerability_scanning_custom_vnet_configuration +type AzureVulnerabilityScanningSettingsVulnerabilityScanningCustomVnetConfiguration map[string]AzureAgentlessScanningRegionCustomNetworkConfiguration + +// Validate validates this azure vulnerability scanning settings vulnerability scanning custom vnet configuration +func (m AzureVulnerabilityScanningSettingsVulnerabilityScanningCustomVnetConfiguration) Validate(formats strfmt.Registry) error { + var res []error + + for k := range m { + + if err := validate.Required(k, "body", m[k]); err != nil { + return err + } + if val, ok := m[k]; ok { + if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName(k) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validate this azure vulnerability scanning settings vulnerability scanning custom vnet configuration based on the context it is used +func (m AzureVulnerabilityScanningSettingsVulnerabilityScanningCustomVnetConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + for k := range m { + + if val, ok := m[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/falcon/models/client_data_ingest_response_v1.go b/falcon/models/client_data_ingest_response_v1.go index 3afd1f82d..5bbe0cf85 100644 --- a/falcon/models/client_data_ingest_response_v1.go +++ b/falcon/models/client_data_ingest_response_v1.go @@ -19,6 +19,18 @@ import ( // swagger:model client.DataIngestResponseV1 type ClientDataIngestResponseV1 struct { + // error message + ErrorMessage string `json:"error_message,omitempty"` + + // failed events + FailedEvents int32 `json:"failed_events,omitempty"` + + // failed item indices + FailedItemIndices []int64 `json:"failed_item_indices"` + + // partial success + PartialSuccess bool `json:"partial_success,omitempty"` + // repo // Required: true Repo *ClientRepository `json:"repo"` @@ -26,6 +38,12 @@ type ClientDataIngestResponseV1 struct { // rows written // Required: true RowsWritten *int32 `json:"rows_written"` + + // successful events + SuccessfulEvents int32 `json:"successful_events,omitempty"` + + // total events + TotalEvents int32 `json:"total_events,omitempty"` } // Validate validates this client data ingest response v1 diff --git a/falcon/models/client_federated_connection_config_patch_request_v1.go b/falcon/models/client_federated_connection_config_patch_request_v1.go new file mode 100644 index 000000000..a66d2eaa4 --- /dev/null +++ b/falcon/models/client_federated_connection_config_patch_request_v1.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ClientFederatedConnectionConfigPatchRequestV1 client federated connection config patch request v1 +// +// swagger:model client.FederatedConnectionConfigPatchRequestV1 +type ClientFederatedConnectionConfigPatchRequestV1 struct { + + // URL of the external cluster + // Required: true + ClusterURL *string `json:"cluster_url"` + + // token for accessing external cluster + // Required: true + ViewToken *string `json:"view_token"` +} + +// Validate validates this client federated connection config patch request v1 +func (m *ClientFederatedConnectionConfigPatchRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateViewToken(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClientFederatedConnectionConfigPatchRequestV1) validateClusterURL(formats strfmt.Registry) error { + + if err := validate.Required("cluster_url", "body", m.ClusterURL); err != nil { + return err + } + + return nil +} + +func (m *ClientFederatedConnectionConfigPatchRequestV1) validateViewToken(formats strfmt.Registry) error { + + if err := validate.Required("view_token", "body", m.ViewToken); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this client federated connection config patch request v1 based on context it is used +func (m *ClientFederatedConnectionConfigPatchRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ClientFederatedConnectionConfigPatchRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClientFederatedConnectionConfigPatchRequestV1) UnmarshalBinary(b []byte) error { + var res ClientFederatedConnectionConfigPatchRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/client_federated_connection_config_request_v1.go b/falcon/models/client_federated_connection_config_request_v1.go new file mode 100644 index 000000000..96a42b0fe --- /dev/null +++ b/falcon/models/client_federated_connection_config_request_v1.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ClientFederatedConnectionConfigRequestV1 client federated connection config request v1 +// +// swagger:model client.FederatedConnectionConfigRequestV1 +type ClientFederatedConnectionConfigRequestV1 struct { + + // URL of the external cluster + // Required: true + ClusterURL *string `json:"cluster_url"` + + // ID of the federated connection + // Required: true + ConnectionID *string `json:"connection_id"` + + // token for accessing external cluster + // Required: true + ViewToken *string `json:"view_token"` +} + +// Validate validates this client federated connection config request v1 +func (m *ClientFederatedConnectionConfigRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateConnectionID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateViewToken(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClientFederatedConnectionConfigRequestV1) validateClusterURL(formats strfmt.Registry) error { + + if err := validate.Required("cluster_url", "body", m.ClusterURL); err != nil { + return err + } + + return nil +} + +func (m *ClientFederatedConnectionConfigRequestV1) validateConnectionID(formats strfmt.Registry) error { + + if err := validate.Required("connection_id", "body", m.ConnectionID); err != nil { + return err + } + + return nil +} + +func (m *ClientFederatedConnectionConfigRequestV1) validateViewToken(formats strfmt.Registry) error { + + if err := validate.Required("view_token", "body", m.ViewToken); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this client federated connection config request v1 based on context it is used +func (m *ClientFederatedConnectionConfigRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ClientFederatedConnectionConfigRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClientFederatedConnectionConfigRequestV1) UnmarshalBinary(b []byte) error { + var res ClientFederatedConnectionConfigRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/client_federated_connection_config_resource.go b/falcon/models/client_federated_connection_config_resource.go new file mode 100644 index 000000000..5ad2007ec --- /dev/null +++ b/falcon/models/client_federated_connection_config_resource.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ClientFederatedConnectionConfigResource client federated connection config resource +// +// swagger:model client.FederatedConnectionConfigResource +type ClientFederatedConnectionConfigResource struct { + + // URL of the external cluster + // Required: true + ClusterURL *string `json:"cluster_url"` + + // ID of the federated connection + // Required: true + ConnectionID *string `json:"connection_id"` +} + +// Validate validates this client federated connection config resource +func (m *ClientFederatedConnectionConfigResource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateConnectionID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClientFederatedConnectionConfigResource) validateClusterURL(formats strfmt.Registry) error { + + if err := validate.Required("cluster_url", "body", m.ClusterURL); err != nil { + return err + } + + return nil +} + +func (m *ClientFederatedConnectionConfigResource) validateConnectionID(formats strfmt.Registry) error { + + if err := validate.Required("connection_id", "body", m.ConnectionID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this client federated connection config resource based on context it is used +func (m *ClientFederatedConnectionConfigResource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ClientFederatedConnectionConfigResource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClientFederatedConnectionConfigResource) UnmarshalBinary(b []byte) error { + var res ClientFederatedConnectionConfigResource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/client_federated_connection_config_response_v1.go b/falcon/models/client_federated_connection_config_response_v1.go new file mode 100644 index 000000000..5789f1048 --- /dev/null +++ b/falcon/models/client_federated_connection_config_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ClientFederatedConnectionConfigResponseV1 client federated connection config response v1 +// +// swagger:model client.FederatedConnectionConfigResponseV1 +type ClientFederatedConnectionConfigResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + // Required: true + Resources []*ClientFederatedConnectionConfigResource `json:"resources"` +} + +// Validate validates this client federated connection config response v1 +func (m *ClientFederatedConnectionConfigResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClientFederatedConnectionConfigResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ClientFederatedConnectionConfigResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *ClientFederatedConnectionConfigResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this client federated connection config response v1 based on the context it is used +func (m *ClientFederatedConnectionConfigResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClientFederatedConnectionConfigResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ClientFederatedConnectionConfigResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *ClientFederatedConnectionConfigResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ClientFederatedConnectionConfigResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClientFederatedConnectionConfigResponseV1) UnmarshalBinary(b []byte) error { + var res ClientFederatedConnectionConfigResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/client_job_status.go b/falcon/models/client_job_status.go index da93e8595..5ffb58986 100644 --- a/falcon/models/client_job_status.go +++ b/falcon/models/client_job_status.go @@ -28,6 +28,21 @@ type ClientJobStatus struct { // digest hex DigestHex string `json:"digest_hex,omitempty"` + // error category + ErrorCategory string `json:"error_category,omitempty"` + + // error http code + ErrorHTTPCode int32 `json:"error_http_code,omitempty"` + + // error message + ErrorMessage string `json:"error_message,omitempty"` + + // error retryable + ErrorRetryable bool `json:"error_retryable,omitempty"` + + // error type + ErrorType string `json:"error_type,omitempty"` + // event count EventCount int64 `json:"event_count,omitempty"` diff --git a/falcon/models/content_activity_metadata.go b/falcon/models/content_activity_metadata.go deleted file mode 100644 index 6aa0a145f..000000000 --- a/falcon/models/content_activity_metadata.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ContentActivityMetadata content activity metadata -// -// swagger:model content.ActivityMetadata -type ContentActivityMetadata struct { - - // List of dependencies including app details and logo URLs - // Required: true - Dependencies []*ActivitiesDependency `json:"dependencies"` - - // Description of the content. - // Required: true - Description *string `json:"description"` - - // Highlights the fields where search term appeared - Highlight map[string][]string `json:"highlight,omitempty"` - - // ID of the content. - // Required: true - ID *string `json:"id"` - - // Field configs of the activity's output, derived by flattening the Input schema. - // Required: true - InputFields []*ActivitiesActivityExtField `json:"input_fields"` - - // Timestamp of when the content was last modified. - // Required: true - // Format: date-time - LastModified *strfmt.DateTime `json:"last_modified"` - - // Name of the content. - // Required: true - Name *string `json:"name"` - - // Field configs of the activity's output, derived by flattening the Output schema. - // Required: true - OutputFields []*ActivitiesActivityExtField `json:"output_fields"` - - // Indicates relevancy of the result to the search query term - Score float64 `json:"score,omitempty"` - - // Use cases associated with this activity - // Required: true - UseCases []string `json:"use_cases"` - - // Vendor whose products are integrated by this activity - // Required: true - Vendor *string `json:"vendor"` -} - -// Validate validates this content activity metadata -func (m *ContentActivityMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDependencies(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDescription(formats); err != nil { - res = append(res, err) - } - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInputFields(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastModified(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutputFields(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUseCases(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVendor(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ContentActivityMetadata) validateDependencies(formats strfmt.Registry) error { - - if err := validate.Required("dependencies", "body", m.Dependencies); err != nil { - return err - } - - for i := 0; i < len(m.Dependencies); i++ { - if swag.IsZero(m.Dependencies[i]) { // not required - continue - } - - if m.Dependencies[i] != nil { - if err := m.Dependencies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dependencies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dependencies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ContentActivityMetadata) validateDescription(formats strfmt.Registry) error { - - if err := validate.Required("description", "body", m.Description); err != nil { - return err - } - - return nil -} - -func (m *ContentActivityMetadata) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *ContentActivityMetadata) validateInputFields(formats strfmt.Registry) error { - - if err := validate.Required("input_fields", "body", m.InputFields); err != nil { - return err - } - - for i := 0; i < len(m.InputFields); i++ { - if swag.IsZero(m.InputFields[i]) { // not required - continue - } - - if m.InputFields[i] != nil { - if err := m.InputFields[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("input_fields" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("input_fields" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ContentActivityMetadata) validateLastModified(formats strfmt.Registry) error { - - if err := validate.Required("last_modified", "body", m.LastModified); err != nil { - return err - } - - if err := validate.FormatOf("last_modified", "body", "date-time", m.LastModified.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *ContentActivityMetadata) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *ContentActivityMetadata) validateOutputFields(formats strfmt.Registry) error { - - if err := validate.Required("output_fields", "body", m.OutputFields); err != nil { - return err - } - - for i := 0; i < len(m.OutputFields); i++ { - if swag.IsZero(m.OutputFields[i]) { // not required - continue - } - - if m.OutputFields[i] != nil { - if err := m.OutputFields[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("output_fields" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("output_fields" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ContentActivityMetadata) validateUseCases(formats strfmt.Registry) error { - - if err := validate.Required("use_cases", "body", m.UseCases); err != nil { - return err - } - - return nil -} - -func (m *ContentActivityMetadata) validateVendor(formats strfmt.Registry) error { - - if err := validate.Required("vendor", "body", m.Vendor); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this content activity metadata based on the context it is used -func (m *ContentActivityMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDependencies(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInputFields(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutputFields(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ContentActivityMetadata) contextValidateDependencies(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Dependencies); i++ { - - if m.Dependencies[i] != nil { - - if swag.IsZero(m.Dependencies[i]) { // not required - return nil - } - - if err := m.Dependencies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dependencies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dependencies" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ContentActivityMetadata) contextValidateInputFields(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.InputFields); i++ { - - if m.InputFields[i] != nil { - - if swag.IsZero(m.InputFields[i]) { // not required - return nil - } - - if err := m.InputFields[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("input_fields" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("input_fields" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ContentActivityMetadata) contextValidateOutputFields(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OutputFields); i++ { - - if m.OutputFields[i] != nil { - - if swag.IsZero(m.OutputFields[i]) { // not required - return nil - } - - if err := m.OutputFields[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("output_fields" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("output_fields" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ContentActivityMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ContentActivityMetadata) UnmarshalBinary(b []byte) error { - var res ContentActivityMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/falcon/models/correlationrulesapi_anomaly_scopes.go b/falcon/models/correlationrulesapi_anomaly_scopes.go new file mode 100644 index 000000000..630d4971c --- /dev/null +++ b/falcon/models/correlationrulesapi_anomaly_scopes.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// CorrelationrulesapiAnomalyScopes correlationrulesapi anomaly scopes +// +// swagger:model correlationrulesapi.AnomalyScopes +type CorrelationrulesapiAnomalyScopes struct { + + // role + Role string `json:"role,omitempty"` + + // scope + // Required: true + Scope *string `json:"scope"` +} + +// Validate validates this correlationrulesapi anomaly scopes +func (m *CorrelationrulesapiAnomalyScopes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateScope(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CorrelationrulesapiAnomalyScopes) validateScope(formats strfmt.Registry) error { + + if err := validate.Required("scope", "body", m.Scope); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this correlationrulesapi anomaly scopes based on context it is used +func (m *CorrelationrulesapiAnomalyScopes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *CorrelationrulesapiAnomalyScopes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CorrelationrulesapiAnomalyScopes) UnmarshalBinary(b []byte) error { + var res CorrelationrulesapiAnomalyScopes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/correlationrulesapi_anomaly_v1.go b/falcon/models/correlationrulesapi_anomaly_v1.go index c76595830..b9bac39dd 100644 --- a/falcon/models/correlationrulesapi_anomaly_v1.go +++ b/falcon/models/correlationrulesapi_anomaly_v1.go @@ -7,6 +7,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -19,17 +20,19 @@ import ( // swagger:model correlationrulesapi.AnomalyV1 type CorrelationrulesapiAnomalyV1 struct { - // event field name + // event field names // Required: true - EventFieldName *string `json:"event_field_name"` + EventFieldNames []string `json:"event_field_names"` // lookback timeframe // Required: true LookbackTimeframe *string `json:"lookback_timeframe"` // scope - // Required: true - Scope *string `json:"scope"` + Scope string `json:"scope,omitempty"` + + // scopes + Scopes []*CorrelationrulesapiAnomalyScopes `json:"scopes"` // type // Required: true @@ -44,7 +47,7 @@ type CorrelationrulesapiAnomalyV1 struct { func (m *CorrelationrulesapiAnomalyV1) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateEventFieldName(formats); err != nil { + if err := m.validateEventFieldNames(formats); err != nil { res = append(res, err) } @@ -52,7 +55,7 @@ func (m *CorrelationrulesapiAnomalyV1) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateScope(formats); err != nil { + if err := m.validateScopes(formats); err != nil { res = append(res, err) } @@ -70,9 +73,9 @@ func (m *CorrelationrulesapiAnomalyV1) Validate(formats strfmt.Registry) error { return nil } -func (m *CorrelationrulesapiAnomalyV1) validateEventFieldName(formats strfmt.Registry) error { +func (m *CorrelationrulesapiAnomalyV1) validateEventFieldNames(formats strfmt.Registry) error { - if err := validate.Required("event_field_name", "body", m.EventFieldName); err != nil { + if err := validate.Required("event_field_names", "body", m.EventFieldNames); err != nil { return err } @@ -88,10 +91,27 @@ func (m *CorrelationrulesapiAnomalyV1) validateLookbackTimeframe(formats strfmt. return nil } -func (m *CorrelationrulesapiAnomalyV1) validateScope(formats strfmt.Registry) error { +func (m *CorrelationrulesapiAnomalyV1) validateScopes(formats strfmt.Registry) error { + if swag.IsZero(m.Scopes) { // not required + return nil + } + + for i := 0; i < len(m.Scopes); i++ { + if swag.IsZero(m.Scopes[i]) { // not required + continue + } + + if m.Scopes[i] != nil { + if err := m.Scopes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scopes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scopes" + "." + strconv.Itoa(i)) + } + return err + } + } - if err := validate.Required("scope", "body", m.Scope); err != nil { - return err } return nil @@ -115,8 +135,42 @@ func (m *CorrelationrulesapiAnomalyV1) validateUseEstablishedEntityOnly(formats return nil } -// ContextValidate validates this correlationrulesapi anomaly v1 based on context it is used +// ContextValidate validate this correlationrulesapi anomaly v1 based on the context it is used func (m *CorrelationrulesapiAnomalyV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateScopes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CorrelationrulesapiAnomalyV1) contextValidateScopes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Scopes); i++ { + + if m.Scopes[i] != nil { + + if swag.IsZero(m.Scopes[i]) { // not required + return nil + } + + if err := m.Scopes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scopes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scopes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } diff --git a/falcon/models/correlationrulesapi_create_rule_notification_config.go b/falcon/models/correlationrulesapi_create_rule_notification_config.go index ef691fa3a..59dbe40ba 100644 --- a/falcon/models/correlationrulesapi_create_rule_notification_config.go +++ b/falcon/models/correlationrulesapi_create_rule_notification_config.go @@ -19,6 +19,9 @@ import ( // swagger:model correlationrulesapi.CreateRuleNotificationConfig type CorrelationrulesapiCreateRuleNotificationConfig struct { + // channel id + ChannelID string `json:"channel_id,omitempty"` + // cid // Required: true Cid *string `json:"cid"` @@ -38,6 +41,9 @@ type CorrelationrulesapiCreateRuleNotificationConfig struct { // severity // Required: true Severity *string `json:"severity"` + + // team id + TeamID string `json:"team_id,omitempty"` } // Validate validates this correlationrulesapi create rule notification config diff --git a/falcon/models/correlationrulesapi_patch_anomaly_v1.go b/falcon/models/correlationrulesapi_patch_anomaly_v1.go index 41ebaa6b2..c80439c04 100644 --- a/falcon/models/correlationrulesapi_patch_anomaly_v1.go +++ b/falcon/models/correlationrulesapi_patch_anomaly_v1.go @@ -7,7 +7,9 @@ package models import ( "context" + "strconv" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -17,8 +19,8 @@ import ( // swagger:model correlationrulesapi.PatchAnomalyV1 type CorrelationrulesapiPatchAnomalyV1 struct { - // event field name - EventFieldName string `json:"event_field_name,omitempty"` + // event field names + EventFieldNames []string `json:"event_field_names"` // lookback timeframe LookbackTimeframe string `json:"lookback_timeframe,omitempty"` @@ -26,6 +28,9 @@ type CorrelationrulesapiPatchAnomalyV1 struct { // scope Scope string `json:"scope,omitempty"` + // scopes + Scopes []*CorrelationrulesapiAnomalyScopes `json:"scopes"` + // type Type string `json:"type,omitempty"` @@ -35,11 +40,80 @@ type CorrelationrulesapiPatchAnomalyV1 struct { // Validate validates this correlationrulesapi patch anomaly v1 func (m *CorrelationrulesapiPatchAnomalyV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateScopes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CorrelationrulesapiPatchAnomalyV1) validateScopes(formats strfmt.Registry) error { + if swag.IsZero(m.Scopes) { // not required + return nil + } + + for i := 0; i < len(m.Scopes); i++ { + if swag.IsZero(m.Scopes[i]) { // not required + continue + } + + if m.Scopes[i] != nil { + if err := m.Scopes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scopes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scopes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } -// ContextValidate validates this correlationrulesapi patch anomaly v1 based on context it is used +// ContextValidate validate this correlationrulesapi patch anomaly v1 based on the context it is used func (m *CorrelationrulesapiPatchAnomalyV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateScopes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CorrelationrulesapiPatchAnomalyV1) contextValidateScopes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Scopes); i++ { + + if m.Scopes[i] != nil { + + if swag.IsZero(m.Scopes[i]) { // not required + return nil + } + + if err := m.Scopes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scopes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scopes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } diff --git a/falcon/models/correlationrulesapi_patch_rule_notification_config_v1.go b/falcon/models/correlationrulesapi_patch_rule_notification_config_v1.go index e0589bb2f..1421e1836 100644 --- a/falcon/models/correlationrulesapi_patch_rule_notification_config_v1.go +++ b/falcon/models/correlationrulesapi_patch_rule_notification_config_v1.go @@ -17,6 +17,9 @@ import ( // swagger:model correlationrulesapi.PatchRuleNotificationConfigV1 type CorrelationrulesapiPatchRuleNotificationConfigV1 struct { + // channel id + ChannelID string `json:"channel_id,omitempty"` + // cid Cid string `json:"cid,omitempty"` @@ -31,6 +34,9 @@ type CorrelationrulesapiPatchRuleNotificationConfigV1 struct { // severity Severity string `json:"severity,omitempty"` + + // team id + TeamID string `json:"team_id,omitempty"` } // Validate validates this correlationrulesapi patch rule notification config v1 diff --git a/falcon/models/correlationrulesapi_rule_notification_config_v1.go b/falcon/models/correlationrulesapi_rule_notification_config_v1.go index 00a6d7ffc..2b36aecd4 100644 --- a/falcon/models/correlationrulesapi_rule_notification_config_v1.go +++ b/falcon/models/correlationrulesapi_rule_notification_config_v1.go @@ -19,6 +19,9 @@ import ( // swagger:model correlationrulesapi.RuleNotificationConfigV1 type CorrelationrulesapiRuleNotificationConfigV1 struct { + // channel id + ChannelID string `json:"channel_id,omitempty"` + // cid // Required: true Cid *string `json:"cid"` @@ -38,6 +41,9 @@ type CorrelationrulesapiRuleNotificationConfigV1 struct { // severity // Required: true Severity *string `json:"severity"` + + // team id + TeamID string `json:"team_id,omitempty"` } // Validate validates this correlationrulesapi rule notification config v1 diff --git a/falcon/models/correlationrulesapi_rule_search_v1.go b/falcon/models/correlationrulesapi_rule_search_v1.go index bd210c357..07548521d 100644 --- a/falcon/models/correlationrulesapi_rule_search_v1.go +++ b/falcon/models/correlationrulesapi_rule_search_v1.go @@ -43,8 +43,7 @@ type CorrelationrulesapiRuleSearchV1 struct { TriggerMode *string `json:"trigger_mode"` // use ingest time - // Required: true - UseIngestTime *bool `json:"use_ingest_time"` + UseIngestTime bool `json:"use_ingest_time,omitempty"` } // Validate validates this correlationrulesapi rule search v1 @@ -71,10 +70,6 @@ func (m *CorrelationrulesapiRuleSearchV1) Validate(formats strfmt.Registry) erro res = append(res, err) } - if err := m.validateUseIngestTime(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -126,15 +121,6 @@ func (m *CorrelationrulesapiRuleSearchV1) validateTriggerMode(formats strfmt.Reg return nil } -func (m *CorrelationrulesapiRuleSearchV1) validateUseIngestTime(formats strfmt.Registry) error { - - if err := validate.Required("use_ingest_time", "body", m.UseIngestTime); err != nil { - return err - } - - return nil -} - // ContextValidate validates this correlationrulesapi rule search v1 based on context it is used func (m *CorrelationrulesapiRuleSearchV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/falcon/models/dataconnectionmanagement_create_data_connection_request.go b/falcon/models/dataconnectionmanagement_create_data_connection_request.go index f9f90bcab..104311a71 100644 --- a/falcon/models/dataconnectionmanagement_create_data_connection_request.go +++ b/falcon/models/dataconnectionmanagement_create_data_connection_request.go @@ -48,12 +48,10 @@ type DataconnectionmanagementCreateDataConnectionRequest struct { LogSources []string `json:"log_sources"` // name - // Required: true - Name *string `json:"name"` + Name string `json:"name,omitempty"` // parser - // Required: true - Parser *string `json:"parser"` + Parser string `json:"parser,omitempty"` // vendor name VendorName string `json:"vendor_name,omitempty"` @@ -74,14 +72,6 @@ func (m *DataconnectionmanagementCreateDataConnectionRequest) Validate(formats s res = append(res, err) } - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParser(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -116,24 +106,6 @@ func (m *DataconnectionmanagementCreateDataConnectionRequest) validateConnectorI return nil } -func (m *DataconnectionmanagementCreateDataConnectionRequest) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *DataconnectionmanagementCreateDataConnectionRequest) validateParser(formats strfmt.Registry) error { - - if err := validate.Required("parser", "body", m.Parser); err != nil { - return err - } - - return nil -} - // ContextValidate validate this dataconnectionmanagement create data connection request based on the context it is used func (m *DataconnectionmanagementCreateDataConnectionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error diff --git a/falcon/models/dataconnectionmanagement_update_data_connection_request.go b/falcon/models/dataconnectionmanagement_update_data_connection_request.go index 86cce1e2a..eaf59a74e 100644 --- a/falcon/models/dataconnectionmanagement_update_data_connection_request.go +++ b/falcon/models/dataconnectionmanagement_update_data_connection_request.go @@ -24,6 +24,9 @@ type DataconnectionmanagementUpdateDataConnectionRequest struct { // config id ConfigID string `json:"config_id,omitempty"` + // custom + Custom map[string]string `json:"custom,omitempty"` + // description Description string `json:"description,omitempty"` @@ -33,6 +36,9 @@ type DataconnectionmanagementUpdateDataConnectionRequest struct { // enable user enrichment EnableUserEnrichment bool `json:"enable_user_enrichment,omitempty"` + // log sources + LogSources []string `json:"log_sources"` + // name Name string `json:"name,omitempty"` diff --git a/falcon/models/definitions_activity_metadata.go b/falcon/models/definitions_activity_metadata.go new file mode 100644 index 000000000..36c0f3db2 --- /dev/null +++ b/falcon/models/definitions_activity_metadata.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DefinitionsActivityMetadata definitions activity metadata +// +// swagger:model definitions.ActivityMetadata +type DefinitionsActivityMetadata struct { + + // List of dependencies including app details and logo URLs + // Required: true + Dependencies []*ActivitiesDependency `json:"dependencies"` + + // Use cases associated with this activity + UseCases []string `json:"use_cases"` + + // Vendor whose products are integrated by this activity + // Required: true + Vendor *string `json:"vendor"` +} + +// Validate validates this definitions activity metadata +func (m *DefinitionsActivityMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDependencies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVendor(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DefinitionsActivityMetadata) validateDependencies(formats strfmt.Registry) error { + + if err := validate.Required("dependencies", "body", m.Dependencies); err != nil { + return err + } + + for i := 0; i < len(m.Dependencies); i++ { + if swag.IsZero(m.Dependencies[i]) { // not required + continue + } + + if m.Dependencies[i] != nil { + if err := m.Dependencies[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dependencies" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dependencies" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DefinitionsActivityMetadata) validateVendor(formats strfmt.Registry) error { + + if err := validate.Required("vendor", "body", m.Vendor); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this definitions activity metadata based on the context it is used +func (m *DefinitionsActivityMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDependencies(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DefinitionsActivityMetadata) contextValidateDependencies(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Dependencies); i++ { + + if m.Dependencies[i] != nil { + + if swag.IsZero(m.Dependencies[i]) { // not required + return nil + } + + if err := m.Dependencies[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dependencies" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dependencies" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DefinitionsActivityMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DefinitionsActivityMetadata) UnmarshalBinary(b []byte) error { + var res DefinitionsActivityMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/definitions_definition_ext.go b/falcon/models/definitions_definition_ext.go index 873098b35..5f52df9c2 100644 --- a/falcon/models/definitions_definition_ext.go +++ b/falcon/models/definitions_definition_ext.go @@ -22,6 +22,9 @@ type DefinitionsDefinitionExt struct { // actions Actions map[string]V2Activity `json:"actions,omitempty"` + // budget + Budget *V2Budget `json:"budget,omitempty"` + // conditions Conditions map[string]V2Condition `json:"conditions,omitempty"` @@ -111,6 +114,10 @@ func (m *DefinitionsDefinitionExt) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateBudget(formats); err != nil { + res = append(res, err) + } + if err := m.validateConditions(formats); err != nil { res = append(res, err) } @@ -195,6 +202,25 @@ func (m *DefinitionsDefinitionExt) validateActions(formats strfmt.Registry) erro return nil } +func (m *DefinitionsDefinitionExt) validateBudget(formats strfmt.Registry) error { + if swag.IsZero(m.Budget) { // not required + return nil + } + + if m.Budget != nil { + if err := m.Budget.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("budget") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("budget") + } + return err + } + } + + return nil +} + func (m *DefinitionsDefinitionExt) validateConditions(formats strfmt.Registry) error { if swag.IsZero(m.Conditions) { // not required return nil @@ -390,6 +416,10 @@ func (m *DefinitionsDefinitionExt) ContextValidate(ctx context.Context, formats res = append(res, err) } + if err := m.contextValidateBudget(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateConditions(ctx, formats); err != nil { res = append(res, err) } @@ -431,6 +461,27 @@ func (m *DefinitionsDefinitionExt) contextValidateActions(ctx context.Context, f return nil } +func (m *DefinitionsDefinitionExt) contextValidateBudget(ctx context.Context, formats strfmt.Registry) error { + + if m.Budget != nil { + + if swag.IsZero(m.Budget) { // not required + return nil + } + + if err := m.Budget.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("budget") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("budget") + } + return err + } + } + + return nil +} + func (m *DefinitionsDefinitionExt) contextValidateConditions(ctx context.Context, formats strfmt.Registry) error { for k := range m.Conditions { diff --git a/falcon/models/definitions_definition_import_response_entity.go b/falcon/models/definitions_definition_import_response_entity.go index 3bdefeb5b..827225a35 100644 --- a/falcon/models/definitions_definition_import_response_entity.go +++ b/falcon/models/definitions_definition_import_response_entity.go @@ -21,7 +21,7 @@ import ( type DefinitionsDefinitionImportResponseEntity struct { // Map of activity ID to activity metadata (including dependencies with app info and logo URLs) for displaying activity information in the UI - ActivityMetadata map[string]ContentActivityMetadata `json:"activity_metadata,omitempty"` + ActivityMetadata map[string]DefinitionsActivityMetadata `json:"activity_metadata,omitempty"` // description Description string `json:"description,omitempty"` diff --git a/falcon/models/detects_alert.go b/falcon/models/detects_alert.go index cecbd72e0..8148308d5 100644 --- a/falcon/models/detects_alert.go +++ b/falcon/models/detects_alert.go @@ -66,6 +66,14 @@ type DetectsAlert struct { // Required: true CmsRuleID *string `json:"cms_rule_id"` + // An opaque internal identifier that can uniquely identify the CMS rule instance which triggered this detection + // Required: true + CmsRuleInstanceID *string `json:"cms_rule_instance_id"` + + // An opaque internal identifier that can uniquely identify the CMS rule instance version which triggered this detection + // Required: true + CmsRuleInstanceVersion *string `json:"cms_rule_instance_version"` + // An opaque internal identifier that can uniquely identify an Alert // Required: true CompositeID *string `json:"composite_id"` @@ -391,6 +399,14 @@ func (m *DetectsAlert) UnmarshalJSON(data []byte) error { // Required: true CmsRuleID *string `json:"cms_rule_id"` + // An opaque internal identifier that can uniquely identify the CMS rule instance which triggered this detection + // Required: true + CmsRuleInstanceID *string `json:"cms_rule_instance_id"` + + // An opaque internal identifier that can uniquely identify the CMS rule instance version which triggered this detection + // Required: true + CmsRuleInstanceVersion *string `json:"cms_rule_instance_version"` + // An opaque internal identifier that can uniquely identify an Alert // Required: true CompositeID *string `json:"composite_id"` @@ -679,6 +695,8 @@ func (m *DetectsAlert) UnmarshalJSON(data []byte) error { rcv.CloudIndicator = stage1.CloudIndicator rcv.Cmdline = stage1.Cmdline rcv.CmsRuleID = stage1.CmsRuleID + rcv.CmsRuleInstanceID = stage1.CmsRuleInstanceID + rcv.CmsRuleInstanceVersion = stage1.CmsRuleInstanceVersion rcv.CompositeID = stage1.CompositeID rcv.Confidence = stage1.Confidence rcv.ContextTimestamp = stage1.ContextTimestamp @@ -775,6 +793,8 @@ func (m *DetectsAlert) UnmarshalJSON(data []byte) error { delete(stage2, "cloud_indicator") delete(stage2, "cmdline") delete(stage2, "cms_rule_id") + delete(stage2, "cms_rule_instance_id") + delete(stage2, "cms_rule_instance_version") delete(stage2, "composite_id") delete(stage2, "confidence") delete(stage2, "context_timestamp") @@ -916,6 +936,14 @@ func (m DetectsAlert) MarshalJSON() ([]byte, error) { // Required: true CmsRuleID *string `json:"cms_rule_id"` + // An opaque internal identifier that can uniquely identify the CMS rule instance which triggered this detection + // Required: true + CmsRuleInstanceID *string `json:"cms_rule_instance_id"` + + // An opaque internal identifier that can uniquely identify the CMS rule instance version which triggered this detection + // Required: true + CmsRuleInstanceVersion *string `json:"cms_rule_instance_version"` + // An opaque internal identifier that can uniquely identify an Alert // Required: true CompositeID *string `json:"composite_id"` @@ -1200,6 +1228,8 @@ func (m DetectsAlert) MarshalJSON() ([]byte, error) { stage1.CloudIndicator = m.CloudIndicator stage1.Cmdline = m.Cmdline stage1.CmsRuleID = m.CmsRuleID + stage1.CmsRuleInstanceID = m.CmsRuleInstanceID + stage1.CmsRuleInstanceVersion = m.CmsRuleInstanceVersion stage1.CompositeID = m.CompositeID stage1.Confidence = m.Confidence stage1.ContextTimestamp = m.ContextTimestamp @@ -1341,6 +1371,14 @@ func (m *DetectsAlert) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCmsRuleInstanceID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCmsRuleInstanceVersion(formats); err != nil { + res = append(res, err) + } + if err := m.validateCompositeID(formats); err != nil { res = append(res, err) } @@ -1616,6 +1654,24 @@ func (m *DetectsAlert) validateCmsRuleID(formats strfmt.Registry) error { return nil } +func (m *DetectsAlert) validateCmsRuleInstanceID(formats strfmt.Registry) error { + + if err := validate.Required("cms_rule_instance_id", "body", m.CmsRuleInstanceID); err != nil { + return err + } + + return nil +} + +func (m *DetectsAlert) validateCmsRuleInstanceVersion(formats strfmt.Registry) error { + + if err := validate.Required("cms_rule_instance_version", "body", m.CmsRuleInstanceVersion); err != nil { + return err + } + + return nil +} + func (m *DetectsAlert) validateCompositeID(formats strfmt.Registry) error { if err := validate.Required("composite_id", "body", m.CompositeID); err != nil { diff --git a/falcon/models/domain_agent_v1.go b/falcon/models/domain_agent_v1.go index 6188cd44c..0484ee6b4 100644 --- a/falcon/models/domain_agent_v1.go +++ b/falcon/models/domain_agent_v1.go @@ -54,6 +54,11 @@ type DomainAgentV1 struct { // Required: true Platform *int64 `json:"platform"` + // seen timestamp + // Required: true + // Format: date-time + SeenTimestamp *strfmt.DateTime `json:"seen_timestamp"` + // sessionid // Required: true Sessionid *string `json:"sessionid"` @@ -104,6 +109,10 @@ func (m *DomainAgentV1) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSeenTimestamp(formats); err != nil { + res = append(res, err) + } + if err := m.validateSessionid(formats); err != nil { res = append(res, err) } @@ -206,6 +215,19 @@ func (m *DomainAgentV1) validatePlatform(formats strfmt.Registry) error { return nil } +func (m *DomainAgentV1) validateSeenTimestamp(formats strfmt.Registry) error { + + if err := validate.Required("seen_timestamp", "body", m.SeenTimestamp); err != nil { + return err + } + + if err := validate.FormatOf("seen_timestamp", "body", "date-time", m.SeenTimestamp.String(), formats); err != nil { + return err + } + + return nil +} + func (m *DomainAgentV1) validateSessionid(formats strfmt.Registry) error { if err := validate.Required("sessionid", "body", m.Sessionid); err != nil { diff --git a/falcon/models/domain_asset.go b/falcon/models/domain_asset.go new file mode 100644 index 000000000..83acba074 --- /dev/null +++ b/falcon/models/domain_asset.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainAsset domain asset +// +// swagger:model domain.Asset +type DomainAsset struct { + + // account id + // Required: true + AccountID *string `json:"account_id"` + + // account name + // Required: true + AccountName *string `json:"account_name"` + + // cloud provider + // Required: true + CloudProvider *string `json:"cloud_provider"` + + // id + // Required: true + ID *string `json:"id"` + + // region + // Required: true + Region *string `json:"region"` + + // resource id + // Required: true + ResourceID *string `json:"resource_id"` + + // type + // Required: true + Type *string `json:"type"` +} + +// Validate validates this domain asset +func (m *DomainAsset) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccountID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAccountName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudProvider(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegion(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResourceID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainAsset) validateAccountID(formats strfmt.Registry) error { + + if err := validate.Required("account_id", "body", m.AccountID); err != nil { + return err + } + + return nil +} + +func (m *DomainAsset) validateAccountName(formats strfmt.Registry) error { + + if err := validate.Required("account_name", "body", m.AccountName); err != nil { + return err + } + + return nil +} + +func (m *DomainAsset) validateCloudProvider(formats strfmt.Registry) error { + + if err := validate.Required("cloud_provider", "body", m.CloudProvider); err != nil { + return err + } + + return nil +} + +func (m *DomainAsset) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *DomainAsset) validateRegion(formats strfmt.Registry) error { + + if err := validate.Required("region", "body", m.Region); err != nil { + return err + } + + return nil +} + +func (m *DomainAsset) validateResourceID(formats strfmt.Registry) error { + + if err := validate.Required("resource_id", "body", m.ResourceID); err != nil { + return err + } + + return nil +} + +func (m *DomainAsset) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this domain asset based on context it is used +func (m *DomainAsset) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DomainAsset) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainAsset) UnmarshalBinary(b []byte) error { + var res DomainAsset + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_attribute_change.go b/falcon/models/domain_attribute_change.go new file mode 100644 index 000000000..5f6d5633a --- /dev/null +++ b/falcon/models/domain_attribute_change.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainAttributeChange domain attribute change +// +// swagger:model domain.AttributeChange +type DomainAttributeChange struct { + + // action + // Required: true + Action *string `json:"action"` + + // attribute + // Required: true + Attribute *string `json:"attribute"` + + // details + // Required: true + Details interface{} `json:"details"` +} + +// Validate validates this domain attribute change +func (m *DomainAttributeChange) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAttribute(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainAttributeChange) validateAction(formats strfmt.Registry) error { + + if err := validate.Required("action", "body", m.Action); err != nil { + return err + } + + return nil +} + +func (m *DomainAttributeChange) validateAttribute(formats strfmt.Registry) error { + + if err := validate.Required("attribute", "body", m.Attribute); err != nil { + return err + } + + return nil +} + +func (m *DomainAttributeChange) validateDetails(formats strfmt.Registry) error { + + if m.Details == nil { + return errors.Required("details", "body", nil) + } + + return nil +} + +// ContextValidate validates this domain attribute change based on context it is used +func (m *DomainAttributeChange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DomainAttributeChange) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainAttributeChange) UnmarshalBinary(b []byte) error { + var res DomainAttributeChange + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_cloud_a_w_s_account_v1.go b/falcon/models/domain_cloud_a_w_s_account_v1.go index c71c28318..7892c4ec4 100644 --- a/falcon/models/domain_cloud_a_w_s_account_v1.go +++ b/falcon/models/domain_cloud_a_w_s_account_v1.go @@ -112,6 +112,9 @@ type DomainCloudAWSAccountV1 struct { // Required: true Products []*DomainProductFeatures `json:"products"` + // registration id + RegistrationID string `json:"registration_id,omitempty"` + // registration status RegistrationStatus string `json:"registration_status,omitempty"` diff --git a/falcon/models/domain_cloud_risk_event.go b/falcon/models/domain_cloud_risk_event.go new file mode 100644 index 000000000..9a3ccdf61 --- /dev/null +++ b/falcon/models/domain_cloud_risk_event.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainCloudRiskEvent domain cloud risk event +// +// swagger:model domain.CloudRiskEvent +type DomainCloudRiskEvent struct { + + // details + Details interface{} `json:"details,omitempty"` + + // event type + // Required: true + EventType *string `json:"event_type"` + + // occurred at + // Required: true + // Format: date-time + OccurredAt *strfmt.DateTime `json:"occurred_at"` +} + +// Validate validates this domain cloud risk event +func (m *DomainCloudRiskEvent) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEventType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOccurredAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainCloudRiskEvent) validateEventType(formats strfmt.Registry) error { + + if err := validate.Required("event_type", "body", m.EventType); err != nil { + return err + } + + return nil +} + +func (m *DomainCloudRiskEvent) validateOccurredAt(formats strfmt.Registry) error { + + if err := validate.Required("occurred_at", "body", m.OccurredAt); err != nil { + return err + } + + if err := validate.FormatOf("occurred_at", "body", "date-time", m.OccurredAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this domain cloud risk event based on context it is used +func (m *DomainCloudRiskEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DomainCloudRiskEvent) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainCloudRiskEvent) UnmarshalBinary(b []byte) error { + var res DomainCloudRiskEvent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_config_data.go b/falcon/models/domain_config_data.go index 866425887..b240d2d65 100644 --- a/falcon/models/domain_config_data.go +++ b/falcon/models/domain_config_data.go @@ -71,6 +71,9 @@ type DomainConfigData struct { // token parameters TokenParameters map[string][]string `json:"token_parameters,omitempty"` + // token response metadata + TokenResponseMetadata string `json:"token_response_metadata,omitempty"` + // x www form urlencoded XWwwFormUrlencoded interface{} `json:"x-www-form-urlencoded,omitempty"` } diff --git a/falcon/models/domain_configuration_change.go b/falcon/models/domain_configuration_change.go new file mode 100644 index 000000000..ca19aeac8 --- /dev/null +++ b/falcon/models/domain_configuration_change.go @@ -0,0 +1,260 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainConfigurationChange domain configuration change +// +// swagger:model domain.ConfigurationChange +type DomainConfigurationChange struct { + + // asset id + // Required: true + AssetID *string `json:"asset_id"` + + // asset revision + // Required: true + AssetRevision *int32 `json:"asset_revision"` + + // changes + // Required: true + Changes []*DomainAttributeChange `json:"changes"` + + // external asset type + ExternalAssetType string `json:"external_asset_type,omitempty"` + + // id + // Required: true + ID *string `json:"id"` + + // resource events + ResourceEvents []*DomainResourceEvent `json:"resource_events"` + + // updated at + // Format: date-time + UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` +} + +// Validate validates this domain configuration change +func (m *DomainConfigurationChange) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssetID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAssetRevision(formats); err != nil { + res = append(res, err) + } + + if err := m.validateChanges(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResourceEvents(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainConfigurationChange) validateAssetID(formats strfmt.Registry) error { + + if err := validate.Required("asset_id", "body", m.AssetID); err != nil { + return err + } + + return nil +} + +func (m *DomainConfigurationChange) validateAssetRevision(formats strfmt.Registry) error { + + if err := validate.Required("asset_revision", "body", m.AssetRevision); err != nil { + return err + } + + return nil +} + +func (m *DomainConfigurationChange) validateChanges(formats strfmt.Registry) error { + + if err := validate.Required("changes", "body", m.Changes); err != nil { + return err + } + + for i := 0; i < len(m.Changes); i++ { + if swag.IsZero(m.Changes[i]) { // not required + continue + } + + if m.Changes[i] != nil { + if err := m.Changes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("changes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("changes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DomainConfigurationChange) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *DomainConfigurationChange) validateResourceEvents(formats strfmt.Registry) error { + if swag.IsZero(m.ResourceEvents) { // not required + return nil + } + + for i := 0; i < len(m.ResourceEvents); i++ { + if swag.IsZero(m.ResourceEvents[i]) { // not required + continue + } + + if m.ResourceEvents[i] != nil { + if err := m.ResourceEvents[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_events" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_events" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DomainConfigurationChange) validateUpdatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.UpdatedAt) { // not required + return nil + } + + if err := validate.FormatOf("updated_at", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this domain configuration change based on the context it is used +func (m *DomainConfigurationChange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateChanges(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceEvents(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainConfigurationChange) contextValidateChanges(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Changes); i++ { + + if m.Changes[i] != nil { + + if swag.IsZero(m.Changes[i]) { // not required + return nil + } + + if err := m.Changes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("changes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("changes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DomainConfigurationChange) contextValidateResourceEvents(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceEvents); i++ { + + if m.ResourceEvents[i] != nil { + + if swag.IsZero(m.ResourceEvents[i]) { // not required + return nil + } + + if err := m.ResourceEvents[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_events" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_events" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DomainConfigurationChange) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainConfigurationChange) UnmarshalBinary(b []byte) error { + var res DomainConfigurationChange + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_credentialed_asset_summary.go b/falcon/models/domain_credentialed_asset_summary.go new file mode 100644 index 000000000..6f4b75c10 --- /dev/null +++ b/falcon/models/domain_credentialed_asset_summary.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainCredentialedAssetSummary domain credentialed asset summary +// +// swagger:model domain.CredentialedAssetSummary +type DomainCredentialedAssetSummary struct { + + // failed + // Required: true + Failed *int32 `json:"failed"` + + // not attempted + // Required: true + NotAttempted *int32 `json:"not_attempted"` + + // successful + // Required: true + Successful *int32 `json:"successful"` +} + +// Validate validates this domain credentialed asset summary +func (m *DomainCredentialedAssetSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFailed(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNotAttempted(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSuccessful(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainCredentialedAssetSummary) validateFailed(formats strfmt.Registry) error { + + if err := validate.Required("failed", "body", m.Failed); err != nil { + return err + } + + return nil +} + +func (m *DomainCredentialedAssetSummary) validateNotAttempted(formats strfmt.Registry) error { + + if err := validate.Required("not_attempted", "body", m.NotAttempted); err != nil { + return err + } + + return nil +} + +func (m *DomainCredentialedAssetSummary) validateSuccessful(formats strfmt.Registry) error { + + if err := validate.Required("successful", "body", m.Successful); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this domain credentialed asset summary based on context it is used +func (m *DomainCredentialedAssetSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DomainCredentialedAssetSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainCredentialedAssetSummary) UnmarshalBinary(b []byte) error { + var res DomainCredentialedAssetSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_device.go b/falcon/models/domain_device.go index 66426b31a..bc84c97d8 100644 --- a/falcon/models/domain_device.go +++ b/falcon/models/domain_device.go @@ -35,6 +35,9 @@ type DomainDevice struct { // config id platform ConfigIDPlatform string `json:"config_id_platform,omitempty"` + // deployment type + DeploymentType string `json:"deployment_type,omitempty"` + // device id // Required: true DeviceID *string `json:"device_id"` diff --git a/falcon/models/domain_discover_api_device_slot.go b/falcon/models/domain_discover_api_device_slot.go index 7b2df2f16..081880d23 100644 --- a/falcon/models/domain_discover_api_device_slot.go +++ b/falcon/models/domain_discover_api_device_slot.go @@ -35,9 +35,15 @@ type DomainDiscoverAPIDeviceSlot struct { // The Slot Number of the Rack Slot of IoT Asset SlotNumber int32 `json:"slot_number,omitempty"` + // The PLC mode of the slot + SlotPlcMode string `json:"slot_plc_mode,omitempty"` + // The Serial Number of the Rack Slot of IoT Asset SlotSerialNumber string `json:"slot_serial_number,omitempty"` + // The ICS ID of the child device discovered through this slot + SlotTargetIcsID string `json:"slot_target_ics_id,omitempty"` + // The IoT asset's slot type SlotType string `json:"slot_type,omitempty"` diff --git a/falcon/models/domain_discover_api_host.go b/falcon/models/domain_discover_api_host.go index c3ab1f13b..b74f34c2e 100644 --- a/falcon/models/domain_discover_api_host.go +++ b/falcon/models/domain_discover_api_host.go @@ -38,6 +38,9 @@ type DomainDiscoverAPIHost struct { // The agent ID of the Falcon sensor installed on the asset. Aid string `json:"aid,omitempty"` + // All subnets (current and historical) to which the device is or was connected. + AllSubnets []string `json:"all_subnets"` + // The asset role or roles currently assigned to the asset either automatically or by a user (Jump host, Highly connected, Highly active, Server by behavior, DHCP server, DNS server, FTP server, SSH server, or Web server). AssetRoles []string `json:"asset_roles"` @@ -165,6 +168,9 @@ type DomainDiscoverAPIHost struct { // The department where the asset is used. Department string `json:"department,omitempty"` + // The deployment type of the asset. + DeploymentType string `json:"deployment_type,omitempty"` + // The descriptions of the asset in Active Directory (Cannot be used for filtering, sorting, or querying). Descriptions []string `json:"descriptions"` @@ -286,6 +292,9 @@ type DomainDiscoverAPIHost struct { // For Linux and Mac hosts: the major version, minor version, and patch version of the kernel for the asset. For Windows hosts: the build number of the asset. KernelVersion string `json:"kernel_version,omitempty"` + // The date of the most recent authenticated scan. + LastAuthenticatedScanDate string `json:"last_authenticated_scan_date,omitempty"` + // The agent ID of the Falcon sensor installed on the source that most recently discovered the asset. LastDiscovererAid string `json:"last_discoverer_aid,omitempty"` @@ -298,6 +307,12 @@ type DomainDiscoverAPIHost struct { // The most recent time the asset was seen in your environment. LastSeenTimestamp string `json:"last_seen_timestamp,omitempty"` + // The date of the most recent unauthenticated scan. + LastUnauthenticatedScanDate string `json:"last_unauthenticated_scan_date,omitempty"` + + // The sensor mode of the Linux asset. + LinuxSensorMode string `json:"linux_sensor_mode,omitempty"` + // Historical local IPv4 addresses associated with the asset. LocalIPAddresses []string `json:"local_ip_addresses"` @@ -334,6 +349,9 @@ type DomainDiscoverAPIHost struct { // The path, used and available space on mounted disks MountStorageInfo []*DomainDiscoverAPIMountStorageInfo `json:"mount_storage_info"` + // The IP addresses across multiple network interfaces of the device. + MultiNicIPAddresses []string `json:"multi_nic_ip_addresses"` + // The network ID to which device is connected. NetworkID string `json:"network_id,omitempty"` @@ -436,6 +454,9 @@ type DomainDiscoverAPIHost struct { // The subnet to which device is connected. Subnet string `json:"subnet,omitempty"` + // The historical subnets to which the device was connected. + SubnetHistory []string `json:"subnet_history"` + // The asset's system manufacturer. SystemManufacturer string `json:"system_manufacturer,omitempty"` diff --git a/falcon/models/domain_discover_api_io_t_host.go b/falcon/models/domain_discover_api_io_t_host.go index a888eb4f6..e2d84b7aa 100644 --- a/falcon/models/domain_discover_api_io_t_host.go +++ b/falcon/models/domain_discover_api_io_t_host.go @@ -35,6 +35,9 @@ type DomainDiscoverAPIIoTHost struct { // The agent ID of the Falcon sensor installed on the asset. Aid string `json:"aid,omitempty"` + // All subnets (current and historical) to which the device is or was connected. + AllSubnets []string `json:"all_subnets"` + // The asset role or roles currently assigned to the asset either automatically or by a user (Jump host, Highly connected, Highly active, Server by behavior, DHCP server, DNS server, FTP server, SSH server, or Web server). AssetRoles []string `json:"asset_roles"` @@ -144,6 +147,9 @@ type DomainDiscoverAPIIoTHost struct { // The department where the asset is used. Department string `json:"department,omitempty"` + // The deployment type of the asset. + DeploymentType string `json:"deployment_type,omitempty"` + // The descriptions of the asset in Active Directory (Cannot be used for filtering, sorting, or querying). Descriptions []string `json:"descriptions"` @@ -277,6 +283,9 @@ type DomainDiscoverAPIIoTHost struct { // The most recent time the asset was seen in your environment. LastSeenTimestamp string `json:"last_seen_timestamp,omitempty"` + // The sensor mode of the Linux asset. + LinuxSensorMode string `json:"linux_sensor_mode,omitempty"` + // Historical local IPv4 addresses associated with the asset. LocalIPAddresses []string `json:"local_ip_addresses"` @@ -313,6 +322,9 @@ type DomainDiscoverAPIIoTHost struct { // The path, used and available space on mounted disks MountStorageInfo []*DomainDiscoverAPIMountStorageInfo `json:"mount_storage_info"` + // The IP addresses across multiple network interfaces of the device. + MultiNicIPAddresses []string `json:"multi_nic_ip_addresses"` + // The network ID to which device is connected. NetworkID string `json:"network_id,omitempty"` @@ -403,6 +415,9 @@ type DomainDiscoverAPIIoTHost struct { // The subnet to which device is connected. Subnet string `json:"subnet,omitempty"` + // The historical subnets to which the device was connected. + SubnetHistory []string `json:"subnet_history"` + // The asset's system manufacturer. SystemManufacturer string `json:"system_manufacturer,omitempty"` diff --git a/falcon/models/domain_discover_params.go b/falcon/models/domain_discover_params.go index 5f7bd5780..b3226b2c5 100644 --- a/falcon/models/domain_discover_params.go +++ b/falcon/models/domain_discover_params.go @@ -46,10 +46,6 @@ type DomainDiscoverParams struct { // template fields // Required: true TemplateFields []string `json:"template_fields"` - - // top n results - // Required: true - TopnResults *int32 `json:"top_n_results"` } // Validate validates this domain discover params @@ -84,10 +80,6 @@ func (m *DomainDiscoverParams) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateTopnResults(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -157,15 +149,6 @@ func (m *DomainDiscoverParams) validateTemplateFields(formats strfmt.Registry) e return nil } -func (m *DomainDiscoverParams) validateTopnResults(formats strfmt.Registry) error { - - if err := validate.Required("top_n_results", "body", m.TopnResults); err != nil { - return err - } - - return nil -} - // ContextValidate validates this domain discover params based on context it is used func (m *DomainDiscoverParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/falcon/models/domain_enriched_resolution.go b/falcon/models/domain_enriched_resolution.go new file mode 100644 index 000000000..4bd689160 --- /dev/null +++ b/falcon/models/domain_enriched_resolution.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainEnrichedResolution domain enriched resolution +// +// swagger:model domain.EnrichedResolution +type DomainEnrichedResolution struct { + + // reason + // Required: true + Reason *string `json:"reason"` + + // risk factors + RiskFactors []*DomainEnrichedRiskFactor `json:"risk_factors"` + + // risk factors categories + // Required: true + RiskFactorsCategories []string `json:"risk_factors_categories"` +} + +// Validate validates this domain enriched resolution +func (m *DomainEnrichedResolution) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReason(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRiskFactors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRiskFactorsCategories(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedResolution) validateReason(formats strfmt.Registry) error { + + if err := validate.Required("reason", "body", m.Reason); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedResolution) validateRiskFactors(formats strfmt.Registry) error { + if swag.IsZero(m.RiskFactors) { // not required + return nil + } + + for i := 0; i < len(m.RiskFactors); i++ { + if swag.IsZero(m.RiskFactors[i]) { // not required + continue + } + + if m.RiskFactors[i] != nil { + if err := m.RiskFactors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("risk_factors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("risk_factors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DomainEnrichedResolution) validateRiskFactorsCategories(formats strfmt.Registry) error { + + if err := validate.Required("risk_factors_categories", "body", m.RiskFactorsCategories); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this domain enriched resolution based on the context it is used +func (m *DomainEnrichedResolution) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRiskFactors(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedResolution) contextValidateRiskFactors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RiskFactors); i++ { + + if m.RiskFactors[i] != nil { + + if swag.IsZero(m.RiskFactors[i]) { // not required + return nil + } + + if err := m.RiskFactors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("risk_factors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("risk_factors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DomainEnrichedResolution) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainEnrichedResolution) UnmarshalBinary(b []byte) error { + var res DomainEnrichedResolution + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_enriched_risk_factor.go b/falcon/models/domain_enriched_risk_factor.go new file mode 100644 index 000000000..038012198 --- /dev/null +++ b/falcon/models/domain_enriched_risk_factor.go @@ -0,0 +1,198 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainEnrichedRiskFactor domain enriched risk factor +// +// swagger:model domain.EnrichedRiskFactor +type DomainEnrichedRiskFactor struct { + + // calculated at + // Required: true + // Format: date-time + CalculatedAt *strfmt.DateTime `json:"calculated_at"` + + // category + // Required: true + Category *string `json:"category"` + + // id + // Required: true + ID *string `json:"id"` + + // name + // Required: true + Name *string `json:"name"` + + // reason + // Required: true + Reason *DomainEnrichedRiskFactorReason `json:"reason"` + + // value + // Required: true + Value DomainEnrichedRiskFactorValue `json:"value"` +} + +// Validate validates this domain enriched risk factor +func (m *DomainEnrichedRiskFactor) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCalculatedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCategory(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReason(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedRiskFactor) validateCalculatedAt(formats strfmt.Registry) error { + + if err := validate.Required("calculated_at", "body", m.CalculatedAt); err != nil { + return err + } + + if err := validate.FormatOf("calculated_at", "body", "date-time", m.CalculatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskFactor) validateCategory(formats strfmt.Registry) error { + + if err := validate.Required("category", "body", m.Category); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskFactor) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskFactor) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskFactor) validateReason(formats strfmt.Registry) error { + + if err := validate.Required("reason", "body", m.Reason); err != nil { + return err + } + + if m.Reason != nil { + if err := m.Reason.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("reason") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("reason") + } + return err + } + } + + return nil +} + +func (m *DomainEnrichedRiskFactor) validateValue(formats strfmt.Registry) error { + + if m.Value == nil { + return errors.Required("value", "body", nil) + } + + return nil +} + +// ContextValidate validate this domain enriched risk factor based on the context it is used +func (m *DomainEnrichedRiskFactor) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateReason(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedRiskFactor) contextValidateReason(ctx context.Context, formats strfmt.Registry) error { + + if m.Reason != nil { + + if err := m.Reason.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("reason") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("reason") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DomainEnrichedRiskFactor) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainEnrichedRiskFactor) UnmarshalBinary(b []byte) error { + var res DomainEnrichedRiskFactor + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_enriched_risk_factor_reason.go b/falcon/models/domain_enriched_risk_factor_reason.go new file mode 100644 index 000000000..e4e296a92 --- /dev/null +++ b/falcon/models/domain_enriched_risk_factor_reason.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainEnrichedRiskFactorReason domain enriched risk factor reason +// +// swagger:model domain.EnrichedRiskFactorReason +type DomainEnrichedRiskFactorReason struct { + + // configuration change id + ConfigurationChangeID string `json:"configuration_change_id,omitempty"` + + // trigger reason + // Required: true + TriggerReason *string `json:"trigger_reason"` + + // updated at + // Format: date-time + UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` +} + +// Validate validates this domain enriched risk factor reason +func (m *DomainEnrichedRiskFactorReason) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTriggerReason(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedRiskFactorReason) validateTriggerReason(formats strfmt.Registry) error { + + if err := validate.Required("trigger_reason", "body", m.TriggerReason); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskFactorReason) validateUpdatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.UpdatedAt) { // not required + return nil + } + + if err := validate.FormatOf("updated_at", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this domain enriched risk factor reason based on context it is used +func (m *DomainEnrichedRiskFactorReason) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DomainEnrichedRiskFactorReason) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainEnrichedRiskFactorReason) UnmarshalBinary(b []byte) error { + var res DomainEnrichedRiskFactorReason + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_enriched_risk_factor_value.go b/falcon/models/domain_enriched_risk_factor_value.go new file mode 100644 index 000000000..85fbb53af --- /dev/null +++ b/falcon/models/domain_enriched_risk_factor_value.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// DomainEnrichedRiskFactorValue domain enriched risk factor value +// +// swagger:model domain.EnrichedRiskFactor.value +type DomainEnrichedRiskFactorValue interface{} diff --git a/falcon/models/domain_enriched_risk_instance.go b/falcon/models/domain_enriched_risk_instance.go new file mode 100644 index 000000000..8d8f0c7ea --- /dev/null +++ b/falcon/models/domain_enriched_risk_instance.go @@ -0,0 +1,425 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainEnrichedRiskInstance domain enriched risk instance +// +// swagger:model domain.EnrichedRiskInstance +type DomainEnrichedRiskInstance struct { + + // created at + // Required: true + // Format: date-time + CreatedAt *strfmt.DateTime `json:"created_at"` + + // current status + // Required: true + CurrentStatus *string `json:"current_status"` + + // events + Events []*DomainCloudRiskEvent `json:"events"` + + // first seen + // Required: true + // Format: date-time + FirstSeen *strfmt.DateTime `json:"first_seen"` + + // id + // Required: true + ID *string `json:"id"` + + // last seen + // Required: true + // Format: date-time + LastSeen *strfmt.DateTime `json:"last_seen"` + + // reason + // Required: true + Reason *string `json:"reason"` + + // resolution + Resolution *DomainEnrichedResolution `json:"resolution,omitempty"` + + // resolved at + // Format: date-time + ResolvedAt strfmt.DateTime `json:"resolved_at,omitempty"` + + // risk factors + // Required: true + RiskFactors []*DomainEnrichedRiskFactor `json:"risk_factors"` + + // risk factors categories + // Required: true + RiskFactorsCategories []string `json:"risk_factors_categories"` + + // rule name + // Required: true + RuleName *string `json:"rule_name"` + + // severity + // Required: true + Severity *string `json:"severity"` +} + +// Validate validates this domain enriched risk instance +func (m *DomainEnrichedRiskInstance) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCurrentStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEvents(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFirstSeen(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastSeen(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReason(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResolution(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResolvedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRiskFactors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRiskFactorsCategories(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRuleName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSeverity(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedRiskInstance) validateCreatedAt(formats strfmt.Registry) error { + + if err := validate.Required("created_at", "body", m.CreatedAt); err != nil { + return err + } + + if err := validate.FormatOf("created_at", "body", "date-time", m.CreatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) validateCurrentStatus(formats strfmt.Registry) error { + + if err := validate.Required("current_status", "body", m.CurrentStatus); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) validateEvents(formats strfmt.Registry) error { + if swag.IsZero(m.Events) { // not required + return nil + } + + for i := 0; i < len(m.Events); i++ { + if swag.IsZero(m.Events[i]) { // not required + continue + } + + if m.Events[i] != nil { + if err := m.Events[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("events" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("events" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) validateFirstSeen(formats strfmt.Registry) error { + + if err := validate.Required("first_seen", "body", m.FirstSeen); err != nil { + return err + } + + if err := validate.FormatOf("first_seen", "body", "date-time", m.FirstSeen.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) validateLastSeen(formats strfmt.Registry) error { + + if err := validate.Required("last_seen", "body", m.LastSeen); err != nil { + return err + } + + if err := validate.FormatOf("last_seen", "body", "date-time", m.LastSeen.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) validateReason(formats strfmt.Registry) error { + + if err := validate.Required("reason", "body", m.Reason); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) validateResolution(formats strfmt.Registry) error { + if swag.IsZero(m.Resolution) { // not required + return nil + } + + if m.Resolution != nil { + if err := m.Resolution.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resolution") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resolution") + } + return err + } + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) validateResolvedAt(formats strfmt.Registry) error { + if swag.IsZero(m.ResolvedAt) { // not required + return nil + } + + if err := validate.FormatOf("resolved_at", "body", "date-time", m.ResolvedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) validateRiskFactors(formats strfmt.Registry) error { + + if err := validate.Required("risk_factors", "body", m.RiskFactors); err != nil { + return err + } + + for i := 0; i < len(m.RiskFactors); i++ { + if swag.IsZero(m.RiskFactors[i]) { // not required + continue + } + + if m.RiskFactors[i] != nil { + if err := m.RiskFactors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("risk_factors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("risk_factors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) validateRiskFactorsCategories(formats strfmt.Registry) error { + + if err := validate.Required("risk_factors_categories", "body", m.RiskFactorsCategories); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) validateRuleName(formats strfmt.Registry) error { + + if err := validate.Required("rule_name", "body", m.RuleName); err != nil { + return err + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) validateSeverity(formats strfmt.Registry) error { + + if err := validate.Required("severity", "body", m.Severity); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this domain enriched risk instance based on the context it is used +func (m *DomainEnrichedRiskInstance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateEvents(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResolution(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRiskFactors(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedRiskInstance) contextValidateEvents(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Events); i++ { + + if m.Events[i] != nil { + + if swag.IsZero(m.Events[i]) { // not required + return nil + } + + if err := m.Events[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("events" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("events" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) contextValidateResolution(ctx context.Context, formats strfmt.Registry) error { + + if m.Resolution != nil { + + if swag.IsZero(m.Resolution) { // not required + return nil + } + + if err := m.Resolution.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resolution") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resolution") + } + return err + } + } + + return nil +} + +func (m *DomainEnrichedRiskInstance) contextValidateRiskFactors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RiskFactors); i++ { + + if m.RiskFactors[i] != nil { + + if swag.IsZero(m.RiskFactors[i]) { // not required + return nil + } + + if err := m.RiskFactors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("risk_factors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("risk_factors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DomainEnrichedRiskInstance) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainEnrichedRiskInstance) UnmarshalBinary(b []byte) error { + var res DomainEnrichedRiskInstance + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_enriched_risks.go b/falcon/models/domain_enriched_risks.go new file mode 100644 index 000000000..fffbe36c6 --- /dev/null +++ b/falcon/models/domain_enriched_risks.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DomainEnrichedRisks domain enriched risks +// +// swagger:model domain.EnrichedRisks +type DomainEnrichedRisks struct { + + // risk instances + RiskInstances []*DomainEnrichedRiskInstance `json:"risk_instances"` +} + +// Validate validates this domain enriched risks +func (m *DomainEnrichedRisks) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRiskInstances(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedRisks) validateRiskInstances(formats strfmt.Registry) error { + if swag.IsZero(m.RiskInstances) { // not required + return nil + } + + for i := 0; i < len(m.RiskInstances); i++ { + if swag.IsZero(m.RiskInstances[i]) { // not required + continue + } + + if m.RiskInstances[i] != nil { + if err := m.RiskInstances[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("risk_instances" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("risk_instances" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this domain enriched risks based on the context it is used +func (m *DomainEnrichedRisks) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRiskInstances(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedRisks) contextValidateRiskInstances(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RiskInstances); i++ { + + if m.RiskInstances[i] != nil { + + if swag.IsZero(m.RiskInstances[i]) { // not required + return nil + } + + if err := m.RiskInstances[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("risk_instances" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("risk_instances" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DomainEnrichedRisks) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainEnrichedRisks) UnmarshalBinary(b []byte) error { + var res DomainEnrichedRisks + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_enriched_timeline.go b/falcon/models/domain_enriched_timeline.go new file mode 100644 index 000000000..d8f44d588 --- /dev/null +++ b/falcon/models/domain_enriched_timeline.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainEnrichedTimeline domain enriched timeline +// +// swagger:model domain.EnrichedTimeline +type DomainEnrichedTimeline struct { + + // configuration changes + // Required: true + ConfigurationChanges []*DomainConfigurationChange `json:"configuration_changes"` + + // risks + // Required: true + Risks *DomainEnrichedRisks `json:"risks"` +} + +// Validate validates this domain enriched timeline +func (m *DomainEnrichedTimeline) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfigurationChanges(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRisks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedTimeline) validateConfigurationChanges(formats strfmt.Registry) error { + + if err := validate.Required("configuration_changes", "body", m.ConfigurationChanges); err != nil { + return err + } + + for i := 0; i < len(m.ConfigurationChanges); i++ { + if swag.IsZero(m.ConfigurationChanges[i]) { // not required + continue + } + + if m.ConfigurationChanges[i] != nil { + if err := m.ConfigurationChanges[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configuration_changes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("configuration_changes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DomainEnrichedTimeline) validateRisks(formats strfmt.Registry) error { + + if err := validate.Required("risks", "body", m.Risks); err != nil { + return err + } + + if m.Risks != nil { + if err := m.Risks.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("risks") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("risks") + } + return err + } + } + + return nil +} + +// ContextValidate validate this domain enriched timeline based on the context it is used +func (m *DomainEnrichedTimeline) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateConfigurationChanges(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRisks(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedTimeline) contextValidateConfigurationChanges(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ConfigurationChanges); i++ { + + if m.ConfigurationChanges[i] != nil { + + if swag.IsZero(m.ConfigurationChanges[i]) { // not required + return nil + } + + if err := m.ConfigurationChanges[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configuration_changes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("configuration_changes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DomainEnrichedTimeline) contextValidateRisks(ctx context.Context, formats strfmt.Registry) error { + + if m.Risks != nil { + + if err := m.Risks.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("risks") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("risks") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DomainEnrichedTimeline) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainEnrichedTimeline) UnmarshalBinary(b []byte) error { + var res DomainEnrichedTimeline + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_enriched_timeline_resource.go b/falcon/models/domain_enriched_timeline_resource.go new file mode 100644 index 000000000..93066c9da --- /dev/null +++ b/falcon/models/domain_enriched_timeline_resource.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainEnrichedTimelineResource domain enriched timeline resource +// +// swagger:model domain.EnrichedTimelineResource +type DomainEnrichedTimelineResource struct { + + // asset + // Required: true + Asset *DomainAsset `json:"asset"` + + // timeline + // Required: true + Timeline *DomainEnrichedTimeline `json:"timeline"` +} + +// Validate validates this domain enriched timeline resource +func (m *DomainEnrichedTimelineResource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAsset(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTimeline(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedTimelineResource) validateAsset(formats strfmt.Registry) error { + + if err := validate.Required("asset", "body", m.Asset); err != nil { + return err + } + + if m.Asset != nil { + if err := m.Asset.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("asset") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("asset") + } + return err + } + } + + return nil +} + +func (m *DomainEnrichedTimelineResource) validateTimeline(formats strfmt.Registry) error { + + if err := validate.Required("timeline", "body", m.Timeline); err != nil { + return err + } + + if m.Timeline != nil { + if err := m.Timeline.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timeline") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("timeline") + } + return err + } + } + + return nil +} + +// ContextValidate validate this domain enriched timeline resource based on the context it is used +func (m *DomainEnrichedTimelineResource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAsset(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTimeline(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainEnrichedTimelineResource) contextValidateAsset(ctx context.Context, formats strfmt.Registry) error { + + if m.Asset != nil { + + if err := m.Asset.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("asset") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("asset") + } + return err + } + } + + return nil +} + +func (m *DomainEnrichedTimelineResource) contextValidateTimeline(ctx context.Context, formats strfmt.Registry) error { + + if m.Timeline != nil { + + if err := m.Timeline.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timeline") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("timeline") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DomainEnrichedTimelineResource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainEnrichedTimelineResource) UnmarshalBinary(b []byte) error { + var res DomainEnrichedTimelineResource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_kestrel_data_export_execution_context.go b/falcon/models/domain_kestrel_data_export_execution_context.go new file mode 100644 index 000000000..3c2abf5f2 --- /dev/null +++ b/falcon/models/domain_kestrel_data_export_execution_context.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DomainKestrelDataExportExecutionContext domain kestrel data export execution context +// +// swagger:model domain.KestrelDataExportExecutionContext +type DomainKestrelDataExportExecutionContext struct { + + // execution options + ExecutionOptions interface{} `json:"execution_options,omitempty"` +} + +// Validate validates this domain kestrel data export execution context +func (m *DomainKestrelDataExportExecutionContext) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this domain kestrel data export execution context based on context it is used +func (m *DomainKestrelDataExportExecutionContext) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DomainKestrelDataExportExecutionContext) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainKestrelDataExportExecutionContext) UnmarshalBinary(b []byte) error { + var res DomainKestrelDataExportExecutionContext + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_kestrel_data_export_header_mapping_v2.go b/falcon/models/domain_kestrel_data_export_header_mapping_v2.go index 1a4f03400..75485a2e8 100644 --- a/falcon/models/domain_kestrel_data_export_header_mapping_v2.go +++ b/falcon/models/domain_kestrel_data_export_header_mapping_v2.go @@ -28,6 +28,10 @@ type DomainKestrelDataExportHeaderMappingV2 struct { // Required: true ComputationFunctions []*DomainKestrelDataExportHeaderComputationFunctionV2 `json:"computation_functions"` + // formatter override + // Required: true + FormatterOverride *string `json:"formatter_override"` + // header name // Required: true HeaderName *string `json:"header_name"` @@ -49,6 +53,10 @@ func (m *DomainKestrelDataExportHeaderMappingV2) Validate(formats strfmt.Registr res = append(res, err) } + if err := m.validateFormatterOverride(formats); err != nil { + res = append(res, err) + } + if err := m.validateHeaderName(formats); err != nil { res = append(res, err) } @@ -99,6 +107,15 @@ func (m *DomainKestrelDataExportHeaderMappingV2) validateComputationFunctions(fo return nil } +func (m *DomainKestrelDataExportHeaderMappingV2) validateFormatterOverride(formats strfmt.Registry) error { + + if err := validate.Required("formatter_override", "body", m.FormatterOverride); err != nil { + return err + } + + return nil +} + func (m *DomainKestrelDataExportHeaderMappingV2) validateHeaderName(formats strfmt.Registry) error { if err := validate.Required("header_name", "body", m.HeaderName); err != nil { diff --git a/falcon/models/domain_kestrel_data_export_params.go b/falcon/models/domain_kestrel_data_export_params.go index f3b5f3820..5431d9fdc 100644 --- a/falcon/models/domain_kestrel_data_export_params.go +++ b/falcon/models/domain_kestrel_data_export_params.go @@ -20,6 +20,9 @@ import ( // swagger:model domain.KestrelDataExportParams type DomainKestrelDataExportParams struct { + // execution context + ExecutionContext *DomainKestrelDataExportExecutionContext `json:"execution_context,omitempty"` + // export mapping v2 // Required: true ExportMappingV2 []*DomainKestrelDataExportHeaderMappingV2 `json:"export_mapping_v2"` @@ -31,6 +34,9 @@ type DomainKestrelDataExportParams struct { // limit Limit int32 `json:"limit,omitempty"` + // store headers + StoreHeaders map[string]DomainKestrelDataExportParamsStoreHeaders `json:"store_headers,omitempty"` + // view id // Required: true ViewID *string `json:"view_id"` @@ -40,6 +46,10 @@ type DomainKestrelDataExportParams struct { func (m *DomainKestrelDataExportParams) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateExecutionContext(formats); err != nil { + res = append(res, err) + } + if err := m.validateExportMappingV2(formats); err != nil { res = append(res, err) } @@ -58,6 +68,25 @@ func (m *DomainKestrelDataExportParams) Validate(formats strfmt.Registry) error return nil } +func (m *DomainKestrelDataExportParams) validateExecutionContext(formats strfmt.Registry) error { + if swag.IsZero(m.ExecutionContext) { // not required + return nil + } + + if m.ExecutionContext != nil { + if err := m.ExecutionContext.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("execution_context") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("execution_context") + } + return err + } + } + + return nil +} + func (m *DomainKestrelDataExportParams) validateExportMappingV2(formats strfmt.Registry) error { if err := validate.Required("export_mapping_v2", "body", m.ExportMappingV2); err != nil { @@ -107,6 +136,10 @@ func (m *DomainKestrelDataExportParams) validateViewID(formats strfmt.Registry) func (m *DomainKestrelDataExportParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateExecutionContext(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateExportMappingV2(ctx, formats); err != nil { res = append(res, err) } @@ -117,6 +150,27 @@ func (m *DomainKestrelDataExportParams) ContextValidate(ctx context.Context, for return nil } +func (m *DomainKestrelDataExportParams) contextValidateExecutionContext(ctx context.Context, formats strfmt.Registry) error { + + if m.ExecutionContext != nil { + + if swag.IsZero(m.ExecutionContext) { // not required + return nil + } + + if err := m.ExecutionContext.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("execution_context") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("execution_context") + } + return err + } + } + + return nil +} + func (m *DomainKestrelDataExportParams) contextValidateExportMappingV2(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.ExportMappingV2); i++ { diff --git a/falcon/models/domain_kestrel_data_export_params_store_headers.go b/falcon/models/domain_kestrel_data_export_params_store_headers.go new file mode 100644 index 000000000..df3104fcf --- /dev/null +++ b/falcon/models/domain_kestrel_data_export_params_store_headers.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// DomainKestrelDataExportParamsStoreHeaders domain kestrel data export params store headers +// +// swagger:model domain.KestrelDataExportParams.store_headers +type DomainKestrelDataExportParamsStoreHeaders interface{} diff --git a/falcon/models/domain_mitre_attack.go b/falcon/models/domain_mitre_attack.go new file mode 100644 index 000000000..506586a79 --- /dev/null +++ b/falcon/models/domain_mitre_attack.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainMitreAttack domain mitre attack +// +// swagger:model domain.MitreAttack +type DomainMitreAttack struct { + + // id + // Required: true + ID *string `json:"id"` + + // tactic id + // Required: true + TacticID *string `json:"tactic_id"` + + // tactic name + // Required: true + TacticName *string `json:"tactic_name"` + + // technique id + // Required: true + TechniqueID *string `json:"technique_id"` + + // technique name + // Required: true + TechniqueName *string `json:"technique_name"` +} + +// Validate validates this domain mitre attack +func (m *DomainMitreAttack) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTacticID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTacticName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTechniqueID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTechniqueName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainMitreAttack) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *DomainMitreAttack) validateTacticID(formats strfmt.Registry) error { + + if err := validate.Required("tactic_id", "body", m.TacticID); err != nil { + return err + } + + return nil +} + +func (m *DomainMitreAttack) validateTacticName(formats strfmt.Registry) error { + + if err := validate.Required("tactic_name", "body", m.TacticName); err != nil { + return err + } + + return nil +} + +func (m *DomainMitreAttack) validateTechniqueID(formats strfmt.Registry) error { + + if err := validate.Required("technique_id", "body", m.TechniqueID); err != nil { + return err + } + + return nil +} + +func (m *DomainMitreAttack) validateTechniqueName(formats strfmt.Registry) error { + + if err := validate.Required("technique_name", "body", m.TechniqueName); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this domain mitre attack based on context it is used +func (m *DomainMitreAttack) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DomainMitreAttack) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainMitreAttack) UnmarshalBinary(b []byte) error { + var res DomainMitreAttack + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_news_document.go b/falcon/models/domain_news_document.go index a23466494..45caa898a 100644 --- a/falcon/models/domain_news_document.go +++ b/falcon/models/domain_news_document.go @@ -54,6 +54,9 @@ type DomainNewsDocument struct { // Malware mentioned, related or referenced in the news/report Malware []*DomainReportMalware `json:"malware"` + // MITRE attacks referenced in the news/report + MitreAttacks []*DomainMitreAttack `json:"mitre_attacks"` + // News mentioned motivation or motivation of related actors and malware families // Required: true Motivations []*DomainEntity `json:"motivations"` @@ -149,6 +152,10 @@ func (m *DomainNewsDocument) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMitreAttacks(formats); err != nil { + res = append(res, err) + } + if err := m.validateMotivations(formats); err != nil { res = append(res, err) } @@ -346,6 +353,32 @@ func (m *DomainNewsDocument) validateMalware(formats strfmt.Registry) error { return nil } +func (m *DomainNewsDocument) validateMitreAttacks(formats strfmt.Registry) error { + if swag.IsZero(m.MitreAttacks) { // not required + return nil + } + + for i := 0; i < len(m.MitreAttacks); i++ { + if swag.IsZero(m.MitreAttacks[i]) { // not required + continue + } + + if m.MitreAttacks[i] != nil { + if err := m.MitreAttacks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mitre_attacks" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mitre_attacks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *DomainNewsDocument) validateMotivations(formats strfmt.Registry) error { if err := validate.Required("motivations", "body", m.Motivations); err != nil { @@ -573,6 +606,10 @@ func (m *DomainNewsDocument) ContextValidate(ctx context.Context, formats strfmt res = append(res, err) } + if err := m.contextValidateMitreAttacks(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateMotivations(ctx, formats); err != nil { res = append(res, err) } @@ -732,6 +769,31 @@ func (m *DomainNewsDocument) contextValidateMalware(ctx context.Context, formats return nil } +func (m *DomainNewsDocument) contextValidateMitreAttacks(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.MitreAttacks); i++ { + + if m.MitreAttacks[i] != nil { + + if swag.IsZero(m.MitreAttacks[i]) { // not required + return nil + } + + if err := m.MitreAttacks[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mitre_attacks" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mitre_attacks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *DomainNewsDocument) contextValidateMotivations(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Motivations); i++ { diff --git a/falcon/models/domain_notification_v1.go b/falcon/models/domain_notification_v1.go index 7f458e1ba..4f88f1322 100644 --- a/falcon/models/domain_notification_v1.go +++ b/falcon/models/domain_notification_v1.go @@ -87,6 +87,13 @@ type DomainNotificationV1 struct { // Required: true RawIntelID *string `json:"raw_intel_id"` + // risk score label + // Required: true + RiskScoreLabel *string `json:"risk_score_label"` + + // risk score matching criteria + RiskScoreMatchingCriteria []*DomainRiskScoreMatchingCriteriaResponse `json:"risk_score_matching_criteria"` + // The name of the user who created the rule RuleCreatorName string `json:"rule_creator_name,omitempty"` @@ -172,6 +179,14 @@ func (m *DomainNotificationV1) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateRiskScoreLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRiskScoreMatchingCriteria(formats); err != nil { + res = append(res, err) + } + if err := m.validateRuleID(formats); err != nil { res = append(res, err) } @@ -331,6 +346,41 @@ func (m *DomainNotificationV1) validateRawIntelID(formats strfmt.Registry) error return nil } +func (m *DomainNotificationV1) validateRiskScoreLabel(formats strfmt.Registry) error { + + if err := validate.Required("risk_score_label", "body", m.RiskScoreLabel); err != nil { + return err + } + + return nil +} + +func (m *DomainNotificationV1) validateRiskScoreMatchingCriteria(formats strfmt.Registry) error { + if swag.IsZero(m.RiskScoreMatchingCriteria) { // not required + return nil + } + + for i := 0; i < len(m.RiskScoreMatchingCriteria); i++ { + if swag.IsZero(m.RiskScoreMatchingCriteria[i]) { // not required + continue + } + + if m.RiskScoreMatchingCriteria[i] != nil { + if err := m.RiskScoreMatchingCriteria[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("risk_score_matching_criteria" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("risk_score_matching_criteria" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *DomainNotificationV1) validateRuleID(formats strfmt.Registry) error { if err := validate.Required("rule_id", "body", m.RuleID); err != nil { @@ -420,6 +470,10 @@ func (m *DomainNotificationV1) ContextValidate(ctx context.Context, formats strf res = append(res, err) } + if err := m.contextValidateRiskScoreMatchingCriteria(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTyposquatting(ctx, formats); err != nil { res = append(res, err) } @@ -476,6 +530,31 @@ func (m *DomainNotificationV1) contextValidateLogs(ctx context.Context, formats return nil } +func (m *DomainNotificationV1) contextValidateRiskScoreMatchingCriteria(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RiskScoreMatchingCriteria); i++ { + + if m.RiskScoreMatchingCriteria[i] != nil { + + if swag.IsZero(m.RiskScoreMatchingCriteria[i]) { // not required + return nil + } + + if err := m.RiskScoreMatchingCriteria[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("risk_score_matching_criteria" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("risk_score_matching_criteria" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *DomainNotificationV1) contextValidateTyposquatting(ctx context.Context, formats strfmt.Registry) error { if m.Typosquatting != nil { diff --git a/falcon/models/domain_o_c_i_tenancy_create_ext_v1.go b/falcon/models/domain_o_c_i_tenancy_create_ext_v1.go index 11b1795fb..dd47ab8e5 100644 --- a/falcon/models/domain_o_c_i_tenancy_create_ext_v1.go +++ b/falcon/models/domain_o_c_i_tenancy_create_ext_v1.go @@ -34,6 +34,12 @@ type DomainOCITenancyCreateExtV1 struct { // Required: true Products []*DomainCloudOCIProductFeature `json:"products"` + // registration description + RegistrationDescription string `json:"registration_description,omitempty"` + + // registration name + RegistrationName string `json:"registration_name,omitempty"` + // tenancy ocid // Required: true TenancyOcid *string `json:"tenancy_ocid"` diff --git a/falcon/models/domain_o_c_i_tenancy_update_ext_v1.go b/falcon/models/domain_o_c_i_tenancy_update_ext_v1.go index 688569ffd..fcc68a1ae 100644 --- a/falcon/models/domain_o_c_i_tenancy_update_ext_v1.go +++ b/falcon/models/domain_o_c_i_tenancy_update_ext_v1.go @@ -33,6 +33,12 @@ type DomainOCITenancyUpdateExtV1 struct { // Required: true Products []*DomainCloudOCIProductFeature `json:"products"` + // registration description + RegistrationDescription string `json:"registration_description,omitempty"` + + // registration name + RegistrationName string `json:"registration_name,omitempty"` + // Stack OCID StackOcid string `json:"stack_ocid,omitempty"` diff --git a/falcon/models/domain_o_c_i_tenancy_v1.go b/falcon/models/domain_o_c_i_tenancy_v1.go index e150bc261..ee8643005 100644 --- a/falcon/models/domain_o_c_i_tenancy_v1.go +++ b/falcon/models/domain_o_c_i_tenancy_v1.go @@ -87,6 +87,18 @@ type DomainOCITenancyV1 struct { // Required: true PublicKey *string `json:"public_key"` + // registration description + // Required: true + RegistrationDescription *string `json:"registration_description"` + + // registration id + // Required: true + RegistrationID *string `json:"registration_id"` + + // registration name + // Required: true + RegistrationName *string `json:"registration_name"` + // OCI Tenancy stack name // Required: true StackName *string `json:"stack_name"` @@ -189,6 +201,18 @@ func (m *DomainOCITenancyV1) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateRegistrationDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegistrationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegistrationName(formats); err != nil { + res = append(res, err) + } + if err := m.validateStackName(formats); err != nil { res = append(res, err) } @@ -410,6 +434,33 @@ func (m *DomainOCITenancyV1) validatePublicKey(formats strfmt.Registry) error { return nil } +func (m *DomainOCITenancyV1) validateRegistrationDescription(formats strfmt.Registry) error { + + if err := validate.Required("registration_description", "body", m.RegistrationDescription); err != nil { + return err + } + + return nil +} + +func (m *DomainOCITenancyV1) validateRegistrationID(formats strfmt.Registry) error { + + if err := validate.Required("registration_id", "body", m.RegistrationID); err != nil { + return err + } + + return nil +} + +func (m *DomainOCITenancyV1) validateRegistrationName(formats strfmt.Registry) error { + + if err := validate.Required("registration_name", "body", m.RegistrationName); err != nil { + return err + } + + return nil +} + func (m *DomainOCITenancyV1) validateStackName(formats strfmt.Registry) error { if err := validate.Required("stack_name", "body", m.StackName); err != nil { diff --git a/falcon/models/domain_resource_event.go b/falcon/models/domain_resource_event.go new file mode 100644 index 000000000..fe589bb85 --- /dev/null +++ b/falcon/models/domain_resource_event.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainResourceEvent domain resource event +// +// swagger:model domain.ResourceEvent +type DomainResourceEvent struct { + + // event name + // Required: true + EventName *string `json:"event_name"` + + // timestamp + // Required: true + // Format: date-time + Timestamp *strfmt.DateTime `json:"timestamp"` + + // user id + UserID string `json:"user_id,omitempty"` + + // user name + UserName string `json:"user_name,omitempty"` +} + +// Validate validates this domain resource event +func (m *DomainResourceEvent) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEventName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTimestamp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainResourceEvent) validateEventName(formats strfmt.Registry) error { + + if err := validate.Required("event_name", "body", m.EventName); err != nil { + return err + } + + return nil +} + +func (m *DomainResourceEvent) validateTimestamp(formats strfmt.Registry) error { + + if err := validate.Required("timestamp", "body", m.Timestamp); err != nil { + return err + } + + if err := validate.FormatOf("timestamp", "body", "date-time", m.Timestamp.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this domain resource event based on context it is used +func (m *DomainResourceEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DomainResourceEvent) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainResourceEvent) UnmarshalBinary(b []byte) error { + var res DomainResourceEvent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_risk_score_matching_criteria_response.go b/falcon/models/domain_risk_score_matching_criteria_response.go new file mode 100644 index 000000000..1185f1850 --- /dev/null +++ b/falcon/models/domain_risk_score_matching_criteria_response.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainRiskScoreMatchingCriteriaResponse domain risk score matching criteria response +// +// swagger:model domain.RiskScoreMatchingCriteriaResponse +type DomainRiskScoreMatchingCriteriaResponse struct { + + // criteria + // Required: true + Criteria *string `json:"criteria"` + + // feature + // Required: true + Feature *string `json:"feature"` +} + +// Validate validates this domain risk score matching criteria response +func (m *DomainRiskScoreMatchingCriteriaResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCriteria(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFeature(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainRiskScoreMatchingCriteriaResponse) validateCriteria(formats strfmt.Registry) error { + + if err := validate.Required("criteria", "body", m.Criteria); err != nil { + return err + } + + return nil +} + +func (m *DomainRiskScoreMatchingCriteriaResponse) validateFeature(formats strfmt.Registry) error { + + if err := validate.Required("feature", "body", m.Feature); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this domain risk score matching criteria response based on context it is used +func (m *DomainRiskScoreMatchingCriteriaResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DomainRiskScoreMatchingCriteriaResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainRiskScoreMatchingCriteriaResponse) UnmarshalBinary(b []byte) error { + var res DomainRiskScoreMatchingCriteriaResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_save_config_request.go b/falcon/models/domain_save_config_request.go index e69270f94..f62c53ef3 100644 --- a/falcon/models/domain_save_config_request.go +++ b/falcon/models/domain_save_config_request.go @@ -44,10 +44,6 @@ type DomainSaveConfigRequest struct { // Required: true Platform *string `json:"platform"` - // self destruct - // Required: true - SelfDestruct *bool `json:"self_destruct"` - // tag // Required: true Tag *string `json:"tag"` @@ -81,10 +77,6 @@ func (m *DomainSaveConfigRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateSelfDestruct(formats); err != nil { - res = append(res, err) - } - if err := m.validateTag(formats); err != nil { res = append(res, err) } @@ -167,15 +159,6 @@ func (m *DomainSaveConfigRequest) validatePlatform(formats strfmt.Registry) erro return nil } -func (m *DomainSaveConfigRequest) validateSelfDestruct(formats strfmt.Registry) error { - - if err := validate.Required("self_destruct", "body", m.SelfDestruct); err != nil { - return err - } - - return nil -} - func (m *DomainSaveConfigRequest) validateTag(formats strfmt.Registry) error { if err := validate.Required("tag", "body", m.Tag); err != nil { diff --git a/falcon/models/domain_scan_profile.go b/falcon/models/domain_scan_profile.go index a85aba7cd..6154984da 100644 --- a/falcon/models/domain_scan_profile.go +++ b/falcon/models/domain_scan_profile.go @@ -20,6 +20,9 @@ import ( // swagger:model domain.ScanProfile type DomainScanProfile struct { + // channel file status + ChannelFileStatus int32 `json:"channel_file_status,omitempty"` + // cid Cid string `json:"cid,omitempty"` @@ -149,6 +152,9 @@ type DomainScanProfile struct { // targeted host count TargetedHostCount int32 `json:"targeted_host_count,omitempty"` + + // targeted platforms + TargetedPlatforms []string `json:"targeted_platforms"` } // Validate validates this domain scan profile diff --git a/falcon/models/domain_scan_run.go b/falcon/models/domain_scan_run.go index 25f37d1a9..cff95864b 100644 --- a/falcon/models/domain_scan_run.go +++ b/falcon/models/domain_scan_run.go @@ -36,6 +36,9 @@ type DomainScanRun struct { // Required: true CreatedTimestamp *string `json:"created_timestamp"` + // summary of credential usage across scanned assets + CredentialedAssetSummary *DomainCredentialedAssetSummary `json:"credentialed_asset_summary,omitempty"` + // The end time of the scan run // Required: true EndTimestamp *string `json:"end_timestamp"` @@ -132,6 +135,10 @@ func (m *DomainScanRun) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCredentialedAssetSummary(formats); err != nil { + res = append(res, err) + } + if err := m.validateEndTimestamp(formats); err != nil { res = append(res, err) } @@ -244,6 +251,25 @@ func (m *DomainScanRun) validateCreatedTimestamp(formats strfmt.Registry) error return nil } +func (m *DomainScanRun) validateCredentialedAssetSummary(formats strfmt.Registry) error { + if swag.IsZero(m.CredentialedAssetSummary) { // not required + return nil + } + + if m.CredentialedAssetSummary != nil { + if err := m.CredentialedAssetSummary.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentialed_asset_summary") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("credentialed_asset_summary") + } + return err + } + } + + return nil +} + func (m *DomainScanRun) validateEndTimestamp(formats strfmt.Registry) error { if err := validate.Required("end_timestamp", "body", m.EndTimestamp); err != nil { @@ -528,6 +554,10 @@ func (m *DomainScanRun) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } + if err := m.contextValidateCredentialedAssetSummary(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateScanners(ctx, formats); err != nil { res = append(res, err) } @@ -559,6 +589,27 @@ func (m *DomainScanRun) contextValidateConfig(ctx context.Context, formats strfm return nil } +func (m *DomainScanRun) contextValidateCredentialedAssetSummary(ctx context.Context, formats strfmt.Registry) error { + + if m.CredentialedAssetSummary != nil { + + if swag.IsZero(m.CredentialedAssetSummary) { // not required + return nil + } + + if err := m.CredentialedAssetSummary.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentialed_asset_summary") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("credentialed_asset_summary") + } + return err + } + } + + return nil +} + func (m *DomainScanRun) contextValidateScanners(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Scanners); i++ { diff --git a/falcon/models/domain_scan_run_config.go b/falcon/models/domain_scan_run_config.go index ea840653b..72cd90678 100644 --- a/falcon/models/domain_scan_run_config.go +++ b/falcon/models/domain_scan_run_config.go @@ -32,6 +32,12 @@ type DomainScanRunConfig struct { // The detections to use for the scan Detections []string `json:"detections"` + // The set of excluded TCP ports + ExcludedTCPPorts []string `json:"excluded_tcp_ports"` + + // The set of excluded UDP ports + ExcludedUDPPorts []string `json:"excluded_udp_ports"` + // Indicates whether fragile device detection is enabled or not FragileDeviceDetection bool `json:"fragile_device_detection,omitempty"` @@ -46,6 +52,9 @@ type DomainScanRunConfig struct { // The scan exclusion configuration ScanExclusion *DomainScanExclusion `json:"scan_exclusion,omitempty"` + // Custom nmap flag overrides for this scan run + ScanFlags *NswipScanFlags `json:"scan_flags,omitempty"` + // The scan intensity // Required: true // Enum: [basic,standard,cautious,maximum] @@ -89,6 +98,10 @@ func (m *DomainScanRunConfig) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateScanFlags(formats); err != nil { + res = append(res, err) + } + if err := m.validateScanIntensity(formats); err != nil { res = append(res, err) } @@ -186,6 +199,25 @@ func (m *DomainScanRunConfig) validateScanExclusion(formats strfmt.Registry) err return nil } +func (m *DomainScanRunConfig) validateScanFlags(formats strfmt.Registry) error { + if swag.IsZero(m.ScanFlags) { // not required + return nil + } + + if m.ScanFlags != nil { + if err := m.ScanFlags.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scan_flags") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scan_flags") + } + return err + } + } + + return nil +} + var domainScanRunConfigTypeScanIntensityPropEnum []interface{} func init() { @@ -409,6 +441,10 @@ func (m *DomainScanRunConfig) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateScanFlags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTargetAsset(ctx, formats); err != nil { res = append(res, err) } @@ -456,6 +492,27 @@ func (m *DomainScanRunConfig) contextValidateScanExclusion(ctx context.Context, return nil } +func (m *DomainScanRunConfig) contextValidateScanFlags(ctx context.Context, formats strfmt.Registry) error { + + if m.ScanFlags != nil { + + if swag.IsZero(m.ScanFlags) { // not required + return nil + } + + if err := m.ScanFlags.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scan_flags") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scan_flags") + } + return err + } + } + + return nil +} + func (m *DomainScanRunConfig) contextValidateTargetAsset(ctx context.Context, formats strfmt.Registry) error { if m.TargetAsset != nil { diff --git a/falcon/models/domain_scan_schedule_data_v1.go b/falcon/models/domain_scan_schedule_data_v1.go index a86311355..a7814149d 100644 --- a/falcon/models/domain_scan_schedule_data_v1.go +++ b/falcon/models/domain_scan_schedule_data_v1.go @@ -23,6 +23,10 @@ type DomainScanScheduleDataV1 struct { // Required: true CloudPlatform *string `json:"cloud_platform"` + // last scan completed at + // Format: date-time + LastScanCompletedAt strfmt.DateTime `json:"last_scan_completed_at,omitempty"` + // next scan timestamp // Format: date-time NextScanTimestamp strfmt.DateTime `json:"next_scan_timestamp,omitempty"` @@ -42,6 +46,10 @@ func (m *DomainScanScheduleDataV1) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLastScanCompletedAt(formats); err != nil { + res = append(res, err) + } + if err := m.validateNextScanTimestamp(formats); err != nil { res = append(res, err) } @@ -61,6 +69,18 @@ func (m *DomainScanScheduleDataV1) validateCloudPlatform(formats strfmt.Registry return nil } +func (m *DomainScanScheduleDataV1) validateLastScanCompletedAt(formats strfmt.Registry) error { + if swag.IsZero(m.LastScanCompletedAt) { // not required + return nil + } + + if err := validate.FormatOf("last_scan_completed_at", "body", "date-time", m.LastScanCompletedAt.String(), formats); err != nil { + return err + } + + return nil +} + func (m *DomainScanScheduleDataV1) validateNextScanTimestamp(formats strfmt.Registry) error { if swag.IsZero(m.NextScanTimestamp) { // not required return nil diff --git a/falcon/models/domain_template.go b/falcon/models/domain_template.go index 539329d75..0c2762a74 100644 --- a/falcon/models/domain_template.go +++ b/falcon/models/domain_template.go @@ -51,6 +51,12 @@ type DomainTemplate struct { // Required: true Detections []string `json:"detections"` + // Excluded TCP ports associated with the template + ExcludedTCPPorts []string `json:"excluded_tcp_ports"` + + // Excluded UDP ports associated with the template + ExcludedUDPPorts []string `json:"excluded_udp_ports"` + // The unique identifier of the template // Required: true ID *string `json:"id"` @@ -68,9 +74,12 @@ type DomainTemplate struct { // Enum: [default,all_ports,custom] PortsScanLevel *string `json:"ports_scan_level"` + // Custom nmap flag overrides for this template + ScanFlags *NswipScanFlags `json:"scan_flags,omitempty"` + // The scan intensity at which scans will run from this template // Required: true - // Enum: [basic,standard,cautious,maximum] + // Enum: [basic,standard,cautious,maximum,custom] ScanIntensity *string `json:"scan_intensity"` // The type of the template @@ -129,6 +138,10 @@ func (m *DomainTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateScanFlags(formats); err != nil { + res = append(res, err) + } + if err := m.validateScanIntensity(formats); err != nil { res = append(res, err) } @@ -295,11 +308,30 @@ func (m *DomainTemplate) validatePortsScanLevel(formats strfmt.Registry) error { return nil } +func (m *DomainTemplate) validateScanFlags(formats strfmt.Registry) error { + if swag.IsZero(m.ScanFlags) { // not required + return nil + } + + if m.ScanFlags != nil { + if err := m.ScanFlags.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scan_flags") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scan_flags") + } + return err + } + } + + return nil +} + var domainTemplateTypeScanIntensityPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["basic,standard,cautious,maximum"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["basic,standard,cautious,maximum,custom"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -309,8 +341,8 @@ func init() { const ( - // DomainTemplateScanIntensityBasicStandardCautiousMaximum captures enum value "basic,standard,cautious,maximum" - DomainTemplateScanIntensityBasicStandardCautiousMaximum string = "basic,standard,cautious,maximum" + // DomainTemplateScanIntensityBasicStandardCautiousMaximumCustom captures enum value "basic,standard,cautious,maximum,custom" + DomainTemplateScanIntensityBasicStandardCautiousMaximumCustom string = "basic,standard,cautious,maximum,custom" ) // prop value enum @@ -375,8 +407,38 @@ func (m *DomainTemplate) validateType(formats strfmt.Registry) error { return nil } -// ContextValidate validates this domain template based on context it is used +// ContextValidate validate this domain template based on the context it is used func (m *DomainTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateScanFlags(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainTemplate) contextValidateScanFlags(ctx context.Context, formats strfmt.Registry) error { + + if m.ScanFlags != nil { + + if swag.IsZero(m.ScanFlags) { // not required + return nil + } + + if err := m.ScanFlags.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scan_flags") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scan_flags") + } + return err + } + } + return nil } diff --git a/falcon/models/domain_template_create_request.go b/falcon/models/domain_template_create_request.go index 605cae27c..44c9c1264 100644 --- a/falcon/models/domain_template_create_request.go +++ b/falcon/models/domain_template_create_request.go @@ -37,6 +37,12 @@ type DomainTemplateCreateRequest struct { // Detections associated with the template Detections []string `json:"detections"` + // Excluded TCP ports associated with the template + ExcludedTCPPorts []string `json:"excluded_tcp_ports"` + + // Excluded UDP ports associated with the template + ExcludedUDPPorts []string `json:"excluded_udp_ports"` + // Ignore TCP resets associated with the template IgnoreTCPResets bool `json:"ignore_tcp_resets,omitempty"` @@ -49,9 +55,12 @@ type DomainTemplateCreateRequest struct { // Enum: [default,all_ports,custom] PortsScanLevel *string `json:"ports_scan_level"` + // Custom nmap flag overrides for this template + ScanFlags *NswipScanFlags `json:"scan_flags,omitempty"` + // The scan intensity at which scans will run from this template // Required: true - // Enum: [basic,standard,cautious,maximum] + // Enum: [basic,standard,cautious,maximum,custom] ScanIntensity *string `json:"scan_intensity"` // The type of the template @@ -76,6 +85,10 @@ func (m *DomainTemplateCreateRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateScanFlags(formats); err != nil { + res = append(res, err) + } + if err := m.validateScanIntensity(formats); err != nil { res = append(res, err) } @@ -179,11 +192,30 @@ func (m *DomainTemplateCreateRequest) validatePortsScanLevel(formats strfmt.Regi return nil } +func (m *DomainTemplateCreateRequest) validateScanFlags(formats strfmt.Registry) error { + if swag.IsZero(m.ScanFlags) { // not required + return nil + } + + if m.ScanFlags != nil { + if err := m.ScanFlags.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scan_flags") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scan_flags") + } + return err + } + } + + return nil +} + var domainTemplateCreateRequestTypeScanIntensityPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["basic,standard,cautious,maximum"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["basic,standard,cautious,maximum,custom"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -193,8 +225,8 @@ func init() { const ( - // DomainTemplateCreateRequestScanIntensityBasicStandardCautiousMaximum captures enum value "basic,standard,cautious,maximum" - DomainTemplateCreateRequestScanIntensityBasicStandardCautiousMaximum string = "basic,standard,cautious,maximum" + // DomainTemplateCreateRequestScanIntensityBasicStandardCautiousMaximumCustom captures enum value "basic,standard,cautious,maximum,custom" + DomainTemplateCreateRequestScanIntensityBasicStandardCautiousMaximumCustom string = "basic,standard,cautious,maximum,custom" ) // prop value enum @@ -259,8 +291,38 @@ func (m *DomainTemplateCreateRequest) validateType(formats strfmt.Registry) erro return nil } -// ContextValidate validates this domain template create request based on context it is used +// ContextValidate validate this domain template create request based on the context it is used func (m *DomainTemplateCreateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateScanFlags(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainTemplateCreateRequest) contextValidateScanFlags(ctx context.Context, formats strfmt.Registry) error { + + if m.ScanFlags != nil { + + if swag.IsZero(m.ScanFlags) { // not required + return nil + } + + if err := m.ScanFlags.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scan_flags") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scan_flags") + } + return err + } + } + return nil } diff --git a/falcon/models/domain_template_update_request.go b/falcon/models/domain_template_update_request.go index 077d4d296..7534b02fa 100644 --- a/falcon/models/domain_template_update_request.go +++ b/falcon/models/domain_template_update_request.go @@ -37,6 +37,12 @@ type DomainTemplateUpdateRequest struct { // Detections associated with the template Detections []string `json:"detections"` + // Excluded TCP ports associated with the template + ExcludedTCPPorts []string `json:"excluded_tcp_ports"` + + // Excluded UDP ports associated with the template + ExcludedUDPPorts []string `json:"excluded_udp_ports"` + // The unique identifier of the template // Required: true ID *string `json:"id"` @@ -51,8 +57,11 @@ type DomainTemplateUpdateRequest struct { // Enum: [default,all_ports,custom] PortsScanLevel string `json:"ports_scan_level,omitempty"` + // Custom nmap flag overrides for this template + ScanFlags *NswipScanFlags `json:"scan_flags,omitempty"` + // The scan intensity at which scans will run from this template - // Enum: [basic,standard,cautious,maximum] + // Enum: [basic,standard,cautious,maximum,custom] ScanIntensity string `json:"scan_intensity,omitempty"` } @@ -72,6 +81,10 @@ func (m *DomainTemplateUpdateRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateScanFlags(formats); err != nil { + res = append(res, err) + } + if err := m.validateScanIntensity(formats); err != nil { res = append(res, err) } @@ -169,11 +182,30 @@ func (m *DomainTemplateUpdateRequest) validatePortsScanLevel(formats strfmt.Regi return nil } +func (m *DomainTemplateUpdateRequest) validateScanFlags(formats strfmt.Registry) error { + if swag.IsZero(m.ScanFlags) { // not required + return nil + } + + if m.ScanFlags != nil { + if err := m.ScanFlags.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scan_flags") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scan_flags") + } + return err + } + } + + return nil +} + var domainTemplateUpdateRequestTypeScanIntensityPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["basic,standard,cautious,maximum"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["basic,standard,cautious,maximum,custom"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -183,8 +215,8 @@ func init() { const ( - // DomainTemplateUpdateRequestScanIntensityBasicStandardCautiousMaximum captures enum value "basic,standard,cautious,maximum" - DomainTemplateUpdateRequestScanIntensityBasicStandardCautiousMaximum string = "basic,standard,cautious,maximum" + // DomainTemplateUpdateRequestScanIntensityBasicStandardCautiousMaximumCustom captures enum value "basic,standard,cautious,maximum,custom" + DomainTemplateUpdateRequestScanIntensityBasicStandardCautiousMaximumCustom string = "basic,standard,cautious,maximum,custom" ) // prop value enum @@ -208,8 +240,38 @@ func (m *DomainTemplateUpdateRequest) validateScanIntensity(formats strfmt.Regis return nil } -// ContextValidate validates this domain template update request based on context it is used +// ContextValidate validate this domain template update request based on the context it is used func (m *DomainTemplateUpdateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateScanFlags(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainTemplateUpdateRequest) contextValidateScanFlags(ctx context.Context, formats strfmt.Registry) error { + + if m.ScanFlags != nil { + + if swag.IsZero(m.ScanFlags) { // not required + return nil + } + + if err := m.ScanFlags.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scan_flags") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scan_flags") + } + return err + } + } + return nil } diff --git a/falcon/models/domain_third_party_passkey_registry.go b/falcon/models/domain_third_party_passkey_registry.go new file mode 100644 index 000000000..8c09f8d31 --- /dev/null +++ b/falcon/models/domain_third_party_passkey_registry.go @@ -0,0 +1,208 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainThirdPartyPasskeyRegistry domain third party passkey registry +// +// swagger:model domain.ThirdPartyPasskeyRegistry +type DomainThirdPartyPasskeyRegistry struct { + + // aid + Aid string `json:"aid,omitempty"` + + // cid + Cid string `json:"cid,omitempty"` + + // credential id + CredentialID string `json:"credential_id,omitempty"` + + // device name + DeviceName string `json:"device_name,omitempty"` + + // enabled + // Required: true + Enabled *bool `json:"enabled"` + + // id + // Required: true + ID *string `json:"id"` + + // last auth result + LastAuthResult string `json:"last_auth_result,omitempty"` + + // last used at + // Format: date-time + LastUsedAt strfmt.DateTime `json:"last_used_at,omitempty"` + + // mw info + MwInfo *MwtypesMWInfo `json:"mw_info,omitempty"` + + // registered at + // Format: date-time + RegisteredAt strfmt.DateTime `json:"registered_at,omitempty"` + + // relying party + RelyingParty string `json:"relying_party,omitempty"` + + // user id + UserID string `json:"user_id,omitempty"` + + // username + Username string `json:"username,omitempty"` +} + +// Validate validates this domain third party passkey registry +func (m *DomainThirdPartyPasskeyRegistry) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEnabled(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUsedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMwInfo(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegisteredAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainThirdPartyPasskeyRegistry) validateEnabled(formats strfmt.Registry) error { + + if err := validate.Required("enabled", "body", m.Enabled); err != nil { + return err + } + + return nil +} + +func (m *DomainThirdPartyPasskeyRegistry) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *DomainThirdPartyPasskeyRegistry) validateLastUsedAt(formats strfmt.Registry) error { + if swag.IsZero(m.LastUsedAt) { // not required + return nil + } + + if err := validate.FormatOf("last_used_at", "body", "date-time", m.LastUsedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *DomainThirdPartyPasskeyRegistry) validateMwInfo(formats strfmt.Registry) error { + if swag.IsZero(m.MwInfo) { // not required + return nil + } + + if m.MwInfo != nil { + if err := m.MwInfo.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mw_info") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mw_info") + } + return err + } + } + + return nil +} + +func (m *DomainThirdPartyPasskeyRegistry) validateRegisteredAt(formats strfmt.Registry) error { + if swag.IsZero(m.RegisteredAt) { // not required + return nil + } + + if err := validate.FormatOf("registered_at", "body", "date-time", m.RegisteredAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this domain third party passkey registry based on the context it is used +func (m *DomainThirdPartyPasskeyRegistry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMwInfo(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainThirdPartyPasskeyRegistry) contextValidateMwInfo(ctx context.Context, formats strfmt.Registry) error { + + if m.MwInfo != nil { + + if swag.IsZero(m.MwInfo) { // not required + return nil + } + + if err := m.MwInfo.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mw_info") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mw_info") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DomainThirdPartyPasskeyRegistry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainThirdPartyPasskeyRegistry) UnmarshalBinary(b []byte) error { + var res DomainThirdPartyPasskeyRegistry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_third_party_passkey_registry_device_integrity.go b/falcon/models/domain_third_party_passkey_registry_device_integrity.go new file mode 100644 index 000000000..c0b104f78 --- /dev/null +++ b/falcon/models/domain_third_party_passkey_registry_device_integrity.go @@ -0,0 +1,225 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DomainThirdPartyPasskeyRegistryDeviceIntegrity domain third party passkey registry device integrity +// +// swagger:model domain.ThirdPartyPasskeyRegistryDeviceIntegrity +type DomainThirdPartyPasskeyRegistryDeviceIntegrity struct { + + // aid + Aid string `json:"aid,omitempty"` + + // cid + Cid string `json:"cid,omitempty"` + + // credential id + CredentialID string `json:"credential_id,omitempty"` + + // device name + DeviceName string `json:"device_name,omitempty"` + + // enabled + // Required: true + Enabled *bool `json:"enabled"` + + // id + // Required: true + ID *string `json:"id"` + + // last auth result + LastAuthResult string `json:"last_auth_result,omitempty"` + + // last used at + // Format: date-time + LastUsedAt strfmt.DateTime `json:"last_used_at,omitempty"` + + // mw info + MwInfo *MwtypesMWInfo `json:"mw_info,omitempty"` + + // registered at + // Format: date-time + RegisteredAt strfmt.DateTime `json:"registered_at,omitempty"` + + // relying party + RelyingParty string `json:"relying_party,omitempty"` + + // security check required + // Required: true + SecurityCheckRequired *bool `json:"security_check_required"` + + // user id + UserID string `json:"user_id,omitempty"` + + // username + Username string `json:"username,omitempty"` +} + +// Validate validates this domain third party passkey registry device integrity +func (m *DomainThirdPartyPasskeyRegistryDeviceIntegrity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEnabled(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUsedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMwInfo(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegisteredAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecurityCheckRequired(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainThirdPartyPasskeyRegistryDeviceIntegrity) validateEnabled(formats strfmt.Registry) error { + + if err := validate.Required("enabled", "body", m.Enabled); err != nil { + return err + } + + return nil +} + +func (m *DomainThirdPartyPasskeyRegistryDeviceIntegrity) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *DomainThirdPartyPasskeyRegistryDeviceIntegrity) validateLastUsedAt(formats strfmt.Registry) error { + if swag.IsZero(m.LastUsedAt) { // not required + return nil + } + + if err := validate.FormatOf("last_used_at", "body", "date-time", m.LastUsedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *DomainThirdPartyPasskeyRegistryDeviceIntegrity) validateMwInfo(formats strfmt.Registry) error { + if swag.IsZero(m.MwInfo) { // not required + return nil + } + + if m.MwInfo != nil { + if err := m.MwInfo.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mw_info") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mw_info") + } + return err + } + } + + return nil +} + +func (m *DomainThirdPartyPasskeyRegistryDeviceIntegrity) validateRegisteredAt(formats strfmt.Registry) error { + if swag.IsZero(m.RegisteredAt) { // not required + return nil + } + + if err := validate.FormatOf("registered_at", "body", "date-time", m.RegisteredAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *DomainThirdPartyPasskeyRegistryDeviceIntegrity) validateSecurityCheckRequired(formats strfmt.Registry) error { + + if err := validate.Required("security_check_required", "body", m.SecurityCheckRequired); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this domain third party passkey registry device integrity based on the context it is used +func (m *DomainThirdPartyPasskeyRegistryDeviceIntegrity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMwInfo(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainThirdPartyPasskeyRegistryDeviceIntegrity) contextValidateMwInfo(ctx context.Context, formats strfmt.Registry) error { + + if m.MwInfo != nil { + + if swag.IsZero(m.MwInfo) { // not required + return nil + } + + if err := m.MwInfo.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mw_info") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mw_info") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DomainThirdPartyPasskeyRegistryDeviceIntegrity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainThirdPartyPasskeyRegistryDeviceIntegrity) UnmarshalBinary(b []byte) error { + var res DomainThirdPartyPasskeyRegistryDeviceIntegrity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/domain_user.go b/falcon/models/domain_user.go index 426229329..e57d3cc2b 100644 --- a/falcon/models/domain_user.go +++ b/falcon/models/domain_user.go @@ -49,6 +49,9 @@ type DomainUser struct { // Format: date-time UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` + // user type + UserType string `json:"user_type,omitempty"` + // uuid UUID string `json:"uuid,omitempty"` } diff --git a/falcon/models/dto_create_g_c_p_registration_request.go b/falcon/models/dto_create_g_c_p_registration_request.go index 2fa6401ff..3415f9226 100644 --- a/falcon/models/dto_create_g_c_p_registration_request.go +++ b/falcon/models/dto_create_g_c_p_registration_request.go @@ -27,6 +27,9 @@ type DtoCreateGCPRegistrationRequest struct { // Required: true DeploymentMethod *string `json:"deployment_method"` + // dspm settings + DspmSettings *GcpAgentlessScanningSettings `json:"dspm_settings,omitempty"` + // entity id // Required: true EntityID []string `json:"entity_id"` @@ -53,6 +56,9 @@ type DtoCreateGCPRegistrationRequest struct { // products Products []*DomainProductFeatures `json:"products"` + // registration description + RegistrationDescription string `json:"registration_description,omitempty"` + // registration name // Required: true RegistrationName *string `json:"registration_name"` @@ -70,6 +76,9 @@ type DtoCreateGCPRegistrationRequest struct { // tags Tags GcpTags `json:"tags,omitempty"` + // vulnerability scanning settings + VulnerabilityScanningSettings *GcpAgentlessScanningSettings `json:"vulnerability_scanning_settings,omitempty"` + // wif project id // Required: true WifProjectID *string `json:"wif_project_id"` @@ -86,6 +95,10 @@ func (m *DtoCreateGCPRegistrationRequest) Validate(formats strfmt.Registry) erro res = append(res, err) } + if err := m.validateDspmSettings(formats); err != nil { + res = append(res, err) + } + if err := m.validateEntityID(formats); err != nil { res = append(res, err) } @@ -114,6 +127,10 @@ func (m *DtoCreateGCPRegistrationRequest) Validate(formats strfmt.Registry) erro res = append(res, err) } + if err := m.validateVulnerabilityScanningSettings(formats); err != nil { + res = append(res, err) + } + if err := m.validateWifProjectID(formats); err != nil { res = append(res, err) } @@ -133,6 +150,25 @@ func (m *DtoCreateGCPRegistrationRequest) validateDeploymentMethod(formats strfm return nil } +func (m *DtoCreateGCPRegistrationRequest) validateDspmSettings(formats strfmt.Registry) error { + if swag.IsZero(m.DspmSettings) { // not required + return nil + } + + if m.DspmSettings != nil { + if err := m.DspmSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dspm_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dspm_settings") + } + return err + } + } + + return nil +} + func (m *DtoCreateGCPRegistrationRequest) validateEntityID(formats strfmt.Registry) error { if err := validate.Required("entity_id", "body", m.EntityID); err != nil { @@ -233,6 +269,25 @@ func (m *DtoCreateGCPRegistrationRequest) validateTags(formats strfmt.Registry) return nil } +func (m *DtoCreateGCPRegistrationRequest) validateVulnerabilityScanningSettings(formats strfmt.Registry) error { + if swag.IsZero(m.VulnerabilityScanningSettings) { // not required + return nil + } + + if m.VulnerabilityScanningSettings != nil { + if err := m.VulnerabilityScanningSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_settings") + } + return err + } + } + + return nil +} + func (m *DtoCreateGCPRegistrationRequest) validateWifProjectID(formats strfmt.Registry) error { if err := validate.Required("wif_project_id", "body", m.WifProjectID); err != nil { @@ -246,6 +301,10 @@ func (m *DtoCreateGCPRegistrationRequest) validateWifProjectID(formats strfmt.Re func (m *DtoCreateGCPRegistrationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateDspmSettings(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLabels(ctx, formats); err != nil { res = append(res, err) } @@ -258,12 +317,37 @@ func (m *DtoCreateGCPRegistrationRequest) ContextValidate(ctx context.Context, f res = append(res, err) } + if err := m.contextValidateVulnerabilityScanningSettings(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +func (m *DtoCreateGCPRegistrationRequest) contextValidateDspmSettings(ctx context.Context, formats strfmt.Registry) error { + + if m.DspmSettings != nil { + + if swag.IsZero(m.DspmSettings) { // not required + return nil + } + + if err := m.DspmSettings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dspm_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dspm_settings") + } + return err + } + } + + return nil +} + func (m *DtoCreateGCPRegistrationRequest) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { if swag.IsZero(m.Labels) { // not required @@ -325,6 +409,27 @@ func (m *DtoCreateGCPRegistrationRequest) contextValidateTags(ctx context.Contex return nil } +func (m *DtoCreateGCPRegistrationRequest) contextValidateVulnerabilityScanningSettings(ctx context.Context, formats strfmt.Registry) error { + + if m.VulnerabilityScanningSettings != nil { + + if swag.IsZero(m.VulnerabilityScanningSettings) { // not required + return nil + } + + if err := m.VulnerabilityScanningSettings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_settings") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *DtoCreateGCPRegistrationRequest) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/falcon/models/dto_g_c_p_registration.go b/falcon/models/dto_g_c_p_registration.go index 7047708bc..de0561df7 100644 --- a/falcon/models/dto_g_c_p_registration.go +++ b/falcon/models/dto_g_c_p_registration.go @@ -23,13 +23,24 @@ type DtoGCPRegistration struct { // additional properties AdditionalProperties DtoGCPRegistrationBaseAdditionalProperties `json:"additional_properties,omitempty"` + // cloud registration enabled + // Required: true + CloudRegistrationEnabled *bool `json:"cloud_registration_enabled"` + // created // Format: date-time Created strfmt.DateTime `json:"created,omitempty"` + // cspm enabled + // Required: true + CspmEnabled *bool `json:"cspm_enabled"` + // deployment method DeploymentMethod string `json:"deployment_method,omitempty"` + // dspm settings + DspmSettings *GcpAgentlessScanningSettings `json:"dspm_settings,omitempty"` + // excluded project patterns ExcludedProjectPatterns []string `json:"excluded_project_patterns"` @@ -63,6 +74,9 @@ type DtoGCPRegistration struct { // projects Projects []*DtoProject `json:"projects"` + // registration description + RegistrationDescription string `json:"registration_description,omitempty"` + // registration id RegistrationID string `json:"registration_id,omitempty"` @@ -78,6 +92,9 @@ type DtoGCPRegistration struct { // resource name suffix ResourceNameSuffix string `json:"resource_name_suffix,omitempty"` + // service account properties + ServiceAccountProperties *DtoServiceAccountProperties `json:"service_account_properties,omitempty"` + // status Status string `json:"status,omitempty"` @@ -88,6 +105,9 @@ type DtoGCPRegistration struct { // Format: date-time Updated strfmt.DateTime `json:"updated,omitempty"` + // vulnerability scanning settings + VulnerabilityScanningSettings *GcpAgentlessScanningSettings `json:"vulnerability_scanning_settings,omitempty"` + // wif properties WifProperties *DtoWIFProperties `json:"wif_properties,omitempty"` } @@ -96,10 +116,22 @@ type DtoGCPRegistration struct { func (m *DtoGCPRegistration) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateCloudRegistrationEnabled(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } + if err := m.validateCspmEnabled(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDspmSettings(formats); err != nil { + res = append(res, err) + } + if err := m.validateFolders(formats); err != nil { res = append(res, err) } @@ -128,6 +160,10 @@ func (m *DtoGCPRegistration) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateServiceAccountProperties(formats); err != nil { + res = append(res, err) + } + if err := m.validateTags(formats); err != nil { res = append(res, err) } @@ -136,6 +172,10 @@ func (m *DtoGCPRegistration) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVulnerabilityScanningSettings(formats); err != nil { + res = append(res, err) + } + if err := m.validateWifProperties(formats); err != nil { res = append(res, err) } @@ -146,6 +186,15 @@ func (m *DtoGCPRegistration) Validate(formats strfmt.Registry) error { return nil } +func (m *DtoGCPRegistration) validateCloudRegistrationEnabled(formats strfmt.Registry) error { + + if err := validate.Required("cloud_registration_enabled", "body", m.CloudRegistrationEnabled); err != nil { + return err + } + + return nil +} + func (m *DtoGCPRegistration) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil @@ -158,6 +207,34 @@ func (m *DtoGCPRegistration) validateCreated(formats strfmt.Registry) error { return nil } +func (m *DtoGCPRegistration) validateCspmEnabled(formats strfmt.Registry) error { + + if err := validate.Required("cspm_enabled", "body", m.CspmEnabled); err != nil { + return err + } + + return nil +} + +func (m *DtoGCPRegistration) validateDspmSettings(formats strfmt.Registry) error { + if swag.IsZero(m.DspmSettings) { // not required + return nil + } + + if m.DspmSettings != nil { + if err := m.DspmSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dspm_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dspm_settings") + } + return err + } + } + + return nil +} + func (m *DtoGCPRegistration) validateFolders(formats strfmt.Registry) error { if swag.IsZero(m.Folders) { // not required return nil @@ -312,6 +389,25 @@ func (m *DtoGCPRegistration) validateProjects(formats strfmt.Registry) error { return nil } +func (m *DtoGCPRegistration) validateServiceAccountProperties(formats strfmt.Registry) error { + if swag.IsZero(m.ServiceAccountProperties) { // not required + return nil + } + + if m.ServiceAccountProperties != nil { + if err := m.ServiceAccountProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("service_account_properties") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("service_account_properties") + } + return err + } + } + + return nil +} + func (m *DtoGCPRegistration) validateTags(formats strfmt.Registry) error { if swag.IsZero(m.Tags) { // not required return nil @@ -343,6 +439,25 @@ func (m *DtoGCPRegistration) validateUpdated(formats strfmt.Registry) error { return nil } +func (m *DtoGCPRegistration) validateVulnerabilityScanningSettings(formats strfmt.Registry) error { + if swag.IsZero(m.VulnerabilityScanningSettings) { // not required + return nil + } + + if m.VulnerabilityScanningSettings != nil { + if err := m.VulnerabilityScanningSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_settings") + } + return err + } + } + + return nil +} + func (m *DtoGCPRegistration) validateWifProperties(formats strfmt.Registry) error { if swag.IsZero(m.WifProperties) { // not required return nil @@ -366,6 +481,10 @@ func (m *DtoGCPRegistration) validateWifProperties(formats strfmt.Registry) erro func (m *DtoGCPRegistration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateDspmSettings(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateFolders(ctx, formats); err != nil { res = append(res, err) } @@ -394,10 +513,18 @@ func (m *DtoGCPRegistration) ContextValidate(ctx context.Context, formats strfmt res = append(res, err) } + if err := m.contextValidateServiceAccountProperties(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } + if err := m.contextValidateVulnerabilityScanningSettings(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateWifProperties(ctx, formats); err != nil { res = append(res, err) } @@ -408,6 +535,27 @@ func (m *DtoGCPRegistration) ContextValidate(ctx context.Context, formats strfmt return nil } +func (m *DtoGCPRegistration) contextValidateDspmSettings(ctx context.Context, formats strfmt.Registry) error { + + if m.DspmSettings != nil { + + if swag.IsZero(m.DspmSettings) { // not required + return nil + } + + if err := m.DspmSettings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dspm_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dspm_settings") + } + return err + } + } + + return nil +} + func (m *DtoGCPRegistration) contextValidateFolders(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Folders); i++ { @@ -564,6 +712,27 @@ func (m *DtoGCPRegistration) contextValidateProjects(ctx context.Context, format return nil } +func (m *DtoGCPRegistration) contextValidateServiceAccountProperties(ctx context.Context, formats strfmt.Registry) error { + + if m.ServiceAccountProperties != nil { + + if swag.IsZero(m.ServiceAccountProperties) { // not required + return nil + } + + if err := m.ServiceAccountProperties.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("service_account_properties") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("service_account_properties") + } + return err + } + } + + return nil +} + func (m *DtoGCPRegistration) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { if swag.IsZero(m.Tags) { // not required @@ -582,6 +751,27 @@ func (m *DtoGCPRegistration) contextValidateTags(ctx context.Context, formats st return nil } +func (m *DtoGCPRegistration) contextValidateVulnerabilityScanningSettings(ctx context.Context, formats strfmt.Registry) error { + + if m.VulnerabilityScanningSettings != nil { + + if swag.IsZero(m.VulnerabilityScanningSettings) { // not required + return nil + } + + if err := m.VulnerabilityScanningSettings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_settings") + } + return err + } + } + + return nil +} + func (m *DtoGCPRegistration) contextValidateWifProperties(ctx context.Context, formats strfmt.Registry) error { if m.WifProperties != nil { diff --git a/falcon/models/dto_service_account_properties.go b/falcon/models/dto_service_account_properties.go new file mode 100644 index 000000000..e40002658 --- /dev/null +++ b/falcon/models/dto_service_account_properties.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// DtoServiceAccountProperties dto service account properties +// +// swagger:model dto.ServiceAccountProperties +type DtoServiceAccountProperties struct { + + // client email + ClientEmail string `json:"client_email,omitempty"` + + // client id + ClientID string `json:"client_id,omitempty"` + + // encrypted private key + EncryptedPrivateKey string `json:"encrypted_private_key,omitempty"` + + // id + // Required: true + ID *int32 `json:"id"` + + // private key id + PrivateKeyID string `json:"private_key_id,omitempty"` + + // project id + ProjectID string `json:"project_id,omitempty"` +} + +// Validate validates this dto service account properties +func (m *DtoServiceAccountProperties) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DtoServiceAccountProperties) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this dto service account properties based on context it is used +func (m *DtoServiceAccountProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DtoServiceAccountProperties) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DtoServiceAccountProperties) UnmarshalBinary(b []byte) error { + var res DtoServiceAccountProperties + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/dto_update_g_c_p_registration_request.go b/falcon/models/dto_update_g_c_p_registration_request.go index 1500b8f04..e246a7971 100644 --- a/falcon/models/dto_update_g_c_p_registration_request.go +++ b/falcon/models/dto_update_g_c_p_registration_request.go @@ -25,6 +25,9 @@ type DtoUpdateGCPRegistrationRequest struct { // deployment method DeploymentMethod string `json:"deployment_method,omitempty"` + // dspm settings + DspmSettings *GcpAgentlessScanningSettings `json:"dspm_settings,omitempty"` + // entity id EntityID []string `json:"entity_id"` @@ -58,6 +61,9 @@ type DtoUpdateGCPRegistrationRequest struct { // products Products []*DomainProductFeatures `json:"products"` + // registration description + RegistrationDescription string `json:"registration_description,omitempty"` + // registration name RegistrationName string `json:"registration_name,omitempty"` @@ -73,6 +79,9 @@ type DtoUpdateGCPRegistrationRequest struct { // tags Tags GcpTags `json:"tags,omitempty"` + // vulnerability scanning settings + VulnerabilityScanningSettings *GcpAgentlessScanningSettings `json:"vulnerability_scanning_settings,omitempty"` + // wif pool name WifPoolName *string `json:"wif_pool_name,omitempty"` @@ -90,6 +99,10 @@ type DtoUpdateGCPRegistrationRequest struct { func (m *DtoUpdateGCPRegistrationRequest) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDspmSettings(formats); err != nil { + res = append(res, err) + } + if err := m.validateLabels(formats); err != nil { res = append(res, err) } @@ -102,12 +115,35 @@ func (m *DtoUpdateGCPRegistrationRequest) Validate(formats strfmt.Registry) erro res = append(res, err) } + if err := m.validateVulnerabilityScanningSettings(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +func (m *DtoUpdateGCPRegistrationRequest) validateDspmSettings(formats strfmt.Registry) error { + if swag.IsZero(m.DspmSettings) { // not required + return nil + } + + if m.DspmSettings != nil { + if err := m.DspmSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dspm_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dspm_settings") + } + return err + } + } + + return nil +} + func (m *DtoUpdateGCPRegistrationRequest) validateLabels(formats strfmt.Registry) error { if swag.IsZero(m.Labels) { // not required return nil @@ -172,10 +208,33 @@ func (m *DtoUpdateGCPRegistrationRequest) validateTags(formats strfmt.Registry) return nil } +func (m *DtoUpdateGCPRegistrationRequest) validateVulnerabilityScanningSettings(formats strfmt.Registry) error { + if swag.IsZero(m.VulnerabilityScanningSettings) { // not required + return nil + } + + if m.VulnerabilityScanningSettings != nil { + if err := m.VulnerabilityScanningSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_settings") + } + return err + } + } + + return nil +} + // ContextValidate validate this dto update g c p registration request based on the context it is used func (m *DtoUpdateGCPRegistrationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateDspmSettings(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLabels(ctx, formats); err != nil { res = append(res, err) } @@ -188,12 +247,37 @@ func (m *DtoUpdateGCPRegistrationRequest) ContextValidate(ctx context.Context, f res = append(res, err) } + if err := m.contextValidateVulnerabilityScanningSettings(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +func (m *DtoUpdateGCPRegistrationRequest) contextValidateDspmSettings(ctx context.Context, formats strfmt.Registry) error { + + if m.DspmSettings != nil { + + if swag.IsZero(m.DspmSettings) { // not required + return nil + } + + if err := m.DspmSettings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dspm_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dspm_settings") + } + return err + } + } + + return nil +} + func (m *DtoUpdateGCPRegistrationRequest) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { if swag.IsZero(m.Labels) { // not required @@ -255,6 +339,27 @@ func (m *DtoUpdateGCPRegistrationRequest) contextValidateTags(ctx context.Contex return nil } +func (m *DtoUpdateGCPRegistrationRequest) contextValidateVulnerabilityScanningSettings(ctx context.Context, formats strfmt.Registry) error { + + if m.VulnerabilityScanningSettings != nil { + + if swag.IsZero(m.VulnerabilityScanningSettings) { // not required + return nil + } + + if err := m.VulnerabilityScanningSettings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_settings") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *DtoUpdateGCPRegistrationRequest) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/falcon/models/falconidapi_third_party_passkey_registry_delete_response_v1.go b/falcon/models/falconidapi_third_party_passkey_registry_delete_response_v1.go new file mode 100644 index 000000000..94221a12a --- /dev/null +++ b/falcon/models/falconidapi_third_party_passkey_registry_delete_response_v1.go @@ -0,0 +1,188 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1 falconidapi third party passkey registry delete response v1 +// +// swagger:model falconidapi.ThirdPartyPasskeyRegistryDeleteResponseV1 +type FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + // Required: true + Resources []string `json:"resources"` +} + +// Validate validates this falconidapi third party passkey registry delete response v1 +func (m *FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this falconidapi third party passkey registry delete response v1 based on the context it is used +func (m *FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1) UnmarshalBinary(b []byte) error { + var res FalconidapiThirdPartyPasskeyRegistryDeleteResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/falconidapi_third_party_passkey_registry_get_response_v1.go b/falcon/models/falconidapi_third_party_passkey_registry_get_response_v1.go new file mode 100644 index 000000000..437ab4a60 --- /dev/null +++ b/falcon/models/falconidapi_third_party_passkey_registry_get_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FalconidapiThirdPartyPasskeyRegistryGetResponseV1 falconidapi third party passkey registry get response v1 +// +// swagger:model falconidapi.ThirdPartyPasskeyRegistryGetResponseV1 +type FalconidapiThirdPartyPasskeyRegistryGetResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + // Required: true + Resources []*DomainThirdPartyPasskeyRegistryDeviceIntegrity `json:"resources"` +} + +// Validate validates this falconidapi third party passkey registry get response v1 +func (m *FalconidapiThirdPartyPasskeyRegistryGetResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryGetResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryGetResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryGetResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this falconidapi third party passkey registry get response v1 based on the context it is used +func (m *FalconidapiThirdPartyPasskeyRegistryGetResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryGetResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryGetResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryGetResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FalconidapiThirdPartyPasskeyRegistryGetResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FalconidapiThirdPartyPasskeyRegistryGetResponseV1) UnmarshalBinary(b []byte) error { + var res FalconidapiThirdPartyPasskeyRegistryGetResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/falconidapi_third_party_passkey_registry_patch_request_v1.go b/falcon/models/falconidapi_third_party_passkey_registry_patch_request_v1.go new file mode 100644 index 000000000..55fcbf20a --- /dev/null +++ b/falcon/models/falconidapi_third_party_passkey_registry_patch_request_v1.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FalconidapiThirdPartyPasskeyRegistryPatchRequestV1 falconidapi third party passkey registry patch request v1 +// +// swagger:model falconidapi.ThirdPartyPasskeyRegistryPatchRequestV1 +type FalconidapiThirdPartyPasskeyRegistryPatchRequestV1 struct { + + // enabled + // Required: true + Enabled *bool `json:"enabled"` + + // id + // Required: true + ID *string `json:"id"` +} + +// Validate validates this falconidapi third party passkey registry patch request v1 +func (m *FalconidapiThirdPartyPasskeyRegistryPatchRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEnabled(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryPatchRequestV1) validateEnabled(formats strfmt.Registry) error { + + if err := validate.Required("enabled", "body", m.Enabled); err != nil { + return err + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryPatchRequestV1) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this falconidapi third party passkey registry patch request v1 based on context it is used +func (m *FalconidapiThirdPartyPasskeyRegistryPatchRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FalconidapiThirdPartyPasskeyRegistryPatchRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FalconidapiThirdPartyPasskeyRegistryPatchRequestV1) UnmarshalBinary(b []byte) error { + var res FalconidapiThirdPartyPasskeyRegistryPatchRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/falconidapi_third_party_passkey_registry_patch_response_v1.go b/falcon/models/falconidapi_third_party_passkey_registry_patch_response_v1.go new file mode 100644 index 000000000..801274118 --- /dev/null +++ b/falcon/models/falconidapi_third_party_passkey_registry_patch_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FalconidapiThirdPartyPasskeyRegistryPatchResponseV1 falconidapi third party passkey registry patch response v1 +// +// swagger:model falconidapi.ThirdPartyPasskeyRegistryPatchResponseV1 +type FalconidapiThirdPartyPasskeyRegistryPatchResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + // Required: true + Resources []*DomainThirdPartyPasskeyRegistry `json:"resources"` +} + +// Validate validates this falconidapi third party passkey registry patch response v1 +func (m *FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this falconidapi third party passkey registry patch response v1 based on the context it is used +func (m *FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FalconidapiThirdPartyPasskeyRegistryPatchResponseV1) UnmarshalBinary(b []byte) error { + var res FalconidapiThirdPartyPasskeyRegistryPatchResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/falconidapi_third_party_passkey_registry_query_response_v1.go b/falcon/models/falconidapi_third_party_passkey_registry_query_response_v1.go new file mode 100644 index 000000000..13c993ac2 --- /dev/null +++ b/falcon/models/falconidapi_third_party_passkey_registry_query_response_v1.go @@ -0,0 +1,188 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FalconidapiThirdPartyPasskeyRegistryQueryResponseV1 falconidapi third party passkey registry query response v1 +// +// swagger:model falconidapi.ThirdPartyPasskeyRegistryQueryResponseV1 +type FalconidapiThirdPartyPasskeyRegistryQueryResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + // Required: true + Resources []string `json:"resources"` +} + +// Validate validates this falconidapi third party passkey registry query response v1 +func (m *FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this falconidapi third party passkey registry query response v1 based on the context it is used +func (m *FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FalconidapiThirdPartyPasskeyRegistryQueryResponseV1) UnmarshalBinary(b []byte) error { + var res FalconidapiThirdPartyPasskeyRegistryQueryResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/figapi_indicator.go b/falcon/models/figapi_indicator.go index c62e99e28..391b46b1c 100644 --- a/falcon/models/figapi_indicator.go +++ b/falcon/models/figapi_indicator.go @@ -85,6 +85,9 @@ type FigapiIndicator struct { // sectors Sectors []*FigapiSector `json:"Sectors"` + // software packages + SoftwarePackages []*FigapiSoftwarePackage `json:"SoftwarePackages"` + // threat types ThreatTypes []string `json:"ThreatTypes"` @@ -160,6 +163,10 @@ func (m *FigapiIndicator) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSoftwarePackages(formats); err != nil { + res = append(res, err) + } + if err := m.validateThreats(formats); err != nil { res = append(res, err) } @@ -464,6 +471,32 @@ func (m *FigapiIndicator) validateSectors(formats strfmt.Registry) error { return nil } +func (m *FigapiIndicator) validateSoftwarePackages(formats strfmt.Registry) error { + if swag.IsZero(m.SoftwarePackages) { // not required + return nil + } + + for i := 0; i < len(m.SoftwarePackages); i++ { + if swag.IsZero(m.SoftwarePackages[i]) { // not required + continue + } + + if m.SoftwarePackages[i] != nil { + if err := m.SoftwarePackages[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("SoftwarePackages" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("SoftwarePackages" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *FigapiIndicator) validateThreats(formats strfmt.Registry) error { if swag.IsZero(m.Threats) { // not required return nil @@ -610,6 +643,10 @@ func (m *FigapiIndicator) ContextValidate(ctx context.Context, formats strfmt.Re res = append(res, err) } + if err := m.contextValidateSoftwarePackages(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateThreats(ctx, formats); err != nil { res = append(res, err) } @@ -925,6 +962,31 @@ func (m *FigapiIndicator) contextValidateSectors(ctx context.Context, formats st return nil } +func (m *FigapiIndicator) contextValidateSoftwarePackages(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.SoftwarePackages); i++ { + + if m.SoftwarePackages[i] != nil { + + if swag.IsZero(m.SoftwarePackages[i]) { // not required + return nil + } + + if err := m.SoftwarePackages[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("SoftwarePackages" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("SoftwarePackages" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *FigapiIndicator) contextValidateThreats(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Threats); i++ { diff --git a/falcon/models/figapi_lookup_indicator.go b/falcon/models/figapi_lookup_indicator.go index a17191802..0064db76c 100644 --- a/falcon/models/figapi_lookup_indicator.go +++ b/falcon/models/figapi_lookup_indicator.go @@ -88,6 +88,9 @@ type FigapiLookupIndicator struct { // sectors Sectors []*FigapiSector `json:"Sectors"` + // software packages + SoftwarePackages []*FigapiSoftwarePackage `json:"SoftwarePackages"` + // threat types ThreatTypes []string `json:"ThreatTypes"` @@ -163,6 +166,10 @@ func (m *FigapiLookupIndicator) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSoftwarePackages(formats); err != nil { + res = append(res, err) + } + if err := m.validateThreats(formats); err != nil { res = append(res, err) } @@ -467,6 +474,32 @@ func (m *FigapiLookupIndicator) validateSectors(formats strfmt.Registry) error { return nil } +func (m *FigapiLookupIndicator) validateSoftwarePackages(formats strfmt.Registry) error { + if swag.IsZero(m.SoftwarePackages) { // not required + return nil + } + + for i := 0; i < len(m.SoftwarePackages); i++ { + if swag.IsZero(m.SoftwarePackages[i]) { // not required + continue + } + + if m.SoftwarePackages[i] != nil { + if err := m.SoftwarePackages[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("SoftwarePackages" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("SoftwarePackages" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *FigapiLookupIndicator) validateThreats(formats strfmt.Registry) error { if swag.IsZero(m.Threats) { // not required return nil @@ -613,6 +646,10 @@ func (m *FigapiLookupIndicator) ContextValidate(ctx context.Context, formats str res = append(res, err) } + if err := m.contextValidateSoftwarePackages(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateThreats(ctx, formats); err != nil { res = append(res, err) } @@ -928,6 +965,31 @@ func (m *FigapiLookupIndicator) contextValidateSectors(ctx context.Context, form return nil } +func (m *FigapiLookupIndicator) contextValidateSoftwarePackages(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.SoftwarePackages); i++ { + + if m.SoftwarePackages[i] != nil { + + if swag.IsZero(m.SoftwarePackages[i]) { // not required + return nil + } + + if err := m.SoftwarePackages[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("SoftwarePackages" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("SoftwarePackages" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *FigapiLookupIndicator) contextValidateThreats(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Threats); i++ { diff --git a/falcon/models/figapi_software_package.go b/falcon/models/figapi_software_package.go new file mode 100644 index 000000000..49e760962 --- /dev/null +++ b/falcon/models/figapi_software_package.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// FigapiSoftwarePackage figapi software package +// +// swagger:model figapi.SoftwarePackage +type FigapiSoftwarePackage struct { + + // Name of the software package. + Name string `json:"Name,omitempty"` + + // Package repository hosting the package, e.g. `NPM`, `PyPi`, `Cargo`, `NuGet`, `Packagist`, `GitHub`, `Other`. + Repository string `json:"Repository,omitempty"` + + // Version of the software package contained in the File. + Version string `json:"Version,omitempty"` +} + +// Validate validates this figapi software package +func (m *FigapiSoftwarePackage) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this figapi software package based on context it is used +func (m *FigapiSoftwarePackage) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FigapiSoftwarePackage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FigapiSoftwarePackage) UnmarshalBinary(b []byte) error { + var res FigapiSoftwarePackage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/flightcontrolapi_combined_user_roles_resource_v2.go b/falcon/models/flightcontrolapi_combined_user_roles_resource_v2.go index 7c8d5eacf..e1999c82f 100644 --- a/falcon/models/flightcontrolapi_combined_user_roles_resource_v2.go +++ b/falcon/models/flightcontrolapi_combined_user_roles_resource_v2.go @@ -51,6 +51,9 @@ type FlightcontrolapiCombinedUserRolesResourceV2 struct { // user group name UserGroupName string `json:"user_group_name,omitempty"` + // user type + UserType string `json:"user_type,omitempty"` + // uuid UUID string `json:"uuid,omitempty"` } diff --git a/falcon/models/flightcontrolapi_create_group_request_v1.go b/falcon/models/flightcontrolapi_create_group_request_v1.go new file mode 100644 index 000000000..18fe79b3c --- /dev/null +++ b/falcon/models/flightcontrolapi_create_group_request_v1.go @@ -0,0 +1,91 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FlightcontrolapiCreateGroupRequestV1 flightcontrolapi create group request v1 +// +// swagger:model flightcontrolapi.CreateGroupRequestV1 +type FlightcontrolapiCreateGroupRequestV1 struct { + + // CID for the new profile group in a Flight Control environment + // Required: true + Cid *string `json:"cid"` + + // Optional description for the group + Description string `json:"description,omitempty"` + + // Name for the new profile group + // Required: true + Name *string `json:"name"` +} + +// Validate validates this flightcontrolapi create group request v1 +func (m *FlightcontrolapiCreateGroupRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCid(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiCreateGroupRequestV1) validateCid(formats strfmt.Registry) error { + + if err := validate.Required("cid", "body", m.Cid); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiCreateGroupRequestV1) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this flightcontrolapi create group request v1 based on context it is used +func (m *FlightcontrolapiCreateGroupRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FlightcontrolapiCreateGroupRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FlightcontrolapiCreateGroupRequestV1) UnmarshalBinary(b []byte) error { + var res FlightcontrolapiCreateGroupRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/flightcontrolapi_group_assignment.go b/falcon/models/flightcontrolapi_group_assignment.go new file mode 100644 index 000000000..562587950 --- /dev/null +++ b/falcon/models/flightcontrolapi_group_assignment.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// FlightcontrolapiGroupAssignment flightcontrolapi group assignment +// +// swagger:model flightcontrolapi.GroupAssignment +type FlightcontrolapiGroupAssignment struct { + + // Assigned FGA object IDs by type (host_group, cloud_group, access_scope) + FgaObjectIds map[string][]string `json:"fga_object_ids,omitempty"` + + // Assigned role IDs + RoleIds []string `json:"role_ids"` + + // Assigned user group IDs + UserGroupIds []string `json:"user_group_ids"` +} + +// Validate validates this flightcontrolapi group assignment +func (m *FlightcontrolapiGroupAssignment) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this flightcontrolapi group assignment based on context it is used +func (m *FlightcontrolapiGroupAssignment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FlightcontrolapiGroupAssignment) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FlightcontrolapiGroupAssignment) UnmarshalBinary(b []byte) error { + var res FlightcontrolapiGroupAssignment + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/flightcontrolapi_group_users_request_v1.go b/falcon/models/flightcontrolapi_group_users_request_v1.go new file mode 100644 index 000000000..eecc8499c --- /dev/null +++ b/falcon/models/flightcontrolapi_group_users_request_v1.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FlightcontrolapiGroupUsersRequestV1 flightcontrolapi group users request v1 +// +// swagger:model flightcontrolapi.GroupUsersRequestV1 +type FlightcontrolapiGroupUsersRequestV1 struct { + + // Profile Group IDs to get users for + // Required: true + Ids []string `json:"ids"` +} + +// Validate validates this flightcontrolapi group users request v1 +func (m *FlightcontrolapiGroupUsersRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIds(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiGroupUsersRequestV1) validateIds(formats strfmt.Registry) error { + + if err := validate.Required("ids", "body", m.Ids); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this flightcontrolapi group users request v1 based on context it is used +func (m *FlightcontrolapiGroupUsersRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FlightcontrolapiGroupUsersRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FlightcontrolapiGroupUsersRequestV1) UnmarshalBinary(b []byte) error { + var res FlightcontrolapiGroupUsersRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/flightcontrolapi_group_users_response_v1.go b/falcon/models/flightcontrolapi_group_users_response_v1.go new file mode 100644 index 000000000..5a3869171 --- /dev/null +++ b/falcon/models/flightcontrolapi_group_users_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FlightcontrolapiGroupUsersResponseV1 flightcontrolapi group users response v1 +// +// swagger:model flightcontrolapi.GroupUsersResponseV1 +type FlightcontrolapiGroupUsersResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // List of groups with their users + // Required: true + Resources []*FlightcontrolapiGroupUsersV1 `json:"resources"` +} + +// Validate validates this flightcontrolapi group users response v1 +func (m *FlightcontrolapiGroupUsersResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiGroupUsersResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FlightcontrolapiGroupUsersResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *FlightcontrolapiGroupUsersResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this flightcontrolapi group users response v1 based on the context it is used +func (m *FlightcontrolapiGroupUsersResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiGroupUsersResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FlightcontrolapiGroupUsersResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *FlightcontrolapiGroupUsersResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FlightcontrolapiGroupUsersResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FlightcontrolapiGroupUsersResponseV1) UnmarshalBinary(b []byte) error { + var res FlightcontrolapiGroupUsersResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/flightcontrolapi_group_users_v1.go b/falcon/models/flightcontrolapi_group_users_v1.go new file mode 100644 index 000000000..fb9c9c477 --- /dev/null +++ b/falcon/models/flightcontrolapi_group_users_v1.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FlightcontrolapiGroupUsersV1 flightcontrolapi group users v1 +// +// swagger:model flightcontrolapi.GroupUsersV1 +type FlightcontrolapiGroupUsersV1 struct { + + // Profile Group ID + // Required: true + GroupID *string `json:"group_id"` + + // User UUIDs in the group + // Required: true + UserUuids []string `json:"user_uuids"` +} + +// Validate validates this flightcontrolapi group users v1 +func (m *FlightcontrolapiGroupUsersV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGroupID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUserUuids(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiGroupUsersV1) validateGroupID(formats strfmt.Registry) error { + + if err := validate.Required("group_id", "body", m.GroupID); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiGroupUsersV1) validateUserUuids(formats strfmt.Registry) error { + + if err := validate.Required("user_uuids", "body", m.UserUuids); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this flightcontrolapi group users v1 based on context it is used +func (m *FlightcontrolapiGroupUsersV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FlightcontrolapiGroupUsersV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FlightcontrolapiGroupUsersV1) UnmarshalBinary(b []byte) error { + var res FlightcontrolapiGroupUsersV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/flightcontrolapi_profile_group_request_v1.go b/falcon/models/flightcontrolapi_profile_group_request_v1.go new file mode 100644 index 000000000..4776cb327 --- /dev/null +++ b/falcon/models/flightcontrolapi_profile_group_request_v1.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FlightcontrolapiProfileGroupRequestV1 flightcontrolapi profile group request v1 +// +// swagger:model flightcontrolapi.ProfileGroupRequestV1 +type FlightcontrolapiProfileGroupRequestV1 struct { + + // Profile Group IDs to retrieve + // Required: true + Ids []string `json:"ids"` +} + +// Validate validates this flightcontrolapi profile group request v1 +func (m *FlightcontrolapiProfileGroupRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIds(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiProfileGroupRequestV1) validateIds(formats strfmt.Registry) error { + + if err := validate.Required("ids", "body", m.Ids); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this flightcontrolapi profile group request v1 based on context it is used +func (m *FlightcontrolapiProfileGroupRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FlightcontrolapiProfileGroupRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FlightcontrolapiProfileGroupRequestV1) UnmarshalBinary(b []byte) error { + var res FlightcontrolapiProfileGroupRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/flightcontrolapi_profile_group_response_v1.go b/falcon/models/flightcontrolapi_profile_group_response_v1.go new file mode 100644 index 000000000..396e1afa3 --- /dev/null +++ b/falcon/models/flightcontrolapi_profile_group_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FlightcontrolapiProfileGroupResponseV1 flightcontrolapi profile group response v1 +// +// swagger:model flightcontrolapi.ProfileGroupResponseV1 +type FlightcontrolapiProfileGroupResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // List of profile groups + // Required: true + Resources []*FlightcontrolapiProfileGroupV1 `json:"resources"` +} + +// Validate validates this flightcontrolapi profile group response v1 +func (m *FlightcontrolapiProfileGroupResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiProfileGroupResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this flightcontrolapi profile group response v1 based on the context it is used +func (m *FlightcontrolapiProfileGroupResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiProfileGroupResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FlightcontrolapiProfileGroupResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FlightcontrolapiProfileGroupResponseV1) UnmarshalBinary(b []byte) error { + var res FlightcontrolapiProfileGroupResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/flightcontrolapi_profile_group_v1.go b/falcon/models/flightcontrolapi_profile_group_v1.go new file mode 100644 index 000000000..f272ef4fd --- /dev/null +++ b/falcon/models/flightcontrolapi_profile_group_v1.go @@ -0,0 +1,342 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FlightcontrolapiProfileGroupV1 flightcontrolapi profile group v1 +// +// swagger:model flightcontrolapi.ProfileGroupV1 +type FlightcontrolapiProfileGroupV1 struct { + + // Per-CID role and object assignments + // Read Only: true + Assignments map[string]FlightcontrolapiGroupAssignment `json:"assignments,omitempty"` + + // Creation timestamp + // Required: true + // Read Only: true + // Format: date-time + CreatedAt strfmt.DateTime `json:"created_at"` + + // Actor who created the group + // Required: true + // Read Only: true + CreatedBy string `json:"created_by"` + + // Optional description + // Required: true + Description *string `json:"description"` + + // Unique identifier + // Required: true + // Read Only: true + ID string `json:"id"` + + // Users in group + // Required: true + // Read Only: true + MemberCount int32 `json:"member_count"` + + // Display name of the profile group + // Required: true + Name *string `json:"name"` + + // Last modification timestamp + // Required: true + // Read Only: true + // Format: date-time + UpdatedAt strfmt.DateTime `json:"updated_at"` + + // Actor who last modified the group + // Required: true + // Read Only: true + UpdatedBy string `json:"updated_by"` +} + +// Validate validates this flightcontrolapi profile group v1 +func (m *FlightcontrolapiProfileGroupV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssignments(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreatedBy(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemberCount(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdatedBy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) validateAssignments(formats strfmt.Registry) error { + if swag.IsZero(m.Assignments) { // not required + return nil + } + + for k := range m.Assignments { + + if err := validate.Required("assignments"+"."+k, "body", m.Assignments[k]); err != nil { + return err + } + if val, ok := m.Assignments[k]; ok { + if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("assignments" + "." + k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("assignments" + "." + k) + } + return err + } + } + + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) validateCreatedAt(formats strfmt.Registry) error { + + if err := validate.Required("created_at", "body", strfmt.DateTime(m.CreatedAt)); err != nil { + return err + } + + if err := validate.FormatOf("created_at", "body", "date-time", m.CreatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) validateCreatedBy(formats strfmt.Registry) error { + + if err := validate.RequiredString("created_by", "body", m.CreatedBy); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) validateDescription(formats strfmt.Registry) error { + + if err := validate.Required("description", "body", m.Description); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) validateID(formats strfmt.Registry) error { + + if err := validate.RequiredString("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) validateMemberCount(formats strfmt.Registry) error { + + if err := validate.Required("member_count", "body", int32(m.MemberCount)); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) validateUpdatedAt(formats strfmt.Registry) error { + + if err := validate.Required("updated_at", "body", strfmt.DateTime(m.UpdatedAt)); err != nil { + return err + } + + if err := validate.FormatOf("updated_at", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) validateUpdatedBy(formats strfmt.Registry) error { + + if err := validate.RequiredString("updated_by", "body", m.UpdatedBy); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this flightcontrolapi profile group v1 based on the context it is used +func (m *FlightcontrolapiProfileGroupV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAssignments(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreatedAt(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreatedBy(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMemberCount(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateUpdatedAt(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateUpdatedBy(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) contextValidateAssignments(ctx context.Context, formats strfmt.Registry) error { + + for k := range m.Assignments { + + if val, ok := m.Assignments[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created_at", "body", strfmt.DateTime(m.CreatedAt)); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) contextValidateCreatedBy(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created_by", "body", string(m.CreatedBy)); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", string(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) contextValidateMemberCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "member_count", "body", int32(m.MemberCount)); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "updated_at", "body", strfmt.DateTime(m.UpdatedAt)); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiProfileGroupV1) contextValidateUpdatedBy(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "updated_by", "body", string(m.UpdatedBy)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FlightcontrolapiProfileGroupV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FlightcontrolapiProfileGroupV1) UnmarshalBinary(b []byte) error { + var res FlightcontrolapiProfileGroupV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/flightcontrolapi_update_group_request_v1.go b/falcon/models/flightcontrolapi_update_group_request_v1.go new file mode 100644 index 000000000..11770c39b --- /dev/null +++ b/falcon/models/flightcontrolapi_update_group_request_v1.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// FlightcontrolapiUpdateGroupRequestV1 flightcontrolapi update group request v1 +// +// swagger:model flightcontrolapi.UpdateGroupRequestV1 +type FlightcontrolapiUpdateGroupRequestV1 struct { + + // New description for the group + Description string `json:"description,omitempty"` + + // New name for the group + Name string `json:"name,omitempty"` +} + +// Validate validates this flightcontrolapi update group request v1 +func (m *FlightcontrolapiUpdateGroupRequestV1) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this flightcontrolapi update group request v1 based on context it is used +func (m *FlightcontrolapiUpdateGroupRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FlightcontrolapiUpdateGroupRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FlightcontrolapiUpdateGroupRequestV1) UnmarshalBinary(b []byte) error { + var res FlightcontrolapiUpdateGroupRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/flightcontrolapi_user_groups_request_v1.go b/falcon/models/flightcontrolapi_user_groups_request_v1.go new file mode 100644 index 000000000..4698eb486 --- /dev/null +++ b/falcon/models/flightcontrolapi_user_groups_request_v1.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FlightcontrolapiUserGroupsRequestV1 flightcontrolapi user groups request v1 +// +// swagger:model flightcontrolapi.UserGroupsRequestV1 +type FlightcontrolapiUserGroupsRequestV1 struct { + + // User UUIDs to get groups for + // Required: true + Ids []string `json:"ids"` +} + +// Validate validates this flightcontrolapi user groups request v1 +func (m *FlightcontrolapiUserGroupsRequestV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIds(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiUserGroupsRequestV1) validateIds(formats strfmt.Registry) error { + + if err := validate.Required("ids", "body", m.Ids); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this flightcontrolapi user groups request v1 based on context it is used +func (m *FlightcontrolapiUserGroupsRequestV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FlightcontrolapiUserGroupsRequestV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FlightcontrolapiUserGroupsRequestV1) UnmarshalBinary(b []byte) error { + var res FlightcontrolapiUserGroupsRequestV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/flightcontrolapi_user_groups_response_v1.go b/falcon/models/flightcontrolapi_user_groups_response_v1.go new file mode 100644 index 000000000..969b056e5 --- /dev/null +++ b/falcon/models/flightcontrolapi_user_groups_response_v1.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FlightcontrolapiUserGroupsResponseV1 flightcontrolapi user groups response v1 +// +// swagger:model flightcontrolapi.UserGroupsResponseV1 +type FlightcontrolapiUserGroupsResponseV1 struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // List of users with their groups + // Required: true + Resources []*FlightcontrolapiUserGroupsV1 `json:"resources"` +} + +// Validate validates this flightcontrolapi user groups response v1 +func (m *FlightcontrolapiUserGroupsResponseV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiUserGroupsResponseV1) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FlightcontrolapiUserGroupsResponseV1) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *FlightcontrolapiUserGroupsResponseV1) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this flightcontrolapi user groups response v1 based on the context it is used +func (m *FlightcontrolapiUserGroupsResponseV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiUserGroupsResponseV1) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FlightcontrolapiUserGroupsResponseV1) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *FlightcontrolapiUserGroupsResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FlightcontrolapiUserGroupsResponseV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FlightcontrolapiUserGroupsResponseV1) UnmarshalBinary(b []byte) error { + var res FlightcontrolapiUserGroupsResponseV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/flightcontrolapi_user_groups_v1.go b/falcon/models/flightcontrolapi_user_groups_v1.go new file mode 100644 index 000000000..e670be276 --- /dev/null +++ b/falcon/models/flightcontrolapi_user_groups_v1.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FlightcontrolapiUserGroupsV1 flightcontrolapi user groups v1 +// +// swagger:model flightcontrolapi.UserGroupsV1 +type FlightcontrolapiUserGroupsV1 struct { + + // Profile Group IDs the user belongs to + // Required: true + GroupIds []string `json:"group_ids"` + + // User UUID + // Required: true + UserUUID *string `json:"user_uuid"` +} + +// Validate validates this flightcontrolapi user groups v1 +func (m *FlightcontrolapiUserGroupsV1) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGroupIds(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUserUUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FlightcontrolapiUserGroupsV1) validateGroupIds(formats strfmt.Registry) error { + + if err := validate.Required("group_ids", "body", m.GroupIds); err != nil { + return err + } + + return nil +} + +func (m *FlightcontrolapiUserGroupsV1) validateUserUUID(formats strfmt.Registry) error { + + if err := validate.Required("user_uuid", "body", m.UserUUID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this flightcontrolapi user groups v1 based on context it is used +func (m *FlightcontrolapiUserGroupsV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FlightcontrolapiUserGroupsV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FlightcontrolapiUserGroupsV1) UnmarshalBinary(b []byte) error { + var res FlightcontrolapiUserGroupsV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/gcp_agentless_scanning_infra.go b/falcon/models/gcp_agentless_scanning_infra.go new file mode 100644 index 000000000..9acf314e0 --- /dev/null +++ b/falcon/models/gcp_agentless_scanning_infra.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// GcpAgentlessScanningInfra gcp agentless scanning infra +// +// swagger:model gcp.AgentlessScanningInfra +type GcpAgentlessScanningInfra struct { + + // client credentials secret name + // Required: true + ClientCredentialsSecretName *string `json:"client_credentials_secret_name"` + + // network + // Required: true + Network *GcpNetworkConfig `json:"network"` + + // scanner sa email + // Required: true + ScannerSaEmail *string `json:"scanner_sa_email"` +} + +// Validate validates this gcp agentless scanning infra +func (m *GcpAgentlessScanningInfra) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClientCredentialsSecretName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetwork(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScannerSaEmail(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GcpAgentlessScanningInfra) validateClientCredentialsSecretName(formats strfmt.Registry) error { + + if err := validate.Required("client_credentials_secret_name", "body", m.ClientCredentialsSecretName); err != nil { + return err + } + + return nil +} + +func (m *GcpAgentlessScanningInfra) validateNetwork(formats strfmt.Registry) error { + + if err := validate.Required("network", "body", m.Network); err != nil { + return err + } + + if m.Network != nil { + if err := m.Network.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("network") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("network") + } + return err + } + } + + return nil +} + +func (m *GcpAgentlessScanningInfra) validateScannerSaEmail(formats strfmt.Registry) error { + + if err := validate.Required("scanner_sa_email", "body", m.ScannerSaEmail); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this gcp agentless scanning infra based on the context it is used +func (m *GcpAgentlessScanningInfra) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateNetwork(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GcpAgentlessScanningInfra) contextValidateNetwork(ctx context.Context, formats strfmt.Registry) error { + + if m.Network != nil { + + if err := m.Network.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("network") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("network") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GcpAgentlessScanningInfra) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GcpAgentlessScanningInfra) UnmarshalBinary(b []byte) error { + var res GcpAgentlessScanningInfra + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/gcp_agentless_scanning_settings.go b/falcon/models/gcp_agentless_scanning_settings.go new file mode 100644 index 000000000..5bd78cd2f --- /dev/null +++ b/falcon/models/gcp_agentless_scanning_settings.go @@ -0,0 +1,166 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// GcpAgentlessScanningSettings gcp agentless scanning settings +// +// swagger:model gcp.AgentlessScanningSettings +type GcpAgentlessScanningSettings struct { + + // deployment version + DeploymentVersion string `json:"deployment_version,omitempty"` + + // infra + Infra map[string]GcpAgentlessScanningInfra `json:"infra,omitempty"` + + // user inputs + // Required: true + UserInputs *GcpAgentlessScanningUserInputs `json:"user_inputs"` + + // wif principal + WifPrincipal string `json:"wif_principal,omitempty"` +} + +// Validate validates this gcp agentless scanning settings +func (m *GcpAgentlessScanningSettings) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInfra(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUserInputs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GcpAgentlessScanningSettings) validateInfra(formats strfmt.Registry) error { + if swag.IsZero(m.Infra) { // not required + return nil + } + + for k := range m.Infra { + + if err := validate.Required("infra"+"."+k, "body", m.Infra[k]); err != nil { + return err + } + if val, ok := m.Infra[k]; ok { + if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("infra" + "." + k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("infra" + "." + k) + } + return err + } + } + + } + + return nil +} + +func (m *GcpAgentlessScanningSettings) validateUserInputs(formats strfmt.Registry) error { + + if err := validate.Required("user_inputs", "body", m.UserInputs); err != nil { + return err + } + + if m.UserInputs != nil { + if err := m.UserInputs.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("user_inputs") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("user_inputs") + } + return err + } + } + + return nil +} + +// ContextValidate validate this gcp agentless scanning settings based on the context it is used +func (m *GcpAgentlessScanningSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateInfra(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateUserInputs(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GcpAgentlessScanningSettings) contextValidateInfra(ctx context.Context, formats strfmt.Registry) error { + + for k := range m.Infra { + + if val, ok := m.Infra[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *GcpAgentlessScanningSettings) contextValidateUserInputs(ctx context.Context, formats strfmt.Registry) error { + + if m.UserInputs != nil { + + if err := m.UserInputs.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("user_inputs") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("user_inputs") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GcpAgentlessScanningSettings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GcpAgentlessScanningSettings) UnmarshalBinary(b []byte) error { + var res GcpAgentlessScanningSettings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/gcp_agentless_scanning_user_inputs.go b/falcon/models/gcp_agentless_scanning_user_inputs.go new file mode 100644 index 000000000..f94a5b49a --- /dev/null +++ b/falcon/models/gcp_agentless_scanning_user_inputs.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// GcpAgentlessScanningUserInputs gcp agentless scanning user inputs +// +// swagger:model gcp.AgentlessScanningUserInputs +type GcpAgentlessScanningUserInputs struct { + + // custom network + CustomNetwork *GcpNetworkConfig `json:"custom_network,omitempty"` + + // host project id + HostProjectID string `json:"host_project_id,omitempty"` + + // network configuration type + // Required: true + NetworkConfigurationType *string `json:"network_configuration_type"` + + // org id + OrgID string `json:"org_id,omitempty"` + + // regions + // Required: true + Regions []string `json:"regions"` +} + +// Validate validates this gcp agentless scanning user inputs +func (m *GcpAgentlessScanningUserInputs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCustomNetwork(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworkConfigurationType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GcpAgentlessScanningUserInputs) validateCustomNetwork(formats strfmt.Registry) error { + if swag.IsZero(m.CustomNetwork) { // not required + return nil + } + + if m.CustomNetwork != nil { + if err := m.CustomNetwork.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("custom_network") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("custom_network") + } + return err + } + } + + return nil +} + +func (m *GcpAgentlessScanningUserInputs) validateNetworkConfigurationType(formats strfmt.Registry) error { + + if err := validate.Required("network_configuration_type", "body", m.NetworkConfigurationType); err != nil { + return err + } + + return nil +} + +func (m *GcpAgentlessScanningUserInputs) validateRegions(formats strfmt.Registry) error { + + if err := validate.Required("regions", "body", m.Regions); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this gcp agentless scanning user inputs based on the context it is used +func (m *GcpAgentlessScanningUserInputs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCustomNetwork(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GcpAgentlessScanningUserInputs) contextValidateCustomNetwork(ctx context.Context, formats strfmt.Registry) error { + + if m.CustomNetwork != nil { + + if swag.IsZero(m.CustomNetwork) { // not required + return nil + } + + if err := m.CustomNetwork.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("custom_network") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("custom_network") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GcpAgentlessScanningUserInputs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GcpAgentlessScanningUserInputs) UnmarshalBinary(b []byte) error { + var res GcpAgentlessScanningUserInputs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/gcp_folder_details.go b/falcon/models/gcp_folder_details.go index d0c5e737e..13cdda73c 100644 --- a/falcon/models/gcp_folder_details.go +++ b/falcon/models/gcp_folder_details.go @@ -24,6 +24,12 @@ type GcpFolderDetails struct { // Format: date-time Created *strfmt.DateTime `json:"created"` + // dspm settings + DspmSettings *GcpAgentlessScanningSettings `json:"dspm_settings,omitempty"` + + // dspm status + DspmStatus string `json:"dspm_status,omitempty"` + // folder id // Required: true FolderID *string `json:"folder_id"` @@ -58,6 +64,9 @@ type GcpFolderDetails struct { // parent id ParentID string `json:"parent_id,omitempty"` + // registration description + RegistrationDescription string `json:"registration_description,omitempty"` + // registration id // Required: true RegistrationID *string `json:"registration_id"` @@ -80,6 +89,12 @@ type GcpFolderDetails struct { // Required: true // Format: date-time Updated *strfmt.DateTime `json:"updated"` + + // vulnerability scanning settings + VulnerabilityScanningSettings *GcpAgentlessScanningSettings `json:"vulnerability_scanning_settings,omitempty"` + + // vulnerability scanning status + VulnerabilityScanningStatus string `json:"vulnerability_scanning_status,omitempty"` } // Validate validates this gcp folder details @@ -90,6 +105,10 @@ func (m *GcpFolderDetails) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDspmSettings(formats); err != nil { + res = append(res, err) + } + if err := m.validateFolderID(formats); err != nil { res = append(res, err) } @@ -110,6 +129,10 @@ func (m *GcpFolderDetails) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVulnerabilityScanningSettings(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -129,6 +152,25 @@ func (m *GcpFolderDetails) validateCreated(formats strfmt.Registry) error { return nil } +func (m *GcpFolderDetails) validateDspmSettings(formats strfmt.Registry) error { + if swag.IsZero(m.DspmSettings) { // not required + return nil + } + + if m.DspmSettings != nil { + if err := m.DspmSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dspm_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dspm_settings") + } + return err + } + } + + return nil +} + func (m *GcpFolderDetails) validateFolderID(formats strfmt.Registry) error { if err := validate.Required("folder_id", "body", m.FolderID); err != nil { @@ -178,8 +220,82 @@ func (m *GcpFolderDetails) validateUpdated(formats strfmt.Registry) error { return nil } -// ContextValidate validates this gcp folder details based on context it is used +func (m *GcpFolderDetails) validateVulnerabilityScanningSettings(formats strfmt.Registry) error { + if swag.IsZero(m.VulnerabilityScanningSettings) { // not required + return nil + } + + if m.VulnerabilityScanningSettings != nil { + if err := m.VulnerabilityScanningSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_settings") + } + return err + } + } + + return nil +} + +// ContextValidate validate this gcp folder details based on the context it is used func (m *GcpFolderDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDspmSettings(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVulnerabilityScanningSettings(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GcpFolderDetails) contextValidateDspmSettings(ctx context.Context, formats strfmt.Registry) error { + + if m.DspmSettings != nil { + + if swag.IsZero(m.DspmSettings) { // not required + return nil + } + + if err := m.DspmSettings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dspm_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dspm_settings") + } + return err + } + } + + return nil +} + +func (m *GcpFolderDetails) contextValidateVulnerabilityScanningSettings(ctx context.Context, formats strfmt.Registry) error { + + if m.VulnerabilityScanningSettings != nil { + + if swag.IsZero(m.VulnerabilityScanningSettings) { // not required + return nil + } + + if err := m.VulnerabilityScanningSettings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_settings") + } + return err + } + } + return nil } diff --git a/falcon/models/gcp_network_config.go b/falcon/models/gcp_network_config.go new file mode 100644 index 000000000..fa2533ac9 --- /dev/null +++ b/falcon/models/gcp_network_config.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// GcpNetworkConfig gcp network config +// +// swagger:model gcp.NetworkConfig +type GcpNetworkConfig struct { + + // subnets + // Required: true + Subnets map[string]string `json:"subnets"` + + // vpc name + // Required: true + VpcName *string `json:"vpc_name"` +} + +// Validate validates this gcp network config +func (m *GcpNetworkConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSubnets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVpcName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GcpNetworkConfig) validateSubnets(formats strfmt.Registry) error { + + if err := validate.Required("subnets", "body", m.Subnets); err != nil { + return err + } + + return nil +} + +func (m *GcpNetworkConfig) validateVpcName(formats strfmt.Registry) error { + + if err := validate.Required("vpc_name", "body", m.VpcName); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this gcp network config based on context it is used +func (m *GcpNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *GcpNetworkConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GcpNetworkConfig) UnmarshalBinary(b []byte) error { + var res GcpNetworkConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/gcp_organization_details.go b/falcon/models/gcp_organization_details.go index 7b09a5549..673cae7d5 100644 --- a/falcon/models/gcp_organization_details.go +++ b/falcon/models/gcp_organization_details.go @@ -24,6 +24,12 @@ type GcpOrganizationDetails struct { // Format: date-time Created *strfmt.DateTime `json:"created"` + // dspm settings + DspmSettings *GcpAgentlessScanningSettings `json:"dspm_settings,omitempty"` + + // dspm status + DspmStatus string `json:"dspm_status,omitempty"` + // ioa failed permissions IoaFailedPermissions []string `json:"ioa_failed_permissions"` @@ -49,6 +55,9 @@ type GcpOrganizationDetails struct { // organization name OrganizationName string `json:"organization_name,omitempty"` + // registration description + RegistrationDescription string `json:"registration_description,omitempty"` + // registration id // Required: true RegistrationID *string `json:"registration_id"` @@ -68,6 +77,12 @@ type GcpOrganizationDetails struct { // Required: true // Format: date-time Updated *strfmt.DateTime `json:"updated"` + + // vulnerability scanning settings + VulnerabilityScanningSettings *GcpAgentlessScanningSettings `json:"vulnerability_scanning_settings,omitempty"` + + // vulnerability scanning status + VulnerabilityScanningStatus string `json:"vulnerability_scanning_status,omitempty"` } // Validate validates this gcp organization details @@ -78,6 +93,10 @@ func (m *GcpOrganizationDetails) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDspmSettings(formats); err != nil { + res = append(res, err) + } + if err := m.validateOrganizationID(formats); err != nil { res = append(res, err) } @@ -98,6 +117,10 @@ func (m *GcpOrganizationDetails) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVulnerabilityScanningSettings(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -117,6 +140,25 @@ func (m *GcpOrganizationDetails) validateCreated(formats strfmt.Registry) error return nil } +func (m *GcpOrganizationDetails) validateDspmSettings(formats strfmt.Registry) error { + if swag.IsZero(m.DspmSettings) { // not required + return nil + } + + if m.DspmSettings != nil { + if err := m.DspmSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dspm_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dspm_settings") + } + return err + } + } + + return nil +} + func (m *GcpOrganizationDetails) validateOrganizationID(formats strfmt.Registry) error { if err := validate.Required("organization_id", "body", m.OrganizationID); err != nil { @@ -166,8 +208,82 @@ func (m *GcpOrganizationDetails) validateUpdated(formats strfmt.Registry) error return nil } -// ContextValidate validates this gcp organization details based on context it is used +func (m *GcpOrganizationDetails) validateVulnerabilityScanningSettings(formats strfmt.Registry) error { + if swag.IsZero(m.VulnerabilityScanningSettings) { // not required + return nil + } + + if m.VulnerabilityScanningSettings != nil { + if err := m.VulnerabilityScanningSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_settings") + } + return err + } + } + + return nil +} + +// ContextValidate validate this gcp organization details based on the context it is used func (m *GcpOrganizationDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDspmSettings(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVulnerabilityScanningSettings(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GcpOrganizationDetails) contextValidateDspmSettings(ctx context.Context, formats strfmt.Registry) error { + + if m.DspmSettings != nil { + + if swag.IsZero(m.DspmSettings) { // not required + return nil + } + + if err := m.DspmSettings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dspm_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dspm_settings") + } + return err + } + } + + return nil +} + +func (m *GcpOrganizationDetails) contextValidateVulnerabilityScanningSettings(ctx context.Context, formats strfmt.Registry) error { + + if m.VulnerabilityScanningSettings != nil { + + if swag.IsZero(m.VulnerabilityScanningSettings) { // not required + return nil + } + + if err := m.VulnerabilityScanningSettings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_settings") + } + return err + } + } + return nil } diff --git a/falcon/models/gcp_project_details.go b/falcon/models/gcp_project_details.go index 6694b7b63..bf4937d4d 100644 --- a/falcon/models/gcp_project_details.go +++ b/falcon/models/gcp_project_details.go @@ -26,6 +26,12 @@ type GcpProjectDetails struct { // deployment method DeploymentMethod string `json:"deployment_method,omitempty"` + // dspm settings + DspmSettings *GcpAgentlessScanningSettings `json:"dspm_settings,omitempty"` + + // dspm status + DspmStatus string `json:"dspm_status,omitempty"` + // ioa failed permissions IoaFailedPermissions []string `json:"ioa_failed_permissions"` @@ -59,6 +65,9 @@ type GcpProjectDetails struct { // project number ProjectNumber string `json:"project_number,omitempty"` + // registration description + RegistrationDescription string `json:"registration_description,omitempty"` + // registration id RegistrationID string `json:"registration_id,omitempty"` @@ -77,6 +86,12 @@ type GcpProjectDetails struct { // updated // Format: date-time Updated strfmt.DateTime `json:"updated,omitempty"` + + // vulnerability scanning settings + VulnerabilityScanningSettings *GcpAgentlessScanningSettings `json:"vulnerability_scanning_settings,omitempty"` + + // vulnerability scanning status + VulnerabilityScanningStatus string `json:"vulnerability_scanning_status,omitempty"` } // Validate validates this gcp project details @@ -87,10 +102,18 @@ func (m *GcpProjectDetails) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDspmSettings(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdated(formats); err != nil { res = append(res, err) } + if err := m.validateVulnerabilityScanningSettings(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -109,6 +132,25 @@ func (m *GcpProjectDetails) validateCreated(formats strfmt.Registry) error { return nil } +func (m *GcpProjectDetails) validateDspmSettings(formats strfmt.Registry) error { + if swag.IsZero(m.DspmSettings) { // not required + return nil + } + + if m.DspmSettings != nil { + if err := m.DspmSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dspm_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dspm_settings") + } + return err + } + } + + return nil +} + func (m *GcpProjectDetails) validateUpdated(formats strfmt.Registry) error { if swag.IsZero(m.Updated) { // not required return nil @@ -121,8 +163,82 @@ func (m *GcpProjectDetails) validateUpdated(formats strfmt.Registry) error { return nil } -// ContextValidate validates this gcp project details based on context it is used +func (m *GcpProjectDetails) validateVulnerabilityScanningSettings(formats strfmt.Registry) error { + if swag.IsZero(m.VulnerabilityScanningSettings) { // not required + return nil + } + + if m.VulnerabilityScanningSettings != nil { + if err := m.VulnerabilityScanningSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_settings") + } + return err + } + } + + return nil +} + +// ContextValidate validate this gcp project details based on the context it is used func (m *GcpProjectDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDspmSettings(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVulnerabilityScanningSettings(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GcpProjectDetails) contextValidateDspmSettings(ctx context.Context, formats strfmt.Registry) error { + + if m.DspmSettings != nil { + + if swag.IsZero(m.DspmSettings) { // not required + return nil + } + + if err := m.DspmSettings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dspm_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dspm_settings") + } + return err + } + } + + return nil +} + +func (m *GcpProjectDetails) contextValidateVulnerabilityScanningSettings(ctx context.Context, formats strfmt.Registry) error { + + if m.VulnerabilityScanningSettings != nil { + + if swag.IsZero(m.VulnerabilityScanningSettings) { // not required + return nil + } + + if err := m.VulnerabilityScanningSettings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerability_scanning_settings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vulnerability_scanning_settings") + } + return err + } + } + return nil } diff --git a/falcon/models/itautomation_concurrency_config.go b/falcon/models/itautomation_concurrency_config.go index 40338ca0c..a94c2ffe9 100644 --- a/falcon/models/itautomation_concurrency_config.go +++ b/falcon/models/itautomation_concurrency_config.go @@ -25,12 +25,12 @@ type ItautomationConcurrencyConfig struct { ConcurrentHostFileTransferLimit int32 `json:"concurrent_host_file_transfer_limit,omitempty"` // Maximum number of hosts that can run operations simultaneously. Example:1000 - // Maximum: 100000 + // Maximum: 1e+06 // Minimum: 1 ConcurrentHostLimit int32 `json:"concurrent_host_limit,omitempty"` // Maximum number of tasks that can run in parallel. Example: 3 - // Maximum: 5 + // Maximum: 20 // Minimum: 1 ConcurrentTaskLimit int32 `json:"concurrent_task_limit,omitempty"` } @@ -82,7 +82,7 @@ func (m *ItautomationConcurrencyConfig) validateConcurrentHostLimit(formats strf return err } - if err := validate.MaximumInt("concurrent_host_limit", "body", int64(m.ConcurrentHostLimit), 100000, false); err != nil { + if err := validate.MaximumInt("concurrent_host_limit", "body", int64(m.ConcurrentHostLimit), 1e+06, false); err != nil { return err } @@ -98,7 +98,7 @@ func (m *ItautomationConcurrencyConfig) validateConcurrentTaskLimit(formats strf return err } - if err := validate.MaximumInt("concurrent_task_limit", "body", int64(m.ConcurrentTaskLimit), 5, false); err != nil { + if err := validate.MaximumInt("concurrent_task_limit", "body", int64(m.ConcurrentTaskLimit), 20, false); err != nil { return err } diff --git a/falcon/models/itautomation_rerun_task_execution_request.go b/falcon/models/itautomation_rerun_task_execution_request.go index 1adfab070..3a2136d9b 100644 --- a/falcon/models/itautomation_rerun_task_execution_request.go +++ b/falcon/models/itautomation_rerun_task_execution_request.go @@ -20,10 +20,13 @@ import ( // swagger:model itautomation.RerunTaskExecutionRequest type ItautomationRerunTaskExecutionRequest struct { - // Type of rerun. When set to hosts, re-run on same hosts again. When set to failed, re-run only on failed hosts. When set to offline, re-run only on offline hosts. When set to target, re-run on all the hosts resolved to set criteria. - // Required: true + // [Deprecated: use run_types] Type of rerun. When set to hosts, re-run on same hosts again. When set to failed, re-run only on failed hosts. When set to offline, re-run only on offline hosts. When set to target, re-run on all the hosts resolved to set criteria. // Enum: [hosts failed offline target] - RunType *string `json:"run_type"` + RunType string `json:"run_type,omitempty"` + + // Types of reruns to combine with OR logic. Cannot be used with run_type. Example: ['failed', 'offline'] + // Enum: [hosts failed offline target completed canceled expired] + RunTypes []string `json:"run_types"` // ID of the task execution to rerun. Example: f64b95555ef54ea682619ce880d267cc // Required: true @@ -38,6 +41,10 @@ func (m *ItautomationRerunTaskExecutionRequest) Validate(formats strfmt.Registry res = append(res, err) } + if err := m.validateRunTypes(formats); err != nil { + res = append(res, err) + } + if err := m.validateTaskExecutionID(formats); err != nil { res = append(res, err) } @@ -84,13 +91,45 @@ func (m *ItautomationRerunTaskExecutionRequest) validateRunTypeEnum(path, locati } func (m *ItautomationRerunTaskExecutionRequest) validateRunType(formats strfmt.Registry) error { + if swag.IsZero(m.RunType) { // not required + return nil + } - if err := validate.Required("run_type", "body", m.RunType); err != nil { + // value enum + if err := m.validateRunTypeEnum("run_type", "body", m.RunType); err != nil { return err } - // value enum - if err := m.validateRunTypeEnum("run_type", "body", *m.RunType); err != nil { + return nil +} + +var itautomationRerunTaskExecutionRequestTypeRunTypesPropEnum []interface{} + +func init() { + var res [][]string + if err := json.Unmarshal([]byte(`["hosts","failed","offline","target","completed","canceled","expired"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + itautomationRerunTaskExecutionRequestTypeRunTypesPropEnum = append(itautomationRerunTaskExecutionRequestTypeRunTypesPropEnum, v) + } +} + +// prop value enum +func (m *ItautomationRerunTaskExecutionRequest) validateRunTypesEnum(path, location string, value []string) error { + if err := validate.EnumCase(path, location, value, itautomationRerunTaskExecutionRequestTypeRunTypesPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *ItautomationRerunTaskExecutionRequest) validateRunTypes(formats strfmt.Registry) error { + if swag.IsZero(m.RunTypes) { // not required + return nil + } + + // for slice + if err := m.validateRunTypesEnum("run_types", "body", m.RunTypes); err != nil { return err } diff --git a/falcon/models/jsonschema_sub_schema.go b/falcon/models/jsonschema_sub_schema.go index 907835f10..b689af177 100644 --- a/falcon/models/jsonschema_sub_schema.go +++ b/falcon/models/jsonschema_sub_schema.go @@ -161,6 +161,9 @@ type JsonschemaSubSchema struct { // x cs do not hide XCsDoNotHide bool `json:"x-cs-do-not-hide,omitempty"` + // x cs error message + XCsErrorMessage map[string]string `json:"x-cs-errorMessage,omitempty"` + // x cs immutable XCsImmutable bool `json:"x-cs-immutable,omitempty"` @@ -209,6 +212,9 @@ type JsonschemaSubSchema struct { // x cs tags XCsTags []string `json:"x-cs-tags"` + // x cs ucl cid specific + XCsUclCidSpecific bool `json:"x-cs-ucl-cid-specific,omitempty"` + // x cs ui XCsUI *JsonschemaUIExtensions `json:"x-cs-ui,omitempty"` diff --git a/falcon/models/models_o_s_info_type.go b/falcon/models/models_o_s_info_type.go index 2d1ecd489..c9f5106b1 100644 --- a/falcon/models/models_o_s_info_type.go +++ b/falcon/models/models_o_s_info_type.go @@ -19,6 +19,15 @@ import ( // swagger:model models.OSInfoType type ModelsOSInfoType struct { + // display version + DisplayVersion string `json:"DisplayVersion,omitempty"` + + // edition ID + EditionID string `json:"EditionID,omitempty"` + + // install type + InstallType string `json:"InstallType,omitempty"` + // name // Required: true Name *string `json:"Name"` diff --git a/falcon/models/models_package_info_type.go b/falcon/models/models_package_info_type.go index 0d0b8d70e..4135fbee6 100644 --- a/falcon/models/models_package_info_type.go +++ b/falcon/models/models_package_info_type.go @@ -19,6 +19,9 @@ import ( // swagger:model models.PackageInfoType type ModelsPackageInfoType struct { + // install date + InstallDate string `json:"InstallDate,omitempty"` + // layer hash LayerHash string `json:"LayerHash,omitempty"` diff --git a/falcon/models/msa_aggregate_query_request.go b/falcon/models/msa_aggregate_query_request.go index e22d245d0..4778415d4 100644 --- a/falcon/models/msa_aggregate_query_request.go +++ b/falcon/models/msa_aggregate_query_request.go @@ -39,6 +39,10 @@ type MsaAggregateQueryRequest struct { // Required: true Filter *string `json:"filter"` + // filters spec + // Required: true + FiltersSpec *MsaAPIFiltersSpec `json:"filters_spec"` + // from // Required: true From *int32 `json:"from"` @@ -65,6 +69,10 @@ type MsaAggregateQueryRequest struct { // Required: true Name *string `json:"name"` + // percents + // Required: true + Percents []float64 `json:"percents"` + // q // Required: true Q *string `json:"q"` @@ -118,6 +126,10 @@ func (m *MsaAggregateQueryRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateFiltersSpec(formats); err != nil { + res = append(res, err) + } + if err := m.validateFrom(formats); err != nil { res = append(res, err) } @@ -138,6 +150,10 @@ func (m *MsaAggregateQueryRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validatePercents(formats); err != nil { + res = append(res, err) + } + if err := m.validateQ(formats); err != nil { res = append(res, err) } @@ -245,6 +261,26 @@ func (m *MsaAggregateQueryRequest) validateFilter(formats strfmt.Registry) error return nil } +func (m *MsaAggregateQueryRequest) validateFiltersSpec(formats strfmt.Registry) error { + + if err := validate.Required("filters_spec", "body", m.FiltersSpec); err != nil { + return err + } + + if m.FiltersSpec != nil { + if err := m.FiltersSpec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filters_spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("filters_spec") + } + return err + } + } + + return nil +} + func (m *MsaAggregateQueryRequest) validateFrom(formats strfmt.Registry) error { if err := validate.Required("from", "body", m.From); err != nil { @@ -290,6 +326,15 @@ func (m *MsaAggregateQueryRequest) validateName(formats strfmt.Registry) error { return nil } +func (m *MsaAggregateQueryRequest) validatePercents(formats strfmt.Registry) error { + + if err := validate.Required("percents", "body", m.Percents); err != nil { + return err + } + + return nil +} + func (m *MsaAggregateQueryRequest) validateQ(formats strfmt.Registry) error { if err := validate.Required("q", "body", m.Q); err != nil { @@ -401,6 +446,10 @@ func (m *MsaAggregateQueryRequest) ContextValidate(ctx context.Context, formats res = append(res, err) } + if err := m.contextValidateFiltersSpec(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateRanges(ctx, formats); err != nil { res = append(res, err) } @@ -461,6 +510,23 @@ func (m *MsaAggregateQueryRequest) contextValidateExtendedBounds(ctx context.Con return nil } +func (m *MsaAggregateQueryRequest) contextValidateFiltersSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.FiltersSpec != nil { + + if err := m.FiltersSpec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filters_spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("filters_spec") + } + return err + } + } + + return nil +} + func (m *MsaAggregateQueryRequest) contextValidateRanges(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Ranges); i++ { diff --git a/falcon/models/msa_aggregation_result.go b/falcon/models/msa_aggregation_result.go index cf480347f..2c435de2d 100644 --- a/falcon/models/msa_aggregation_result.go +++ b/falcon/models/msa_aggregation_result.go @@ -27,6 +27,9 @@ type MsaAggregationResult struct { // doc count error upper bound DocCountErrorUpperBound int64 `json:"doc_count_error_upper_bound,omitempty"` + // hits + Hits *MsaHits `json:"hits,omitempty"` + // name // Required: true Name *string `json:"name"` @@ -43,6 +46,10 @@ func (m *MsaAggregationResult) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateHits(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -80,6 +87,25 @@ func (m *MsaAggregationResult) validateBuckets(formats strfmt.Registry) error { return nil } +func (m *MsaAggregationResult) validateHits(formats strfmt.Registry) error { + if swag.IsZero(m.Hits) { // not required + return nil + } + + if m.Hits != nil { + if err := m.Hits.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hits") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("hits") + } + return err + } + } + + return nil +} + func (m *MsaAggregationResult) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -97,6 +123,10 @@ func (m *MsaAggregationResult) ContextValidate(ctx context.Context, formats strf res = append(res, err) } + if err := m.contextValidateHits(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -128,6 +158,27 @@ func (m *MsaAggregationResult) contextValidateBuckets(ctx context.Context, forma return nil } +func (m *MsaAggregationResult) contextValidateHits(ctx context.Context, formats strfmt.Registry) error { + + if m.Hits != nil { + + if swag.IsZero(m.Hits) { // not required + return nil + } + + if err := m.Hits.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hits") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("hits") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *MsaAggregationResult) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/falcon/models/msa_api_filters_spec.go b/falcon/models/msa_api_filters_spec.go new file mode 100644 index 000000000..f05e0da21 --- /dev/null +++ b/falcon/models/msa_api_filters_spec.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// MsaAPIFiltersSpec msa API filters spec +// +// swagger:model msa.APIFiltersSpec +type MsaAPIFiltersSpec struct { + + // filters + // Required: true + Filters map[string]string `json:"filters"` + + // other bucket + // Required: true + OtherBucket *bool `json:"other_bucket"` + + // other bucket key + // Required: true + OtherBucketKey *string `json:"other_bucket_key"` +} + +// Validate validates this msa API filters spec +func (m *MsaAPIFiltersSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOtherBucket(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOtherBucketKey(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *MsaAPIFiltersSpec) validateFilters(formats strfmt.Registry) error { + + if err := validate.Required("filters", "body", m.Filters); err != nil { + return err + } + + return nil +} + +func (m *MsaAPIFiltersSpec) validateOtherBucket(formats strfmt.Registry) error { + + if err := validate.Required("other_bucket", "body", m.OtherBucket); err != nil { + return err + } + + return nil +} + +func (m *MsaAPIFiltersSpec) validateOtherBucketKey(formats strfmt.Registry) error { + + if err := validate.Required("other_bucket_key", "body", m.OtherBucketKey); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this msa API filters spec based on context it is used +func (m *MsaAPIFiltersSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *MsaAPIFiltersSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *MsaAPIFiltersSpec) UnmarshalBinary(b []byte) error { + var res MsaAPIFiltersSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/msa_hit.go b/falcon/models/msa_hit.go new file mode 100644 index 000000000..3af874702 --- /dev/null +++ b/falcon/models/msa_hit.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// MsaHit msa hit +// +// swagger:model msa.Hit +type MsaHit struct { + + // ID + // Required: true + ID *string `json:"ID"` + + // score + // Required: true + Score *float64 `json:"Score"` + + // source + // Required: true + Source *string `json:"Source"` +} + +// Validate validates this msa hit +func (m *MsaHit) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScore(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSource(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *MsaHit) validateID(formats strfmt.Registry) error { + + if err := validate.Required("ID", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *MsaHit) validateScore(formats strfmt.Registry) error { + + if err := validate.Required("Score", "body", m.Score); err != nil { + return err + } + + return nil +} + +func (m *MsaHit) validateSource(formats strfmt.Registry) error { + + if err := validate.Required("Source", "body", m.Source); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this msa hit based on context it is used +func (m *MsaHit) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *MsaHit) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *MsaHit) UnmarshalBinary(b []byte) error { + var res MsaHit + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/msa_hits.go b/falcon/models/msa_hits.go new file mode 100644 index 000000000..8616ae16a --- /dev/null +++ b/falcon/models/msa_hits.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// MsaHits msa hits +// +// swagger:model msa.Hits +type MsaHits struct { + + // hits + // Required: true + Hits []*MsaHit `json:"Hits"` + + // max score + // Required: true + MaxScore *float64 `json:"MaxScore"` +} + +// Validate validates this msa hits +func (m *MsaHits) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHits(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMaxScore(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *MsaHits) validateHits(formats strfmt.Registry) error { + + if err := validate.Required("Hits", "body", m.Hits); err != nil { + return err + } + + for i := 0; i < len(m.Hits); i++ { + if swag.IsZero(m.Hits[i]) { // not required + continue + } + + if m.Hits[i] != nil { + if err := m.Hits[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Hits" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Hits" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *MsaHits) validateMaxScore(formats strfmt.Registry) error { + + if err := validate.Required("MaxScore", "body", m.MaxScore); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this msa hits based on the context it is used +func (m *MsaHits) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateHits(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *MsaHits) contextValidateHits(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Hits); i++ { + + if m.Hits[i] != nil { + + if swag.IsZero(m.Hits[i]) { // not required + return nil + } + + if err := m.Hits[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Hits" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Hits" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *MsaHits) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *MsaHits) UnmarshalBinary(b []byte) error { + var res MsaHits + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/msaspec_scope.go b/falcon/models/msaspec_scope.go new file mode 100644 index 000000000..f5146ca18 --- /dev/null +++ b/falcon/models/msaspec_scope.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// MsaspecScope msaspec scope +// +// swagger:model msaspec.Scope +type MsaspecScope struct { + + // action + // Required: true + Action *string `json:"action"` + + // group + // Required: true + Group *string `json:"group"` + + // id + // Required: true + ID *string `json:"id"` +} + +// Validate validates this msaspec scope +func (m *MsaspecScope) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGroup(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *MsaspecScope) validateAction(formats strfmt.Registry) error { + + if err := validate.Required("action", "body", m.Action); err != nil { + return err + } + + return nil +} + +func (m *MsaspecScope) validateGroup(formats strfmt.Registry) error { + + if err := validate.Required("group", "body", m.Group); err != nil { + return err + } + + return nil +} + +func (m *MsaspecScope) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this msaspec scope based on context it is used +func (m *MsaspecScope) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *MsaspecScope) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *MsaspecScope) UnmarshalBinary(b []byte) error { + var res MsaspecScope + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/mwtypes_m_w_info.go b/falcon/models/mwtypes_m_w_info.go new file mode 100644 index 000000000..cbf4490d2 --- /dev/null +++ b/falcon/models/mwtypes_m_w_info.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// MwtypesMWInfo mwtypes m w info +// +// swagger:model mwtypes.MWInfo +type MwtypesMWInfo struct { + + // deleted + // Required: true + Deleted *bool `json:"deleted"` + + // seq no + // Required: true + SeqNo *int32 `json:"seq_no"` + + // status + // Required: true + Status *int32 `json:"status"` + + // update time + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"update_time"` +} + +// Validate validates this mwtypes m w info +func (m *MwtypesMWInfo) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeleted(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSeqNo(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *MwtypesMWInfo) validateDeleted(formats strfmt.Registry) error { + + if err := validate.Required("deleted", "body", m.Deleted); err != nil { + return err + } + + return nil +} + +func (m *MwtypesMWInfo) validateSeqNo(formats strfmt.Registry) error { + + if err := validate.Required("seq_no", "body", m.SeqNo); err != nil { + return err + } + + return nil +} + +func (m *MwtypesMWInfo) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +func (m *MwtypesMWInfo) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("update_time", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("update_time", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this mwtypes m w info based on context it is used +func (m *MwtypesMWInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *MwtypesMWInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *MwtypesMWInfo) UnmarshalBinary(b []byte) error { + var res MwtypesMWInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/nswip_scan_flags.go b/falcon/models/nswip_scan_flags.go new file mode 100644 index 000000000..e0088a4cd --- /dev/null +++ b/falcon/models/nswip_scan_flags.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NswipScanFlags nswip scan flags +// +// swagger:model nswip.ScanFlags +type NswipScanFlags struct { + + // defeat rst ratelimit + DefeatRstRatelimit bool `json:"defeat_rst_ratelimit,omitempty"` + + // host timeout + HostTimeout int32 `json:"host_timeout,omitempty"` + + // ignore tcp resets + IgnoreTCPResets bool `json:"ignore_tcp_resets,omitempty"` + + // initial rtt timeout + InitialRttTimeout int32 `json:"initial_rtt_timeout,omitempty"` + + // max parallelism + MaxParallelism int32 `json:"max_parallelism,omitempty"` + + // max rate + MaxRate int32 `json:"max_rate,omitempty"` + + // max retries + MaxRetries int32 `json:"max_retries,omitempty"` + + // max rtt timeout + MaxRttTimeout int32 `json:"max_rtt_timeout,omitempty"` + + // min parallelism + MinParallelism int32 `json:"min_parallelism,omitempty"` + + // min rate + MinRate int32 `json:"min_rate,omitempty"` + + // min rtt timeout + MinRttTimeout int32 `json:"min_rtt_timeout,omitempty"` + + // scan delay + ScanDelay int32 `json:"scan_delay,omitempty"` + + // script timeout + ScriptTimeout int32 `json:"script_timeout,omitempty"` + + // version intensity + VersionIntensity int32 `json:"version_intensity,omitempty"` +} + +// Validate validates this nswip scan flags +func (m *NswipScanFlags) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this nswip scan flags based on context it is used +func (m *NswipScanFlags) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *NswipScanFlags) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NswipScanFlags) UnmarshalBinary(b []byte) error { + var res NswipScanFlags + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/operations_case_field_changes.go b/falcon/models/operations_case_field_changes.go index 8f3f7497c..02222208f 100644 --- a/falcon/models/operations_case_field_changes.go +++ b/falcon/models/operations_case_field_changes.go @@ -35,6 +35,12 @@ type OperationsCaseFieldChanges struct { // Required: true Description *string `json:"description"` + // description format + DescriptionFormat string `json:"description_format,omitempty"` + + // description tagged users + DescriptionTaggedUsers []string `json:"description_tagged_users"` + // name // Required: true Name *string `json:"name"` diff --git a/falcon/models/operations_create_case_request.go b/falcon/models/operations_create_case_request.go index d05247da1..008adbd45 100644 --- a/falcon/models/operations_create_case_request.go +++ b/falcon/models/operations_create_case_request.go @@ -31,6 +31,12 @@ type OperationsCreateCaseRequest struct { // Required: true Description *string `json:"description"` + // description format + DescriptionFormat string `json:"description_format,omitempty"` + + // description tagged users + DescriptionTaggedUsers []string `json:"description_tagged_users"` + // evidence // Required: true Evidence *OperationsCreateCaseRequestEvidence `json:"evidence"` diff --git a/falcon/models/policymanager_external_classification_properties.go b/falcon/models/policymanager_external_classification_properties.go index 5af1155c2..ce85f0071 100644 --- a/falcon/models/policymanager_external_classification_properties.go +++ b/falcon/models/policymanager_external_classification_properties.go @@ -28,12 +28,15 @@ type PolicymanagerExternalClassificationProperties struct { // Enum: [or and] ContentPatternsOperator string `json:"content_patterns_operator,omitempty"` - // evidence duplication enabled + // Warning: Disabling evidence duplication will also disable forensic screen capture in all the rules EvidenceDuplicationEnabled bool `json:"evidence_duplication_enabled,omitempty"` // file types FileTypes []string `json:"file_types"` + // File path pattern globs for mac + MacFilePathPatterns []string `json:"mac_file_path_patterns"` + // Protection mode accepts values: 'monitor', 'simulate', 'enforce' // Enum: [monitor simulate enforce] ProtectionMode string `json:"protection_mode,omitempty"` @@ -46,6 +49,9 @@ type PolicymanagerExternalClassificationProperties struct { // web sources WebSources []string `json:"web_sources"` + + // File path pattern globs for windows + WinFilePathPatterns []string `json:"win_file_path_patterns"` } // Validate validates this policymanager external classification properties diff --git a/falcon/models/policymanager_external_policy_patch.go b/falcon/models/policymanager_external_policy_patch.go index 5fc22467a..2d7722a0e 100644 --- a/falcon/models/policymanager_external_policy_patch.go +++ b/falcon/models/policymanager_external_policy_patch.go @@ -41,7 +41,7 @@ type PolicymanagerExternalPolicyPatch struct { PolicyProperties *PolicymanagerPolicyProperties `json:"policy_properties"` // precedence - Precedence *int32 `json:"precedence,omitempty"` + Precedence interface{} `json:"precedence,omitempty"` } // Validate validates this policymanager external policy patch diff --git a/falcon/models/policymanager_external_rule.go b/falcon/models/policymanager_external_rule.go index f3d9f5bed..89b38db4c 100644 --- a/falcon/models/policymanager_external_rule.go +++ b/falcon/models/policymanager_external_rule.go @@ -44,11 +44,15 @@ type PolicymanagerExternalRule struct { // Required: true EnableLocalApplicationGroups *bool `json:"enable_local_application_groups"` - // enable printer egress + // Warning(Windows): Filepath, file type and sensitivity label conditions are not supported // Required: true EnablePrinterEgress *bool `json:"enable_printer_egress"` - // enable usb devices + // Enable screen capture for this rule, the policy this classification is attached to should have screen capture enabled as a prerequisite + // Required: true + EnableScreenCaptureRule *bool `json:"enable_screen_capture_rule"` + + // Warning: File path conditions are partially supported; file name and extension matching only; full file paths are not supported // Required: true EnableUsbDevices *bool `json:"enable_usb_devices"` @@ -123,6 +127,10 @@ func (m *PolicymanagerExternalRule) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateEnableScreenCaptureRule(formats); err != nil { + res = append(res, err) + } + if err := m.validateEnableUsbDevices(formats); err != nil { res = append(res, err) } @@ -266,6 +274,15 @@ func (m *PolicymanagerExternalRule) validateEnablePrinterEgress(formats strfmt.R return nil } +func (m *PolicymanagerExternalRule) validateEnableScreenCaptureRule(formats strfmt.Registry) error { + + if err := validate.Required("enable_screen_capture_rule", "body", m.EnableScreenCaptureRule); err != nil { + return err + } + + return nil +} + func (m *PolicymanagerExternalRule) validateEnableUsbDevices(formats strfmt.Registry) error { if err := validate.Required("enable_usb_devices", "body", m.EnableUsbDevices); err != nil { diff --git a/falcon/models/policymanager_policy_properties.go b/falcon/models/policymanager_policy_properties.go index 328e92830..ec1e7ca4e 100644 --- a/falcon/models/policymanager_policy_properties.go +++ b/falcon/models/policymanager_policy_properties.go @@ -78,7 +78,7 @@ type PolicymanagerPolicyProperties struct { // Enum: [default custom] BlockNotifications string `json:"block_notifications,omitempty"` - // Browsers without active extension accepts values: 'allow', 'block_policy' + // Define behaviour of browsers without active extension, accepts values: 'allow', 'block_policy'. // Enum: [allow block_policy] BrowsersWithoutActiveExtension string `json:"browsers_without_active_extension,omitempty"` @@ -107,37 +107,37 @@ type PolicymanagerPolicyProperties struct { // enable context inspection EnableContextInspection *bool `json:"enable_context_inspection,omitempty"` - // Windows only. + // Windows only. When enabled, users will receive a notification when data from unsupported browsers is blocked EnableEndUserNotificationsUnsupportedBrowser *bool `json:"enable_end_user_notifications_unsupported_browser,omitempty"` - // Windows only. + // Windows only. Enable or disable network inspection EnableNetworkInspection *bool `json:"enable_network_inspection,omitempty"` - // Windows only. Length must be at least 0 and at max 150000, must be a valid png base64 image, which matches this regular expression '^data:image\/png(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+\/])+={0,2}' + // Windows only. Enable screen capture before and after egress event + EnableScreenCapture bool `json:"enable_screen_capture,omitempty"` + + // Length must be at least 0 and at max 150000, must be a valid png base64 image, which matches this regular expression '^data:image\/png(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+\/])+={0,2}' EujDialogBoxLogo string `json:"euj_dialog_box_logo,omitempty"` - // Windows only. Must be a positive integer + // Configurable between 60 and 420 sec. This property sets the timeout for the end user justification dialog box. If the user fails to provide a justification, the egress will be blocked. EujDialogTimeout int32 `json:"euj_dialog_timeout,omitempty"` - // Windows only. Must have at least 2 and at max 4 options. The first two options have to be 'Business purposes' and 'Personal use' in that order + // Must have at least 2 and at most 4 options. The first two options must be 'Business purposes' and 'Personal use' in that order EujDropdownOptions *PolicymanagerEUJDropdownOptions `json:"euj_dropdown_options,omitempty"` - // Windows only. Must have 2 options. The first option has to be 'The action you are trying to perform is blocked by your organization's data protection policy. Provide a justification to proceed' + // Must have 2 options. The first option must be 'The action you are trying to perform is blocked by your organization's data protection policy. Provide a justification to proceed' EujHeaderText *PolicymanagerEUJHeaderText `json:"euj_header_text,omitempty"` - // Windows only. + // If enabled, the user must provide additional details to justify the egress EujRequireAdditionalDetails *bool `json:"euj_require_additional_details,omitempty"` - // Windows only. Must be a non-negative integer - EujResponseCacheTimeout int32 `json:"euj_response_cache_timeout,omitempty"` - - // Windows only. + // Windows only. If enabled, Falcon Console users with Data Protection Forensics Manager role can request and download files for egress events. Data will be copied to the host's local storage when requested, or when matching a classification with storage enabled. EvidenceDownloadEnabled *bool `json:"evidence_download_enabled,omitempty"` - // Windows only. + // Windows only. If enabled, data is copied to a protected evidence folder on the host at the time a download is requested to prevent tampering. Copies of data will be stored on the originating host for up to 30 days. EvidenceDuplicationEnabledDefault *bool `json:"evidence_duplication_enabled_default,omitempty"` - // Windows only. + // Windows only. If enabled, when data encryption occurs, a copy of the original data is stored in a protected folder on the host. This ensures encrypted data is retrievable if it is part of an egress event within the following 30 days. EvidenceEncryptedEnabled *bool `json:"evidence_encrypted_enabled,omitempty"` // Windows only. Must be between 1 and 90 @@ -165,16 +165,20 @@ type PolicymanagerPolicyProperties struct { // Enum: [block allow] NetworkInspectionFilesExceedingSizeLimit string `json:"network_inspection_files_exceeding_size_limit,omitempty"` + // Windows only. Screen capture duration in seconds after egress event. Only accepts '3', '5', or '10' + // Enum: [3 5 10] + ScreenCaptureDurationPostEvent string `json:"screen_capture_duration_post_event,omitempty"` + + // Windows only. Screen capture duration in seconds before egress event. Only accepts '3', '5', or '10' + // Enum: [3 5 10] + ScreenCaptureDurationPreEvent string `json:"screen_capture_duration_pre_event,omitempty"` + // similarity detection SimilarityDetection *bool `json:"similarity_detection,omitempty"` // Similarity threshold percentage values from 10 to 100 // Enum: [10 20 30 40 50 60 70 80 90 100] SimilarityThreshold string `json:"similarity_threshold,omitempty"` - - // Windows only. Unsupported browsers action accepts values: 'allow', 'block_policy', 'block' - // Enum: [allow block_policy block] - UnsupportedBrowsersAction string `json:"unsupported_browsers_action,omitempty"` } // Validate validates this policymanager policy properties @@ -241,11 +245,15 @@ func (m *PolicymanagerPolicyProperties) Validate(formats strfmt.Registry) error res = append(res, err) } - if err := m.validateSimilarityThreshold(formats); err != nil { + if err := m.validateScreenCaptureDurationPostEvent(formats); err != nil { res = append(res, err) } - if err := m.validateUnsupportedBrowsersAction(formats); err != nil { + if err := m.validateScreenCaptureDurationPreEvent(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSimilarityThreshold(formats); err != nil { res = append(res, err) } @@ -815,111 +823,156 @@ func (m *PolicymanagerPolicyProperties) validateNetworkInspectionFilesExceedingS return nil } -var policymanagerPolicyPropertiesTypeSimilarityThresholdPropEnum []interface{} +var policymanagerPolicyPropertiesTypeScreenCaptureDurationPostEventPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["10","20","30","40","50","60","70","80","90","100"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["3","5","10"]`), &res); err != nil { panic(err) } for _, v := range res { - policymanagerPolicyPropertiesTypeSimilarityThresholdPropEnum = append(policymanagerPolicyPropertiesTypeSimilarityThresholdPropEnum, v) + policymanagerPolicyPropertiesTypeScreenCaptureDurationPostEventPropEnum = append(policymanagerPolicyPropertiesTypeScreenCaptureDurationPostEventPropEnum, v) } } const ( - // PolicymanagerPolicyPropertiesSimilarityThresholdNr10 captures enum value "10" - PolicymanagerPolicyPropertiesSimilarityThresholdNr10 string = "10" + // PolicymanagerPolicyPropertiesScreenCaptureDurationPostEventNr3 captures enum value "3" + PolicymanagerPolicyPropertiesScreenCaptureDurationPostEventNr3 string = "3" - // PolicymanagerPolicyPropertiesSimilarityThresholdNr20 captures enum value "20" - PolicymanagerPolicyPropertiesSimilarityThresholdNr20 string = "20" + // PolicymanagerPolicyPropertiesScreenCaptureDurationPostEventNr5 captures enum value "5" + PolicymanagerPolicyPropertiesScreenCaptureDurationPostEventNr5 string = "5" - // PolicymanagerPolicyPropertiesSimilarityThresholdNr30 captures enum value "30" - PolicymanagerPolicyPropertiesSimilarityThresholdNr30 string = "30" + // PolicymanagerPolicyPropertiesScreenCaptureDurationPostEventNr10 captures enum value "10" + PolicymanagerPolicyPropertiesScreenCaptureDurationPostEventNr10 string = "10" +) - // PolicymanagerPolicyPropertiesSimilarityThresholdNr40 captures enum value "40" - PolicymanagerPolicyPropertiesSimilarityThresholdNr40 string = "40" +// prop value enum +func (m *PolicymanagerPolicyProperties) validateScreenCaptureDurationPostEventEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, policymanagerPolicyPropertiesTypeScreenCaptureDurationPostEventPropEnum, true); err != nil { + return err + } + return nil +} - // PolicymanagerPolicyPropertiesSimilarityThresholdNr50 captures enum value "50" - PolicymanagerPolicyPropertiesSimilarityThresholdNr50 string = "50" +func (m *PolicymanagerPolicyProperties) validateScreenCaptureDurationPostEvent(formats strfmt.Registry) error { + if swag.IsZero(m.ScreenCaptureDurationPostEvent) { // not required + return nil + } - // PolicymanagerPolicyPropertiesSimilarityThresholdNr60 captures enum value "60" - PolicymanagerPolicyPropertiesSimilarityThresholdNr60 string = "60" + // value enum + if err := m.validateScreenCaptureDurationPostEventEnum("screen_capture_duration_post_event", "body", m.ScreenCaptureDurationPostEvent); err != nil { + return err + } - // PolicymanagerPolicyPropertiesSimilarityThresholdNr70 captures enum value "70" - PolicymanagerPolicyPropertiesSimilarityThresholdNr70 string = "70" + return nil +} - // PolicymanagerPolicyPropertiesSimilarityThresholdNr80 captures enum value "80" - PolicymanagerPolicyPropertiesSimilarityThresholdNr80 string = "80" +var policymanagerPolicyPropertiesTypeScreenCaptureDurationPreEventPropEnum []interface{} - // PolicymanagerPolicyPropertiesSimilarityThresholdNr90 captures enum value "90" - PolicymanagerPolicyPropertiesSimilarityThresholdNr90 string = "90" +func init() { + var res []string + if err := json.Unmarshal([]byte(`["3","5","10"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + policymanagerPolicyPropertiesTypeScreenCaptureDurationPreEventPropEnum = append(policymanagerPolicyPropertiesTypeScreenCaptureDurationPreEventPropEnum, v) + } +} - // PolicymanagerPolicyPropertiesSimilarityThresholdNr100 captures enum value "100" - PolicymanagerPolicyPropertiesSimilarityThresholdNr100 string = "100" +const ( + + // PolicymanagerPolicyPropertiesScreenCaptureDurationPreEventNr3 captures enum value "3" + PolicymanagerPolicyPropertiesScreenCaptureDurationPreEventNr3 string = "3" + + // PolicymanagerPolicyPropertiesScreenCaptureDurationPreEventNr5 captures enum value "5" + PolicymanagerPolicyPropertiesScreenCaptureDurationPreEventNr5 string = "5" + + // PolicymanagerPolicyPropertiesScreenCaptureDurationPreEventNr10 captures enum value "10" + PolicymanagerPolicyPropertiesScreenCaptureDurationPreEventNr10 string = "10" ) // prop value enum -func (m *PolicymanagerPolicyProperties) validateSimilarityThresholdEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, policymanagerPolicyPropertiesTypeSimilarityThresholdPropEnum, true); err != nil { +func (m *PolicymanagerPolicyProperties) validateScreenCaptureDurationPreEventEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, policymanagerPolicyPropertiesTypeScreenCaptureDurationPreEventPropEnum, true); err != nil { return err } return nil } -func (m *PolicymanagerPolicyProperties) validateSimilarityThreshold(formats strfmt.Registry) error { - if swag.IsZero(m.SimilarityThreshold) { // not required +func (m *PolicymanagerPolicyProperties) validateScreenCaptureDurationPreEvent(formats strfmt.Registry) error { + if swag.IsZero(m.ScreenCaptureDurationPreEvent) { // not required return nil } // value enum - if err := m.validateSimilarityThresholdEnum("similarity_threshold", "body", m.SimilarityThreshold); err != nil { + if err := m.validateScreenCaptureDurationPreEventEnum("screen_capture_duration_pre_event", "body", m.ScreenCaptureDurationPreEvent); err != nil { return err } return nil } -var policymanagerPolicyPropertiesTypeUnsupportedBrowsersActionPropEnum []interface{} +var policymanagerPolicyPropertiesTypeSimilarityThresholdPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["allow","block_policy","block"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["10","20","30","40","50","60","70","80","90","100"]`), &res); err != nil { panic(err) } for _, v := range res { - policymanagerPolicyPropertiesTypeUnsupportedBrowsersActionPropEnum = append(policymanagerPolicyPropertiesTypeUnsupportedBrowsersActionPropEnum, v) + policymanagerPolicyPropertiesTypeSimilarityThresholdPropEnum = append(policymanagerPolicyPropertiesTypeSimilarityThresholdPropEnum, v) } } const ( - // PolicymanagerPolicyPropertiesUnsupportedBrowsersActionAllow captures enum value "allow" - PolicymanagerPolicyPropertiesUnsupportedBrowsersActionAllow string = "allow" + // PolicymanagerPolicyPropertiesSimilarityThresholdNr10 captures enum value "10" + PolicymanagerPolicyPropertiesSimilarityThresholdNr10 string = "10" + + // PolicymanagerPolicyPropertiesSimilarityThresholdNr20 captures enum value "20" + PolicymanagerPolicyPropertiesSimilarityThresholdNr20 string = "20" + + // PolicymanagerPolicyPropertiesSimilarityThresholdNr30 captures enum value "30" + PolicymanagerPolicyPropertiesSimilarityThresholdNr30 string = "30" + + // PolicymanagerPolicyPropertiesSimilarityThresholdNr40 captures enum value "40" + PolicymanagerPolicyPropertiesSimilarityThresholdNr40 string = "40" + + // PolicymanagerPolicyPropertiesSimilarityThresholdNr50 captures enum value "50" + PolicymanagerPolicyPropertiesSimilarityThresholdNr50 string = "50" + + // PolicymanagerPolicyPropertiesSimilarityThresholdNr60 captures enum value "60" + PolicymanagerPolicyPropertiesSimilarityThresholdNr60 string = "60" + + // PolicymanagerPolicyPropertiesSimilarityThresholdNr70 captures enum value "70" + PolicymanagerPolicyPropertiesSimilarityThresholdNr70 string = "70" + + // PolicymanagerPolicyPropertiesSimilarityThresholdNr80 captures enum value "80" + PolicymanagerPolicyPropertiesSimilarityThresholdNr80 string = "80" - // PolicymanagerPolicyPropertiesUnsupportedBrowsersActionBlockPolicy captures enum value "block_policy" - PolicymanagerPolicyPropertiesUnsupportedBrowsersActionBlockPolicy string = "block_policy" + // PolicymanagerPolicyPropertiesSimilarityThresholdNr90 captures enum value "90" + PolicymanagerPolicyPropertiesSimilarityThresholdNr90 string = "90" - // PolicymanagerPolicyPropertiesUnsupportedBrowsersActionBlock captures enum value "block" - PolicymanagerPolicyPropertiesUnsupportedBrowsersActionBlock string = "block" + // PolicymanagerPolicyPropertiesSimilarityThresholdNr100 captures enum value "100" + PolicymanagerPolicyPropertiesSimilarityThresholdNr100 string = "100" ) // prop value enum -func (m *PolicymanagerPolicyProperties) validateUnsupportedBrowsersActionEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, policymanagerPolicyPropertiesTypeUnsupportedBrowsersActionPropEnum, true); err != nil { +func (m *PolicymanagerPolicyProperties) validateSimilarityThresholdEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, policymanagerPolicyPropertiesTypeSimilarityThresholdPropEnum, true); err != nil { return err } return nil } -func (m *PolicymanagerPolicyProperties) validateUnsupportedBrowsersAction(formats strfmt.Registry) error { - if swag.IsZero(m.UnsupportedBrowsersAction) { // not required +func (m *PolicymanagerPolicyProperties) validateSimilarityThreshold(formats strfmt.Registry) error { + if swag.IsZero(m.SimilarityThreshold) { // not required return nil } // value enum - if err := m.validateUnsupportedBrowsersActionEnum("unsupported_browsers_action", "body", m.UnsupportedBrowsersAction); err != nil { + if err := m.validateSimilarityThresholdEnum("similarity_threshold", "body", m.SimilarityThreshold); err != nil { return err } diff --git a/falcon/models/quickscanpro_artifact_node.go b/falcon/models/quickscanpro_artifact_node.go index ff9c1bca8..851557c45 100644 --- a/falcon/models/quickscanpro_artifact_node.go +++ b/falcon/models/quickscanpro_artifact_node.go @@ -22,6 +22,9 @@ type QuickscanproArtifactNode struct { // adversary Adversary string `json:"adversary,omitempty"` + // id + ID string `json:"id,omitempty"` + // malicious confidence // Required: true MaliciousConfidence *int32 `json:"malicious_confidence"` diff --git a/falcon/models/quickscanpro_artifacts_tree.go b/falcon/models/quickscanpro_artifacts_tree.go index efac1c6b0..bc9f39000 100644 --- a/falcon/models/quickscanpro_artifacts_tree.go +++ b/falcon/models/quickscanpro_artifacts_tree.go @@ -12,7 +12,6 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // QuickscanproArtifactsTree quickscanpro artifacts tree @@ -24,7 +23,7 @@ type QuickscanproArtifactsTree struct { Edges []*QuickscanproArtifactEdge `json:"edges"` // nodes - Nodes map[string]QuickscanproArtifactNode `json:"nodes,omitempty"` + Nodes []*QuickscanproArtifactNode `json:"nodes"` } // Validate validates this quickscanpro artifacts tree @@ -76,17 +75,17 @@ func (m *QuickscanproArtifactsTree) validateNodes(formats strfmt.Registry) error return nil } - for k := range m.Nodes { - - if err := validate.Required("nodes"+"."+k, "body", m.Nodes[k]); err != nil { - return err + for i := 0; i < len(m.Nodes); i++ { + if swag.IsZero(m.Nodes[i]) { // not required + continue } - if val, ok := m.Nodes[k]; ok { - if err := val.Validate(formats); err != nil { + + if m.Nodes[i] != nil { + if err := m.Nodes[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + k) + return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + k) + return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) } return err } @@ -142,10 +141,20 @@ func (m *QuickscanproArtifactsTree) contextValidateEdges(ctx context.Context, fo func (m *QuickscanproArtifactsTree) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - for k := range m.Nodes { + for i := 0; i < len(m.Nodes); i++ { + + if m.Nodes[i] != nil { + + if swag.IsZero(m.Nodes[i]) { // not required + return nil + } - if val, ok := m.Nodes[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { + if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) + } return err } } diff --git a/falcon/models/quickscanpro_malware_family.go b/falcon/models/quickscanpro_malware_family.go new file mode 100644 index 000000000..03f4e547e --- /dev/null +++ b/falcon/models/quickscanpro_malware_family.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// QuickscanproMalwareFamily quickscanpro malware family +// +// swagger:model quickscanpro.MalwareFamily +type QuickscanproMalwareFamily struct { + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this quickscanpro malware family +func (m *QuickscanproMalwareFamily) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this quickscanpro malware family based on context it is used +func (m *QuickscanproMalwareFamily) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *QuickscanproMalwareFamily) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *QuickscanproMalwareFamily) UnmarshalBinary(b []byte) error { + var res QuickscanproMalwareFamily + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/quickscanpro_scan_result.go b/falcon/models/quickscanpro_scan_result.go index 510c63d31..ad8103d08 100644 --- a/falcon/models/quickscanpro_scan_result.go +++ b/falcon/models/quickscanpro_scan_result.go @@ -56,6 +56,9 @@ type QuickscanproScanResult struct { // malware config MalwareConfig map[string][]string `json:"malware_config,omitempty"` + // malware families + MalwareFamilies []*QuickscanproMalwareFamily `json:"malware_families"` + // mime type MimeType string `json:"mime_type,omitempty"` @@ -77,8 +80,14 @@ type QuickscanproScanResult struct { // Required: true VerdictReason *string `json:"verdict_reason"` + // verdict reasons + VerdictReasons []string `json:"verdict_reasons"` + // verdict source VerdictSource []string `json:"verdict_source"` + + // yara rules + YaraRules []*QuickscanproYaraRule `json:"yara_rules"` } // Validate validates this quickscanpro scan result @@ -97,6 +106,10 @@ func (m *QuickscanproScanResult) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMalwareFamilies(formats); err != nil { + res = append(res, err) + } + if err := m.validateMitreAttacks(formats); err != nil { res = append(res, err) } @@ -113,6 +126,10 @@ func (m *QuickscanproScanResult) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateYaraRules(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -174,6 +191,32 @@ func (m *QuickscanproScanResult) validateMaliciousConfidence(formats strfmt.Regi return nil } +func (m *QuickscanproScanResult) validateMalwareFamilies(formats strfmt.Registry) error { + if swag.IsZero(m.MalwareFamilies) { // not required + return nil + } + + for i := 0; i < len(m.MalwareFamilies); i++ { + if swag.IsZero(m.MalwareFamilies[i]) { // not required + continue + } + + if m.MalwareFamilies[i] != nil { + if err := m.MalwareFamilies[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("malware_families" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("malware_families" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *QuickscanproScanResult) validateMitreAttacks(formats strfmt.Registry) error { if swag.IsZero(m.MitreAttacks) { // not required return nil @@ -287,6 +330,32 @@ func (m *QuickscanproScanResult) validateVerdictReason(formats strfmt.Registry) return nil } +func (m *QuickscanproScanResult) validateYaraRules(formats strfmt.Registry) error { + if swag.IsZero(m.YaraRules) { // not required + return nil + } + + for i := 0; i < len(m.YaraRules); i++ { + if swag.IsZero(m.YaraRules[i]) { // not required + continue + } + + if m.YaraRules[i] != nil { + if err := m.YaraRules[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("yara_rules" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("yara_rules" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + // ContextValidate validate this quickscanpro scan result based on the context it is used func (m *QuickscanproScanResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -299,6 +368,10 @@ func (m *QuickscanproScanResult) ContextValidate(ctx context.Context, formats st res = append(res, err) } + if err := m.contextValidateMalwareFamilies(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateMitreAttacks(ctx, formats); err != nil { res = append(res, err) } @@ -307,6 +380,10 @@ func (m *QuickscanproScanResult) ContextValidate(ctx context.Context, formats st res = append(res, err) } + if err := m.contextValidateYaraRules(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -359,6 +436,31 @@ func (m *QuickscanproScanResult) contextValidateFileArtifacts(ctx context.Contex return nil } +func (m *QuickscanproScanResult) contextValidateMalwareFamilies(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.MalwareFamilies); i++ { + + if m.MalwareFamilies[i] != nil { + + if swag.IsZero(m.MalwareFamilies[i]) { // not required + return nil + } + + if err := m.MalwareFamilies[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("malware_families" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("malware_families" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *QuickscanproScanResult) contextValidateMitreAttacks(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.MitreAttacks); i++ { @@ -409,6 +511,31 @@ func (m *QuickscanproScanResult) contextValidateURLArtifacts(ctx context.Context return nil } +func (m *QuickscanproScanResult) contextValidateYaraRules(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.YaraRules); i++ { + + if m.YaraRules[i] != nil { + + if swag.IsZero(m.YaraRules[i]) { // not required + return nil + } + + if err := m.YaraRules[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("yara_rules" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("yara_rules" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *QuickscanproScanResult) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/falcon/models/quickscanpro_yara_rule.go b/falcon/models/quickscanpro_yara_rule.go new file mode 100644 index 000000000..b3591fd21 --- /dev/null +++ b/falcon/models/quickscanpro_yara_rule.go @@ -0,0 +1,65 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// QuickscanproYaraRule quickscanpro yara rule +// +// swagger:model quickscanpro.YaraRule +type QuickscanproYaraRule struct { + + // created at + CreatedAt string `json:"created_at,omitempty"` + + // description + Description string `json:"description,omitempty"` + + // rule name + RuleName string `json:"rule_name,omitempty"` + + // sha256 + Sha256 string `json:"sha256,omitempty"` + + // tags + Tags []string `json:"tags"` + + // updated at + UpdatedAt string `json:"updated_at,omitempty"` +} + +// Validate validates this quickscanpro yara rule +func (m *QuickscanproYaraRule) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this quickscanpro yara rule based on context it is used +func (m *QuickscanproYaraRule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *QuickscanproYaraRule) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *QuickscanproYaraRule) UnmarshalBinary(b []byte) error { + var res QuickscanproYaraRule + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/registration_account_counts_by_status_aggregate_response.go b/falcon/models/registration_account_counts_by_status_aggregate_response.go new file mode 100644 index 000000000..b795afe16 --- /dev/null +++ b/falcon/models/registration_account_counts_by_status_aggregate_response.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RegistrationAccountCountsByStatusAggregateResponse registration account counts by status aggregate response +// +// swagger:model registration.AccountCountsByStatusAggregateResponse +type RegistrationAccountCountsByStatusAggregateResponse struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + // Required: true + Resources []*RegistrationAccountsByStatusAggregate `json:"resources"` +} + +// Validate validates this registration account counts by status aggregate response +func (m *RegistrationAccountCountsByStatusAggregateResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RegistrationAccountCountsByStatusAggregateResponse) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RegistrationAccountCountsByStatusAggregateResponse) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *RegistrationAccountCountsByStatusAggregateResponse) validateResources(formats strfmt.Registry) error { + + if err := validate.Required("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this registration account counts by status aggregate response based on the context it is used +func (m *RegistrationAccountCountsByStatusAggregateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RegistrationAccountCountsByStatusAggregateResponse) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RegistrationAccountCountsByStatusAggregateResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *RegistrationAccountCountsByStatusAggregateResponse) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RegistrationAccountCountsByStatusAggregateResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RegistrationAccountCountsByStatusAggregateResponse) UnmarshalBinary(b []byte) error { + var res RegistrationAccountCountsByStatusAggregateResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/registration_accounts_by_status_aggregate.go b/falcon/models/registration_accounts_by_status_aggregate.go new file mode 100644 index 000000000..2178ac716 --- /dev/null +++ b/falcon/models/registration_accounts_by_status_aggregate.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RegistrationAccountsByStatusAggregate registration accounts by status aggregate +// +// swagger:model registration.AccountsByStatusAggregate +type RegistrationAccountsByStatusAggregate struct { + + // buckets + // Required: true + Buckets []*RegistrationAccountsByStatusBuckets `json:"buckets"` + + // name + // Required: true + Name *string `json:"name"` +} + +// Validate validates this registration accounts by status aggregate +func (m *RegistrationAccountsByStatusAggregate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBuckets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RegistrationAccountsByStatusAggregate) validateBuckets(formats strfmt.Registry) error { + + if err := validate.Required("buckets", "body", m.Buckets); err != nil { + return err + } + + for i := 0; i < len(m.Buckets); i++ { + if swag.IsZero(m.Buckets[i]) { // not required + continue + } + + if m.Buckets[i] != nil { + if err := m.Buckets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("buckets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("buckets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RegistrationAccountsByStatusAggregate) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this registration accounts by status aggregate based on the context it is used +func (m *RegistrationAccountsByStatusAggregate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateBuckets(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RegistrationAccountsByStatusAggregate) contextValidateBuckets(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Buckets); i++ { + + if m.Buckets[i] != nil { + + if swag.IsZero(m.Buckets[i]) { // not required + return nil + } + + if err := m.Buckets[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("buckets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("buckets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RegistrationAccountsByStatusAggregate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RegistrationAccountsByStatusAggregate) UnmarshalBinary(b []byte) error { + var res RegistrationAccountsByStatusAggregate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/registration_accounts_by_status_bucket.go b/falcon/models/registration_accounts_by_status_bucket.go new file mode 100644 index 000000000..04ec1fdda --- /dev/null +++ b/falcon/models/registration_accounts_by_status_bucket.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RegistrationAccountsByStatusBucket registration accounts by status bucket +// +// swagger:model registration.AccountsByStatusBucket +type RegistrationAccountsByStatusBucket struct { + + // count + // Required: true + Count *int32 `json:"count"` + + // label + // Required: true + Label *string `json:"label"` +} + +// Validate validates this registration accounts by status bucket +func (m *RegistrationAccountsByStatusBucket) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RegistrationAccountsByStatusBucket) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("count", "body", m.Count); err != nil { + return err + } + + return nil +} + +func (m *RegistrationAccountsByStatusBucket) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("label", "body", m.Label); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this registration accounts by status bucket based on context it is used +func (m *RegistrationAccountsByStatusBucket) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *RegistrationAccountsByStatusBucket) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RegistrationAccountsByStatusBucket) UnmarshalBinary(b []byte) error { + var res RegistrationAccountsByStatusBucket + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/registration_accounts_by_status_buckets.go b/falcon/models/registration_accounts_by_status_buckets.go new file mode 100644 index 000000000..4a2fa933d --- /dev/null +++ b/falcon/models/registration_accounts_by_status_buckets.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RegistrationAccountsByStatusBuckets registration accounts by status buckets +// +// swagger:model registration.AccountsByStatusBuckets +type RegistrationAccountsByStatusBuckets struct { + + // count + // Required: true + Count *int32 `json:"count"` + + // label + // Required: true + Label *string `json:"label"` + + // sub aggregates + // Required: true + SubAggregates []*RegistrationAccountsByStatusSubAggregate `json:"sub_aggregates"` +} + +// Validate validates this registration accounts by status buckets +func (m *RegistrationAccountsByStatusBuckets) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSubAggregates(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RegistrationAccountsByStatusBuckets) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("count", "body", m.Count); err != nil { + return err + } + + return nil +} + +func (m *RegistrationAccountsByStatusBuckets) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("label", "body", m.Label); err != nil { + return err + } + + return nil +} + +func (m *RegistrationAccountsByStatusBuckets) validateSubAggregates(formats strfmt.Registry) error { + + if err := validate.Required("sub_aggregates", "body", m.SubAggregates); err != nil { + return err + } + + for i := 0; i < len(m.SubAggregates); i++ { + if swag.IsZero(m.SubAggregates[i]) { // not required + continue + } + + if m.SubAggregates[i] != nil { + if err := m.SubAggregates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sub_aggregates" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sub_aggregates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this registration accounts by status buckets based on the context it is used +func (m *RegistrationAccountsByStatusBuckets) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSubAggregates(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RegistrationAccountsByStatusBuckets) contextValidateSubAggregates(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.SubAggregates); i++ { + + if m.SubAggregates[i] != nil { + + if swag.IsZero(m.SubAggregates[i]) { // not required + return nil + } + + if err := m.SubAggregates[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sub_aggregates" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sub_aggregates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RegistrationAccountsByStatusBuckets) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RegistrationAccountsByStatusBuckets) UnmarshalBinary(b []byte) error { + var res RegistrationAccountsByStatusBuckets + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/registration_accounts_by_status_sub_aggregate.go b/falcon/models/registration_accounts_by_status_sub_aggregate.go new file mode 100644 index 000000000..acf29e888 --- /dev/null +++ b/falcon/models/registration_accounts_by_status_sub_aggregate.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RegistrationAccountsByStatusSubAggregate registration accounts by status sub aggregate +// +// swagger:model registration.AccountsByStatusSubAggregate +type RegistrationAccountsByStatusSubAggregate struct { + + // buckets + // Required: true + Buckets []*RegistrationAccountsByStatusBucket `json:"buckets"` + + // name + // Required: true + Name *string `json:"name"` +} + +// Validate validates this registration accounts by status sub aggregate +func (m *RegistrationAccountsByStatusSubAggregate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBuckets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RegistrationAccountsByStatusSubAggregate) validateBuckets(formats strfmt.Registry) error { + + if err := validate.Required("buckets", "body", m.Buckets); err != nil { + return err + } + + for i := 0; i < len(m.Buckets); i++ { + if swag.IsZero(m.Buckets[i]) { // not required + continue + } + + if m.Buckets[i] != nil { + if err := m.Buckets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("buckets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("buckets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RegistrationAccountsByStatusSubAggregate) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this registration accounts by status sub aggregate based on the context it is used +func (m *RegistrationAccountsByStatusSubAggregate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateBuckets(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RegistrationAccountsByStatusSubAggregate) contextValidateBuckets(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Buckets); i++ { + + if m.Buckets[i] != nil { + + if swag.IsZero(m.Buckets[i]) { // not required + return nil + } + + if err := m.Buckets[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("buckets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("buckets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RegistrationAccountsByStatusSubAggregate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RegistrationAccountsByStatusSubAggregate) UnmarshalBinary(b []byte) error { + var res RegistrationAccountsByStatusSubAggregate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/registration_azure_tenant_default_subscription_id_response_v1.go b/falcon/models/registration_azure_tenant_default_subscription_id_response_v1.go index 7649fc859..c3e2033ff 100644 --- a/falcon/models/registration_azure_tenant_default_subscription_id_response_v1.go +++ b/falcon/models/registration_azure_tenant_default_subscription_id_response_v1.go @@ -30,7 +30,7 @@ type RegistrationAzureTenantDefaultSubscriptionIDResponseV1 struct { // resources // Required: true - Resources *Resources `json:"resources"` + Resources Resources `json:"resources"` } // Validate validates this registration azure tenant default subscription ID response v1 @@ -104,19 +104,8 @@ func (m *RegistrationAzureTenantDefaultSubscriptionIDResponseV1) validateMeta(fo func (m *RegistrationAzureTenantDefaultSubscriptionIDResponseV1) validateResources(formats strfmt.Registry) error { - if err := validate.Required("resources", "body", m.Resources); err != nil { - return err - } - - if m.Resources != nil { - if err := m.Resources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources") - } - return err - } + if m.Resources == nil { + return errors.Required("resources", "body", nil) } return nil @@ -134,10 +123,6 @@ func (m *RegistrationAzureTenantDefaultSubscriptionIDResponseV1) ContextValidate res = append(res, err) } - if err := m.contextValidateResources(ctx, formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -186,23 +171,6 @@ func (m *RegistrationAzureTenantDefaultSubscriptionIDResponseV1) contextValidate return nil } -func (m *RegistrationAzureTenantDefaultSubscriptionIDResponseV1) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { - - if m.Resources != nil { - - if err := m.Resources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources") - } - return err - } - } - - return nil -} - // MarshalBinary interface implementation func (m *RegistrationAzureTenantDefaultSubscriptionIDResponseV1) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/falcon/models/releases_release_response_v1.go b/falcon/models/releases_release_response_v1.go index 36f85b8a0..bed9abcfb 100644 --- a/falcon/models/releases_release_response_v1.go +++ b/falcon/models/releases_release_response_v1.go @@ -58,6 +58,9 @@ type ReleasesReleaseResponseV1 struct { // release notes ticket ReleaseNotesTicket string `json:"release_notes_ticket,omitempty"` + // replication role + ReplicationRole string `json:"replication_role,omitempty"` + // status // Required: true Status *string `json:"status"` diff --git a/falcon/models/resources.go b/falcon/models/resources.go index bfd11545a..75867d8ab 100644 --- a/falcon/models/resources.go +++ b/falcon/models/resources.go @@ -5,101 +5,7 @@ package models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - // Resources resources // // swagger:model .resources -type Resources struct { - - // default subscription id - // Required: true - DefaultSubscriptionID *string `json:"default_subscription_id"` - - // subscription ids - // Required: true - SubscriptionIds []string `json:"subscription_ids"` - - // tenant id - // Required: true - TenantID *string `json:"tenant_id"` -} - -// Validate validates this resources -func (m *Resources) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDefaultSubscriptionID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSubscriptionIds(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTenantID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Resources) validateDefaultSubscriptionID(formats strfmt.Registry) error { - - if err := validate.Required("default_subscription_id", "body", m.DefaultSubscriptionID); err != nil { - return err - } - - return nil -} - -func (m *Resources) validateSubscriptionIds(formats strfmt.Registry) error { - - if err := validate.Required("subscription_ids", "body", m.SubscriptionIds); err != nil { - return err - } - - return nil -} - -func (m *Resources) validateTenantID(formats strfmt.Registry) error { - - if err := validate.Required("tenant_id", "body", m.TenantID); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this resources based on context it is used -func (m *Resources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Resources) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Resources) UnmarshalBinary(b []byte) error { - var res Resources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} +type Resources interface{} diff --git a/falcon/models/rest_a_w_s_account_patch_ext_v1.go b/falcon/models/rest_a_w_s_account_patch_ext_v1.go index 7032f2007..a6b783881 100644 --- a/falcon/models/rest_a_w_s_account_patch_ext_v1.go +++ b/falcon/models/rest_a_w_s_account_patch_ext_v1.go @@ -24,6 +24,9 @@ type RestAWSAccountPatchExtV1 struct { // Required: true AccountID *string `json:"account_id"` + // cloudformation stack arn + CloudformationStackArn string `json:"cloudformation_stack_arn,omitempty"` + // cloudtrail region CloudtrailRegion string `json:"cloudtrail_region,omitempty"` @@ -94,6 +97,9 @@ type RestAWSAccountPatchExtV1 struct { // s3 log ingestion sns topic arn S3LogIngestionSnsTopicArn string `json:"s3_log_ingestion_sns_topic_arn,omitempty"` + // target ous + TargetOus []string `json:"target_ous"` + // use existing cloudtrail UseExistingCloudtrail *bool `json:"use_existing_cloudtrail,omitempty"` diff --git a/falcon/models/rest_get_enriched_timeline_response.go b/falcon/models/rest_get_enriched_timeline_response.go new file mode 100644 index 000000000..aa3dbc851 --- /dev/null +++ b/falcon/models/rest_get_enriched_timeline_response.go @@ -0,0 +1,233 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RestGetEnrichedTimelineResponse rest get enriched timeline response +// +// swagger:model rest.GetEnrichedTimelineResponse +type RestGetEnrichedTimelineResponse struct { + + // errors + Errors []*MsaAPIError `json:"errors"` + + // meta + // Required: true + Meta *MsaMetaInfo `json:"meta"` + + // resources + Resources []*DomainEnrichedTimelineResource `json:"resources"` +} + +// Validate validates this rest get enriched timeline response +func (m *RestGetEnrichedTimelineResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RestGetEnrichedTimelineResponse) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RestGetEnrichedTimelineResponse) validateMeta(formats strfmt.Registry) error { + + if err := validate.Required("meta", "body", m.Meta); err != nil { + return err + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *RestGetEnrichedTimelineResponse) validateResources(formats strfmt.Registry) error { + if swag.IsZero(m.Resources) { // not required + return nil + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this rest get enriched timeline response based on the context it is used +func (m *RestGetEnrichedTimelineResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateErrors(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RestGetEnrichedTimelineResponse) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RestGetEnrichedTimelineResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *RestGetEnrichedTimelineResponse) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Resources); i++ { + + if m.Resources[i] != nil { + + if swag.IsZero(m.Resources[i]) { // not required + return nil + } + + if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RestGetEnrichedTimelineResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RestGetEnrichedTimelineResponse) UnmarshalBinary(b []byte) error { + var res RestGetEnrichedTimelineResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/risk_suppression.go b/falcon/models/risk_suppression.go index 519f3396b..2671a55fb 100644 --- a/falcon/models/risk_suppression.go +++ b/falcon/models/risk_suppression.go @@ -50,6 +50,9 @@ type RiskSuppression struct { // suppression date // Format: date-time SuppressionDate strfmt.DateTime `json:"suppression_date,omitempty"` + + // suppression rule id + SuppressionRuleID string `json:"suppression_rule_id,omitempty"` } // Validate validates this risk suppression diff --git a/falcon/models/risks_graph.go b/falcon/models/risks_graph.go new file mode 100644 index 000000000..9300b11ef --- /dev/null +++ b/falcon/models/risks_graph.go @@ -0,0 +1,189 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RisksGraph risks graph +// +// swagger:model risks.Graph +type RisksGraph struct { + + // edges + Edges []*RisksEdge `json:"edges"` + + // error msg + ErrorMsg string `json:"error_msg,omitempty"` + + // is fallback + IsFallback bool `json:"is_fallback,omitempty"` + + // vertices + Vertices []*RisksVertex `json:"vertices"` +} + +// Validate validates this risks graph +func (m *RisksGraph) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEdges(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVertices(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RisksGraph) validateEdges(formats strfmt.Registry) error { + if swag.IsZero(m.Edges) { // not required + return nil + } + + for i := 0; i < len(m.Edges); i++ { + if swag.IsZero(m.Edges[i]) { // not required + continue + } + + if m.Edges[i] != nil { + if err := m.Edges[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("edges" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("edges" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RisksGraph) validateVertices(formats strfmt.Registry) error { + if swag.IsZero(m.Vertices) { // not required + return nil + } + + for i := 0; i < len(m.Vertices); i++ { + if swag.IsZero(m.Vertices[i]) { // not required + continue + } + + if m.Vertices[i] != nil { + if err := m.Vertices[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vertices" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vertices" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this risks graph based on the context it is used +func (m *RisksGraph) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateEdges(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVertices(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RisksGraph) contextValidateEdges(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Edges); i++ { + + if m.Edges[i] != nil { + + if swag.IsZero(m.Edges[i]) { // not required + return nil + } + + if err := m.Edges[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("edges" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("edges" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RisksGraph) contextValidateVertices(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Vertices); i++ { + + if m.Vertices[i] != nil { + + if swag.IsZero(m.Vertices[i]) { // not required + return nil + } + + if err := m.Vertices[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vertices" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vertices" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RisksGraph) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RisksGraph) UnmarshalBinary(b []byte) error { + var res RisksGraph + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/risks_union_cloud_risk.go b/falcon/models/risks_union_cloud_risk.go index 98a337c56..1abc40b30 100644 --- a/falcon/models/risks_union_cloud_risk.go +++ b/falcon/models/risks_union_cloud_risk.go @@ -32,6 +32,9 @@ type RisksUnionCloudRisk struct { // Required: true Adversaries []string `json:"adversaries"` + // agv2 id + Agv2ID string `json:"agv2_id,omitempty"` + // asset gcrn // Required: true AssetGcrn *string `json:"asset_gcrn"` @@ -81,6 +84,9 @@ type RisksUnionCloudRisk struct { // Format: date-time FirstSeen *strfmt.DateTime `json:"first_seen"` + // graph + Graph *RisksGraph `json:"graph,omitempty"` + // id // Required: true ID *string `json:"id"` @@ -198,6 +204,10 @@ func (m *RisksUnionCloudRisk) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateGraph(formats); err != nil { + res = append(res, err) + } + if err := m.validateID(formats); err != nil { res = append(res, err) } @@ -420,6 +430,25 @@ func (m *RisksUnionCloudRisk) validateFirstSeen(formats strfmt.Registry) error { return nil } +func (m *RisksUnionCloudRisk) validateGraph(formats strfmt.Registry) error { + if swag.IsZero(m.Graph) { // not required + return nil + } + + if m.Graph != nil { + if err := m.Graph.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("graph") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("graph") + } + return err + } + } + + return nil +} + func (m *RisksUnionCloudRisk) validateID(formats strfmt.Registry) error { if err := validate.Required("id", "body", m.ID); err != nil { @@ -582,6 +611,10 @@ func (m *RisksUnionCloudRisk) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateGraph(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateSuppression(ctx, formats); err != nil { res = append(res, err) } @@ -646,6 +679,27 @@ func (m *RisksUnionCloudRisk) contextValidateEdges(ctx context.Context, formats return nil } +func (m *RisksUnionCloudRisk) contextValidateGraph(ctx context.Context, formats strfmt.Registry) error { + + if m.Graph != nil { + + if swag.IsZero(m.Graph) { // not required + return nil + } + + if err := m.Graph.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("graph") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("graph") + } + return err + } + } + + return nil +} + func (m *RisksUnionCloudRisk) contextValidateSuppression(ctx context.Context, formats strfmt.Registry) error { if m.Suppression != nil { diff --git a/falcon/models/risks_vertex.go b/falcon/models/risks_vertex.go index 2619364d1..4bf380821 100644 --- a/falcon/models/risks_vertex.go +++ b/falcon/models/risks_vertex.go @@ -19,10 +19,6 @@ import ( // swagger:model risks.Vertex type RisksVertex struct { - // category - // Required: true - Category *string `json:"category"` - // properties // Required: true Properties interface{} `json:"properties"` @@ -40,10 +36,6 @@ type RisksVertex struct { func (m *RisksVertex) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateCategory(formats); err != nil { - res = append(res, err) - } - if err := m.validateProperties(formats); err != nil { res = append(res, err) } @@ -62,15 +54,6 @@ func (m *RisksVertex) Validate(formats strfmt.Registry) error { return nil } -func (m *RisksVertex) validateCategory(formats strfmt.Registry) error { - - if err := validate.Required("category", "body", m.Category); err != nil { - return err - } - - return nil -} - func (m *RisksVertex) validateProperties(formats strfmt.Registry) error { if m.Properties == nil { diff --git a/falcon/models/sdk_case_vm.go b/falcon/models/sdk_case_vm.go index c542f94fa..2c0e65451 100644 --- a/falcon/models/sdk_case_vm.go +++ b/falcon/models/sdk_case_vm.go @@ -52,6 +52,12 @@ type SdkCaseVM struct { // Required: true Description *string `json:"description"` + // description format + DescriptionFormat string `json:"description_format,omitempty"` + + // description tagged users + DescriptionTaggedUsers []string `json:"description_tagged_users"` + // end timestamp // Required: true // Format: date-time diff --git a/falcon/models/sdk_evidence_vm.go b/falcon/models/sdk_evidence_vm.go index afcbbddb1..a0e39db7d 100644 --- a/falcon/models/sdk_evidence_vm.go +++ b/falcon/models/sdk_evidence_vm.go @@ -34,6 +34,10 @@ type SdkEvidenceVM struct { // leads // Required: true Leads *SdkLeadEvidenceVM `json:"leads"` + + // users + // Required: true + Users *SdkUserEvidenceVM `json:"users"` } // Validate validates this sdk evidence VM @@ -56,6 +60,10 @@ func (m *SdkEvidenceVM) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateUsers(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -142,6 +150,26 @@ func (m *SdkEvidenceVM) validateLeads(formats strfmt.Registry) error { return nil } +func (m *SdkEvidenceVM) validateUsers(formats strfmt.Registry) error { + + if err := validate.Required("users", "body", m.Users); err != nil { + return err + } + + if m.Users != nil { + if err := m.Users.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("users") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("users") + } + return err + } + } + + return nil +} + // ContextValidate validate this sdk evidence VM based on the context it is used func (m *SdkEvidenceVM) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -162,6 +190,10 @@ func (m *SdkEvidenceVM) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } + if err := m.contextValidateUsers(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -236,6 +268,23 @@ func (m *SdkEvidenceVM) contextValidateLeads(ctx context.Context, formats strfmt return nil } +func (m *SdkEvidenceVM) contextValidateUsers(ctx context.Context, formats strfmt.Registry) error { + + if m.Users != nil { + + if err := m.Users.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("users") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("users") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *SdkEvidenceVM) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/falcon/models/sdk_user_evidence_record_vm.go b/falcon/models/sdk_user_evidence_record_vm.go new file mode 100644 index 000000000..cdc880054 --- /dev/null +++ b/falcon/models/sdk_user_evidence_record_vm.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SdkUserEvidenceRecordVM sdk user evidence record VM +// +// swagger:model sdk.UserEvidenceRecordVM +type SdkUserEvidenceRecordVM struct { + + // case id + // Required: true + CaseID *string `json:"case_id"` + + // id + // Required: true + ID *string `json:"id"` + + // selector + // Required: true + Selector *SdkUserEvidenceSelector `json:"selector"` +} + +// Validate validates this sdk user evidence record VM +func (m *SdkUserEvidenceRecordVM) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCaseID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSelector(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SdkUserEvidenceRecordVM) validateCaseID(formats strfmt.Registry) error { + + if err := validate.Required("case_id", "body", m.CaseID); err != nil { + return err + } + + return nil +} + +func (m *SdkUserEvidenceRecordVM) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *SdkUserEvidenceRecordVM) validateSelector(formats strfmt.Registry) error { + + if err := validate.Required("selector", "body", m.Selector); err != nil { + return err + } + + if m.Selector != nil { + if err := m.Selector.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("selector") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("selector") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sdk user evidence record VM based on the context it is used +func (m *SdkUserEvidenceRecordVM) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSelector(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SdkUserEvidenceRecordVM) contextValidateSelector(ctx context.Context, formats strfmt.Registry) error { + + if m.Selector != nil { + + if err := m.Selector.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("selector") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("selector") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SdkUserEvidenceRecordVM) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SdkUserEvidenceRecordVM) UnmarshalBinary(b []byte) error { + var res SdkUserEvidenceRecordVM + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/sdk_user_evidence_selector.go b/falcon/models/sdk_user_evidence_selector.go new file mode 100644 index 000000000..f0b5a4e90 --- /dev/null +++ b/falcon/models/sdk_user_evidence_selector.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SdkUserEvidenceSelector sdk user evidence selector +// +// swagger:model sdk.UserEvidenceSelector +type SdkUserEvidenceSelector struct { + + // id + // Required: true + ID *string `json:"id"` +} + +// Validate validates this sdk user evidence selector +func (m *SdkUserEvidenceSelector) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SdkUserEvidenceSelector) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this sdk user evidence selector based on context it is used +func (m *SdkUserEvidenceSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SdkUserEvidenceSelector) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SdkUserEvidenceSelector) UnmarshalBinary(b []byte) error { + var res SdkUserEvidenceSelector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/sdk_user_evidence_vm.go b/falcon/models/sdk_user_evidence_vm.go new file mode 100644 index 000000000..cf78d535f --- /dev/null +++ b/falcon/models/sdk_user_evidence_vm.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SdkUserEvidenceVM sdk user evidence VM +// +// swagger:model sdk.UserEvidenceVM +type SdkUserEvidenceVM struct { + + // records + // Required: true + Records []*SdkUserEvidenceRecordVM `json:"records"` +} + +// Validate validates this sdk user evidence VM +func (m *SdkUserEvidenceVM) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRecords(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SdkUserEvidenceVM) validateRecords(formats strfmt.Registry) error { + + if err := validate.Required("records", "body", m.Records); err != nil { + return err + } + + for i := 0; i < len(m.Records); i++ { + if swag.IsZero(m.Records[i]) { // not required + continue + } + + if m.Records[i] != nil { + if err := m.Records[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("records" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("records" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this sdk user evidence VM based on the context it is used +func (m *SdkUserEvidenceVM) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRecords(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SdkUserEvidenceVM) contextValidateRecords(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Records); i++ { + + if m.Records[i] != nil { + + if swag.IsZero(m.Records[i]) { // not required + return nil + } + + if err := m.Records[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("records" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("records" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SdkUserEvidenceVM) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SdkUserEvidenceVM) UnmarshalBinary(b []byte) error { + var res SdkUserEvidenceVM + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/suppressionrules_rule_selection_filter.go b/falcon/models/suppressionrules_rule_selection_filter.go index 46628b9fc..0d80e830c 100644 --- a/falcon/models/suppressionrules_rule_selection_filter.go +++ b/falcon/models/suppressionrules_rule_selection_filter.go @@ -29,6 +29,12 @@ type SuppressionrulesRuleSelectionFilter struct { // rule providers RuleProviders []string `json:"rule_providers"` + // rule resource type names + RuleResourceTypeNames []string `json:"rule_resource_type_names"` + + // rule risk factors + RuleRiskFactors []string `json:"rule_risk_factors"` + // rule services RuleServices []string `json:"rule_services"` diff --git a/falcon/models/v2_budget.go b/falcon/models/v2_budget.go new file mode 100644 index 000000000..320bc338d --- /dev/null +++ b/falcon/models/v2_budget.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V2Budget v2 budget +// +// swagger:model v2.Budget +type V2Budget struct { + + // active time limit + ActiveTimeLimit int32 `json:"active_time_limit,omitempty"` + + // credit limit + CreditLimit int32 `json:"credit_limit,omitempty"` + + // total time limit + TotalTimeLimit int32 `json:"total_time_limit,omitempty"` +} + +// Validate validates this v2 budget +func (m *V2Budget) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v2 budget based on context it is used +func (m *V2Budget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V2Budget) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V2Budget) UnmarshalBinary(b []byte) error { + var res V2Budget + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/v2_definition.go b/falcon/models/v2_definition.go index 606b7cff2..106008ab3 100644 --- a/falcon/models/v2_definition.go +++ b/falcon/models/v2_definition.go @@ -22,6 +22,9 @@ type V2Definition struct { // actions Actions map[string]V2Activity `json:"actions,omitempty"` + // budget + Budget *V2Budget `json:"budget,omitempty"` + // conditions Conditions map[string]V2Condition `json:"conditions,omitempty"` @@ -90,6 +93,10 @@ func (m *V2Definition) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateBudget(formats); err != nil { + res = append(res, err) + } + if err := m.validateConditions(formats); err != nil { res = append(res, err) } @@ -154,6 +161,25 @@ func (m *V2Definition) validateActions(formats strfmt.Registry) error { return nil } +func (m *V2Definition) validateBudget(formats strfmt.Registry) error { + if swag.IsZero(m.Budget) { // not required + return nil + } + + if m.Budget != nil { + if err := m.Budget.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("budget") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("budget") + } + return err + } + } + + return nil +} + func (m *V2Definition) validateConditions(formats strfmt.Registry) error { if swag.IsZero(m.Conditions) { // not required return nil @@ -300,6 +326,10 @@ func (m *V2Definition) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := m.contextValidateBudget(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateConditions(ctx, formats); err != nil { res = append(res, err) } @@ -341,6 +371,27 @@ func (m *V2Definition) contextValidateActions(ctx context.Context, formats strfm return nil } +func (m *V2Definition) contextValidateBudget(ctx context.Context, formats strfmt.Registry) error { + + if m.Budget != nil { + + if swag.IsZero(m.Budget) { // not required + return nil + } + + if err := m.Budget.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("budget") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("budget") + } + return err + } + } + + return nil +} + func (m *V2Definition) contextValidateConditions(ctx context.Context, formats strfmt.Registry) error { for k := range m.Conditions { diff --git a/falcon/models/vulnerabilitymetadataapi_risk_factor_category.go b/falcon/models/vulnerabilitymetadataapi_risk_factor_category.go new file mode 100644 index 000000000..87e8fc415 --- /dev/null +++ b/falcon/models/vulnerabilitymetadataapi_risk_factor_category.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// VulnerabilitymetadataapiRiskFactorCategory vulnerabilitymetadataapi risk factor category +// +// swagger:model vulnerabilitymetadataapi.RiskFactorCategory +type VulnerabilitymetadataapiRiskFactorCategory struct { + + // category + // Required: true + Category *string `json:"category"` + + // description + // Required: true + Description *string `json:"description"` + + // id + // Required: true + ID *string `json:"id"` + + // name + // Required: true + Name *string `json:"name"` +} + +// Validate validates this vulnerabilitymetadataapi risk factor category +func (m *VulnerabilitymetadataapiRiskFactorCategory) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCategory(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *VulnerabilitymetadataapiRiskFactorCategory) validateCategory(formats strfmt.Registry) error { + + if err := validate.Required("category", "body", m.Category); err != nil { + return err + } + + return nil +} + +func (m *VulnerabilitymetadataapiRiskFactorCategory) validateDescription(formats strfmt.Registry) error { + + if err := validate.Required("description", "body", m.Description); err != nil { + return err + } + + return nil +} + +func (m *VulnerabilitymetadataapiRiskFactorCategory) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *VulnerabilitymetadataapiRiskFactorCategory) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this vulnerabilitymetadataapi risk factor category based on context it is used +func (m *VulnerabilitymetadataapiRiskFactorCategory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *VulnerabilitymetadataapiRiskFactorCategory) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *VulnerabilitymetadataapiRiskFactorCategory) UnmarshalBinary(b []byte) error { + var res VulnerabilitymetadataapiRiskFactorCategory + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/falcon/models/vulnerabilitymetadataapi_risk_metadata.go b/falcon/models/vulnerabilitymetadataapi_risk_metadata.go index e0c6a09d7..073862244 100644 --- a/falcon/models/vulnerabilitymetadataapi_risk_metadata.go +++ b/falcon/models/vulnerabilitymetadataapi_risk_metadata.go @@ -7,6 +7,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -18,6 +19,9 @@ import ( // swagger:model vulnerabilitymetadataapi.RiskMetadata type VulnerabilitymetadataapiRiskMetadata struct { + // risk factor categories + RiskFactorCategories []*VulnerabilitymetadataapiRiskFactorCategory `json:"risk_factor_categories"` + // rule Rule *VulnerabilitymetadataapiRule `json:"rule,omitempty"` @@ -32,6 +36,10 @@ type VulnerabilitymetadataapiRiskMetadata struct { func (m *VulnerabilitymetadataapiRiskMetadata) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateRiskFactorCategories(formats); err != nil { + res = append(res, err) + } + if err := m.validateRule(formats); err != nil { res = append(res, err) } @@ -42,6 +50,32 @@ func (m *VulnerabilitymetadataapiRiskMetadata) Validate(formats strfmt.Registry) return nil } +func (m *VulnerabilitymetadataapiRiskMetadata) validateRiskFactorCategories(formats strfmt.Registry) error { + if swag.IsZero(m.RiskFactorCategories) { // not required + return nil + } + + for i := 0; i < len(m.RiskFactorCategories); i++ { + if swag.IsZero(m.RiskFactorCategories[i]) { // not required + continue + } + + if m.RiskFactorCategories[i] != nil { + if err := m.RiskFactorCategories[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("risk_factor_categories" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("risk_factor_categories" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *VulnerabilitymetadataapiRiskMetadata) validateRule(formats strfmt.Registry) error { if swag.IsZero(m.Rule) { // not required return nil @@ -65,6 +99,10 @@ func (m *VulnerabilitymetadataapiRiskMetadata) validateRule(formats strfmt.Regis func (m *VulnerabilitymetadataapiRiskMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateRiskFactorCategories(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateRule(ctx, formats); err != nil { res = append(res, err) } @@ -75,6 +113,31 @@ func (m *VulnerabilitymetadataapiRiskMetadata) ContextValidate(ctx context.Conte return nil } +func (m *VulnerabilitymetadataapiRiskMetadata) contextValidateRiskFactorCategories(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RiskFactorCategories); i++ { + + if m.RiskFactorCategories[i] != nil { + + if swag.IsZero(m.RiskFactorCategories[i]) { // not required + return nil + } + + if err := m.RiskFactorCategories[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("risk_factor_categories" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("risk_factor_categories" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *VulnerabilitymetadataapiRiskMetadata) contextValidateRule(ctx context.Context, formats strfmt.Registry) error { if m.Rule != nil { diff --git a/falcon/version.go b/falcon/version.go index cf4e45924..7631c00c0 100644 --- a/falcon/version.go +++ b/falcon/version.go @@ -4,4 +4,4 @@ import ( "github.com/blang/semver/v4" ) -var Version = semver.MustParse("0.20.1") +var Version = semver.MustParse("0.21.0") From 2be94dc936f6095f4f3911f6631db76a8d342763 Mon Sep 17 00:00:00 2001 From: ffalor <35144141+ffalor@users.noreply.github.com> Date: Mon, 15 Jun 2026 12:56:15 -0500 Subject: [PATCH 2/2] fix(models): correct run_types enum init slice type go-swagger generated var res [][]string but unmarshals a flat string enum list, panicking at package init. Match the []string pattern used by other enum inits. --- falcon/models/itautomation_rerun_task_execution_request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/falcon/models/itautomation_rerun_task_execution_request.go b/falcon/models/itautomation_rerun_task_execution_request.go index 3a2136d9b..bd575599b 100644 --- a/falcon/models/itautomation_rerun_task_execution_request.go +++ b/falcon/models/itautomation_rerun_task_execution_request.go @@ -106,7 +106,7 @@ func (m *ItautomationRerunTaskExecutionRequest) validateRunType(formats strfmt.R var itautomationRerunTaskExecutionRequestTypeRunTypesPropEnum []interface{} func init() { - var res [][]string + var res []string if err := json.Unmarshal([]byte(`["hosts","failed","offline","target","completed","canceled","expired"]`), &res); err != nil { panic(err) }