xbim_aim 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +413 -0
- data/Rakefile +10 -0
- data/lib/xbim_aim/api/admin_api.rb +358 -0
- data/lib/xbim_aim/api/applications_api.rb +203 -0
- data/lib/xbim_aim/api/assemblies_api.rb +690 -0
- data/lib/xbim_aim/api/assets_api.rb +926 -0
- data/lib/xbim_aim/api/attributes_api.rb +789 -0
- data/lib/xbim_aim/api/component_types_api.rb +690 -0
- data/lib/xbim_aim/api/components_api.rb +803 -0
- data/lib/xbim_aim/api/contacts_api.rb +690 -0
- data/lib/xbim_aim/api/diagnostics_api.rb +109 -0
- data/lib/xbim_aim/api/document_files_api.rb +224 -0
- data/lib/xbim_aim/api/documents_api.rb +690 -0
- data/lib/xbim_aim/api/entities_api.rb +904 -0
- data/lib/xbim_aim/api/facilities_api.rb +690 -0
- data/lib/xbim_aim/api/issues_api.rb +690 -0
- data/lib/xbim_aim/api/jobs_api.rb +690 -0
- data/lib/xbim_aim/api/levels_api.rb +690 -0
- data/lib/xbim_aim/api/logs_api.rb +90 -0
- data/lib/xbim_aim/api/model_files_api.rb +219 -0
- data/lib/xbim_aim/api/model_mapping_api.rb +203 -0
- data/lib/xbim_aim/api/models_api.rb +1308 -0
- data/lib/xbim_aim/api/resources_api.rb +690 -0
- data/lib/xbim_aim/api/schedules_api.rb +496 -0
- data/lib/xbim_aim/api/sites_api.rb +690 -0
- data/lib/xbim_aim/api/spaces_api.rb +803 -0
- data/lib/xbim_aim/api/spares_api.rb +690 -0
- data/lib/xbim_aim/api/stats_api.rb +170 -0
- data/lib/xbim_aim/api/systems_api.rb +690 -0
- data/lib/xbim_aim/api/thumbnails_api.rb +182 -0
- data/lib/xbim_aim/api/wexbim_api.rb +849 -0
- data/lib/xbim_aim/api/zones_api.rb +690 -0
- data/lib/xbim_aim/api_client.rb +390 -0
- data/lib/xbim_aim/api_error.rb +57 -0
- data/lib/xbim_aim/configuration.rb +278 -0
- data/lib/xbim_aim/models/application.rb +277 -0
- data/lib/xbim_aim/models/assembly_diagnostics.rb +299 -0
- data/lib/xbim_aim/models/assembly_info.rb +308 -0
- data/lib/xbim_aim/models/assembly_item.rb +454 -0
- data/lib/xbim_aim/models/asset.rb +339 -0
- data/lib/xbim_aim/models/asset_create.rb +268 -0
- data/lib/xbim_aim/models/asset_edit.rb +263 -0
- data/lib/xbim_aim/models/asset_segment.rb +304 -0
- data/lib/xbim_aim/models/attribute_definition.rb +354 -0
- data/lib/xbim_aim/models/attribute_definition_create.rb +338 -0
- data/lib/xbim_aim/models/attribute_definition_edit.rb +288 -0
- data/lib/xbim_aim/models/attribute_definition_entity.rb +392 -0
- data/lib/xbim_aim/models/attribute_value.rb +333 -0
- data/lib/xbim_aim/models/attribute_value_entity.rb +272 -0
- data/lib/xbim_aim/models/cell.rb +236 -0
- data/lib/xbim_aim/models/classification_node.rb +254 -0
- data/lib/xbim_aim/models/column_definition.rb +297 -0
- data/lib/xbim_aim/models/complex_value_base.rb +261 -0
- data/lib/xbim_aim/models/component.rb +535 -0
- data/lib/xbim_aim/models/component_create.rb +283 -0
- data/lib/xbim_aim/models/component_edit.rb +248 -0
- data/lib/xbim_aim/models/component_info.rb +326 -0
- data/lib/xbim_aim/models/component_type.rb +498 -0
- data/lib/xbim_aim/models/component_type_info.rb +308 -0
- data/lib/xbim_aim/models/contact.rb +443 -0
- data/lib/xbim_aim/models/contact_entity.rb +333 -0
- data/lib/xbim_aim/models/contact_info.rb +308 -0
- data/lib/xbim_aim/models/db_update.rb +227 -0
- data/lib/xbim_aim/models/document.rb +421 -0
- data/lib/xbim_aim/models/document_create.rb +345 -0
- data/lib/xbim_aim/models/document_edit.rb +310 -0
- data/lib/xbim_aim/models/document_info.rb +308 -0
- data/lib/xbim_aim/models/entity.rb +421 -0
- data/lib/xbim_aim/models/entity_base.rb +308 -0
- data/lib/xbim_aim/models/entity_contact.rb +333 -0
- data/lib/xbim_aim/models/entity_create.rb +274 -0
- data/lib/xbim_aim/models/entity_edit.rb +239 -0
- data/lib/xbim_aim/models/entity_mapping_info.rb +299 -0
- data/lib/xbim_aim/models/entity_match_descriptor.rb +245 -0
- data/lib/xbim_aim/models/entity_match_info.rb +238 -0
- data/lib/xbim_aim/models/entity_ref.rb +281 -0
- data/lib/xbim_aim/models/facility.rb +432 -0
- data/lib/xbim_aim/models/facility_info.rb +308 -0
- data/lib/xbim_aim/models/file_upload_result.rb +300 -0
- data/lib/xbim_aim/models/footprint.rb +254 -0
- data/lib/xbim_aim/models/i_metered_resource.rb +254 -0
- data/lib/xbim_aim/models/ifc_type.rb +247 -0
- data/lib/xbim_aim/models/inline_object.rb +294 -0
- data/lib/xbim_aim/models/inline_object1.rb +294 -0
- data/lib/xbim_aim/models/inline_object2.rb +220 -0
- data/lib/xbim_aim/models/inline_object3.rb +223 -0
- data/lib/xbim_aim/models/inline_object4.rb +294 -0
- data/lib/xbim_aim/models/inline_object5.rb +294 -0
- data/lib/xbim_aim/models/issue.rb +443 -0
- data/lib/xbim_aim/models/issue_info.rb +308 -0
- data/lib/xbim_aim/models/job.rb +483 -0
- data/lib/xbim_aim/models/job_create.rb +283 -0
- data/lib/xbim_aim/models/job_edit.rb +248 -0
- data/lib/xbim_aim/models/job_info.rb +308 -0
- data/lib/xbim_aim/models/level.rb +463 -0
- data/lib/xbim_aim/models/level_create.rb +274 -0
- data/lib/xbim_aim/models/level_edit.rb +239 -0
- data/lib/xbim_aim/models/level_info.rb +308 -0
- data/lib/xbim_aim/models/mapping_message_info.rb +281 -0
- data/lib/xbim_aim/models/mapping_properties.rb +227 -0
- data/lib/xbim_aim/models/member_permission.rb +292 -0
- data/lib/xbim_aim/models/member_role.rb +320 -0
- data/lib/xbim_aim/models/model.rb +617 -0
- data/lib/xbim_aim/models/model_create.rb +318 -0
- data/lib/xbim_aim/models/model_edit.rb +284 -0
- data/lib/xbim_aim/models/model_info.rb +380 -0
- data/lib/xbim_aim/models/model_mapping.rb +363 -0
- data/lib/xbim_aim/models/model_mapping_report.rb +354 -0
- data/lib/xbim_aim/models/o_data_list_response_of_application.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_assembly_diagnostics.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_assembly_item.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_asset.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_attribute_definition.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_attribute_definition_entity.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_attribute_value.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_complex_value_base.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_component.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_component_type.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_contact.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_document.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_entity.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_entity_ref.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_facility.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_issue.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_job.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_level.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_member_permission.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_model.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_model_mapping.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_model_mapping_report.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_resource.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_role.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_row.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_schedule.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_site.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_space.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_spare.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_system_item.rb +247 -0
- data/lib/xbim_aim/models/o_data_list_response_of_zone.rb +247 -0
- data/lib/xbim_aim/models/o_data_response_of_boolean.rb +227 -0
- data/lib/xbim_aim/models/quota_status.rb +300 -0
- data/lib/xbim_aim/models/related_entity.rb +432 -0
- data/lib/xbim_aim/models/resource.rb +443 -0
- data/lib/xbim_aim/models/resource_info.rb +308 -0
- data/lib/xbim_aim/models/role.rb +331 -0
- data/lib/xbim_aim/models/role_member.rb +279 -0
- data/lib/xbim_aim/models/row.rb +229 -0
- data/lib/xbim_aim/models/schedule.rb +258 -0
- data/lib/xbim_aim/models/site.rb +432 -0
- data/lib/xbim_aim/models/space.rb +491 -0
- data/lib/xbim_aim/models/space_create.rb +283 -0
- data/lib/xbim_aim/models/space_edit.rb +248 -0
- data/lib/xbim_aim/models/space_info.rb +326 -0
- data/lib/xbim_aim/models/spare.rb +450 -0
- data/lib/xbim_aim/models/spare_create.rb +283 -0
- data/lib/xbim_aim/models/spare_edit.rb +248 -0
- data/lib/xbim_aim/models/spare_info.rb +308 -0
- data/lib/xbim_aim/models/system_info.rb +319 -0
- data/lib/xbim_aim/models/system_item.rb +454 -0
- data/lib/xbim_aim/models/user_permissions.rb +275 -0
- data/lib/xbim_aim/models/value_container.rb +308 -0
- data/lib/xbim_aim/models/zone.rb +454 -0
- data/lib/xbim_aim/models/zone_info.rb +308 -0
- data/lib/xbim_aim/version.rb +15 -0
- data/lib/xbim_aim.rb +197 -0
- data/spec/api/admin_api_spec.rb +95 -0
- data/spec/api/applications_api_spec.rb +71 -0
- data/spec/api/assemblies_api_spec.rb +160 -0
- data/spec/api/assets_api_spec.rb +203 -0
- data/spec/api/attributes_api_spec.rb +177 -0
- data/spec/api/component_types_api_spec.rb +160 -0
- data/spec/api/components_api_spec.rb +184 -0
- data/spec/api/contacts_api_spec.rb +160 -0
- data/spec/api/diagnostics_api_spec.rb +54 -0
- data/spec/api/document_files_api_spec.rb +69 -0
- data/spec/api/documents_api_spec.rb +160 -0
- data/spec/api/entities_api_spec.rb +203 -0
- data/spec/api/facilities_api_spec.rb +160 -0
- data/spec/api/issues_api_spec.rb +160 -0
- data/spec/api/jobs_api_spec.rb +160 -0
- data/spec/api/levels_api_spec.rb +160 -0
- data/spec/api/logs_api_spec.rb +47 -0
- data/spec/api/model_files_api_spec.rb +71 -0
- data/spec/api/model_mapping_api_spec.rb +71 -0
- data/spec/api/models_api_spec.rb +273 -0
- data/spec/api/resources_api_spec.rb +160 -0
- data/spec/api/schedules_api_spec.rb +126 -0
- data/spec/api/sites_api_spec.rb +160 -0
- data/spec/api/spaces_api_spec.rb +184 -0
- data/spec/api/spares_api_spec.rb +160 -0
- data/spec/api/stats_api_spec.rb +61 -0
- data/spec/api/systems_api_spec.rb +160 -0
- data/spec/api/thumbnails_api_spec.rb +63 -0
- data/spec/api/wexbim_api_spec.rb +175 -0
- data/spec/api/zones_api_spec.rb +160 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/application_spec.rb +70 -0
- data/spec/models/assembly_diagnostics_spec.rb +88 -0
- data/spec/models/assembly_info_spec.rb +94 -0
- data/spec/models/assembly_item_spec.rb +178 -0
- data/spec/models/asset_create_spec.rb +44 -0
- data/spec/models/asset_edit_spec.rb +44 -0
- data/spec/models/asset_segment_spec.rb +88 -0
- data/spec/models/asset_spec.rb +92 -0
- data/spec/models/attribute_definition_create_spec.rb +78 -0
- data/spec/models/attribute_definition_edit_spec.rb +62 -0
- data/spec/models/attribute_definition_entity_spec.rb +126 -0
- data/spec/models/attribute_definition_spec.rb +102 -0
- data/spec/models/attribute_value_entity_spec.rb +70 -0
- data/spec/models/attribute_value_spec.rb +92 -0
- data/spec/models/cell_spec.rb +46 -0
- data/spec/models/classification_node_spec.rb +58 -0
- data/spec/models/column_definition_spec.rb +68 -0
- data/spec/models/complex_value_base_spec.rb +44 -0
- data/spec/models/component_create_spec.rb +70 -0
- data/spec/models/component_edit_spec.rb +52 -0
- data/spec/models/component_info_spec.rb +106 -0
- data/spec/models/component_spec.rb +226 -0
- data/spec/models/component_type_info_spec.rb +94 -0
- data/spec/models/component_type_spec.rb +202 -0
- data/spec/models/contact_entity_spec.rb +92 -0
- data/spec/models/contact_info_spec.rb +94 -0
- data/spec/models/contact_spec.rb +172 -0
- data/spec/models/db_update_spec.rb +40 -0
- data/spec/models/document_create_spec.rb +106 -0
- data/spec/models/document_edit_spec.rb +88 -0
- data/spec/models/document_info_spec.rb +94 -0
- data/spec/models/document_spec.rb +160 -0
- data/spec/models/entity_base_spec.rb +94 -0
- data/spec/models/entity_contact_spec.rb +92 -0
- data/spec/models/entity_create_spec.rb +64 -0
- data/spec/models/entity_edit_spec.rb +46 -0
- data/spec/models/entity_mapping_info_spec.rb +88 -0
- data/spec/models/entity_match_descriptor_spec.rb +52 -0
- data/spec/models/entity_match_info_spec.rb +46 -0
- data/spec/models/entity_ref_spec.rb +76 -0
- data/spec/models/entity_spec.rb +160 -0
- data/spec/models/facility_info_spec.rb +94 -0
- data/spec/models/facility_spec.rb +166 -0
- data/spec/models/file_upload_result_spec.rb +82 -0
- data/spec/models/footprint_spec.rb +58 -0
- data/spec/models/i_metered_resource_spec.rb +58 -0
- data/spec/models/ifc_type_spec.rb +52 -0
- data/spec/models/inline_object1_spec.rb +56 -0
- data/spec/models/inline_object2_spec.rb +34 -0
- data/spec/models/inline_object3_spec.rb +34 -0
- data/spec/models/inline_object4_spec.rb +56 -0
- data/spec/models/inline_object5_spec.rb +56 -0
- data/spec/models/inline_object_spec.rb +56 -0
- data/spec/models/issue_info_spec.rb +94 -0
- data/spec/models/issue_spec.rb +172 -0
- data/spec/models/job_create_spec.rb +70 -0
- data/spec/models/job_edit_spec.rb +52 -0
- data/spec/models/job_info_spec.rb +94 -0
- data/spec/models/job_spec.rb +196 -0
- data/spec/models/level_create_spec.rb +64 -0
- data/spec/models/level_edit_spec.rb +46 -0
- data/spec/models/level_info_spec.rb +94 -0
- data/spec/models/level_spec.rb +184 -0
- data/spec/models/mapping_message_info_spec.rb +76 -0
- data/spec/models/mapping_properties_spec.rb +40 -0
- data/spec/models/member_permission_spec.rb +66 -0
- data/spec/models/member_role_spec.rb +82 -0
- data/spec/models/model_create_spec.rb +68 -0
- data/spec/models/model_edit_spec.rb +56 -0
- data/spec/models/model_info_spec.rb +142 -0
- data/spec/models/model_mapping_report_spec.rb +118 -0
- data/spec/models/model_mapping_spec.rb +124 -0
- data/spec/models/model_spec.rb +260 -0
- data/spec/models/o_data_list_response_of_application_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_assembly_diagnostics_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_assembly_item_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_asset_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_attribute_definition_entity_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_attribute_definition_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_attribute_value_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_complex_value_base_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_component_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_component_type_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_contact_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_document_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_entity_ref_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_entity_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_facility_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_issue_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_job_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_level_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_member_permission_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_model_mapping_report_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_model_mapping_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_model_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_resource_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_role_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_row_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_schedule_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_site_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_space_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_spare_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_system_item_spec.rb +52 -0
- data/spec/models/o_data_list_response_of_zone_spec.rb +52 -0
- data/spec/models/o_data_response_of_boolean_spec.rb +40 -0
- data/spec/models/quota_status_spec.rb +66 -0
- data/spec/models/related_entity_spec.rb +166 -0
- data/spec/models/resource_info_spec.rb +94 -0
- data/spec/models/resource_spec.rb +172 -0
- data/spec/models/role_member_spec.rb +56 -0
- data/spec/models/role_spec.rb +88 -0
- data/spec/models/row_spec.rb +40 -0
- data/spec/models/schedule_spec.rb +58 -0
- data/spec/models/site_spec.rb +166 -0
- data/spec/models/space_create_spec.rb +70 -0
- data/spec/models/space_edit_spec.rb +52 -0
- data/spec/models/space_info_spec.rb +106 -0
- data/spec/models/space_spec.rb +202 -0
- data/spec/models/spare_create_spec.rb +70 -0
- data/spec/models/spare_edit_spec.rb +52 -0
- data/spec/models/spare_info_spec.rb +94 -0
- data/spec/models/spare_spec.rb +178 -0
- data/spec/models/system_info_spec.rb +100 -0
- data/spec/models/system_item_spec.rb +178 -0
- data/spec/models/user_permissions_spec.rb +56 -0
- data/spec/models/value_container_spec.rb +78 -0
- data/spec/models/zone_info_spec.rb +94 -0
- data/spec/models/zone_spec.rb +178 -0
- data/spec/spec_helper.rb +111 -0
- data/xbim_aim-1.0.0.gem +0 -0
- data/xbim_aim.gemspec +38 -0
- metadata +413 -0
@@ -0,0 +1,926 @@
|
|
1
|
+
=begin
|
2
|
+
#XBIM Flex API v2
|
3
|
+
|
4
|
+
#This is the XBIM Flex Swagger service where you can explore the REST API for the platform.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0
|
7
|
+
Contact: info@xbim.net
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module XbimAim
|
16
|
+
class AssetsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Assigns a user to the given role on the asset
|
23
|
+
# <span style='font-size: 17px;'>Summary:</span>Assigns a user to the given role on the asset.<br/>Return Type: <b></b><br/><br/>
|
24
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
25
|
+
# @param asset_id [Integer]
|
26
|
+
# @param region [String] The data center region the data resides in
|
27
|
+
# @param parameters [InlineObject]
|
28
|
+
# @param [Hash] opts the optional parameters
|
29
|
+
# @return [nil]
|
30
|
+
def assets_assign_by_tenantid_and_assetid(tenant_id, asset_id, region, parameters, opts = {})
|
31
|
+
assets_assign_by_tenantid_and_assetid_with_http_info(tenant_id, asset_id, region, parameters, opts)
|
32
|
+
nil
|
33
|
+
end
|
34
|
+
|
35
|
+
# Assigns a user to the given role on the asset
|
36
|
+
# <span style='font-size: 17px;'>Summary:</span>Assigns a user to the given role on the asset.<br/>Return Type: <b></b><br/><br/>
|
37
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
38
|
+
# @param asset_id [Integer]
|
39
|
+
# @param region [String] The data center region the data resides in
|
40
|
+
# @param parameters [InlineObject]
|
41
|
+
# @param [Hash] opts the optional parameters
|
42
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
43
|
+
def assets_assign_by_tenantid_and_assetid_with_http_info(tenant_id, asset_id, region, parameters, opts = {})
|
44
|
+
if @api_client.config.debugging
|
45
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.assets_assign_by_tenantid_and_assetid ...'
|
46
|
+
end
|
47
|
+
# verify the required parameter 'tenant_id' is set
|
48
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AssetsApi.assets_assign_by_tenantid_and_assetid"
|
50
|
+
end
|
51
|
+
# verify the required parameter 'asset_id' is set
|
52
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
53
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.assets_assign_by_tenantid_and_assetid"
|
54
|
+
end
|
55
|
+
# verify the required parameter 'region' is set
|
56
|
+
if @api_client.config.client_side_validation && region.nil?
|
57
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AssetsApi.assets_assign_by_tenantid_and_assetid"
|
58
|
+
end
|
59
|
+
# verify enum value
|
60
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
61
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
62
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
63
|
+
end
|
64
|
+
# verify the required parameter 'parameters' is set
|
65
|
+
if @api_client.config.client_side_validation && parameters.nil?
|
66
|
+
fail ArgumentError, "Missing the required parameter 'parameters' when calling AssetsApi.assets_assign_by_tenantid_and_assetid"
|
67
|
+
end
|
68
|
+
# resource path
|
69
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Assets({AssetId})/Roles.Assign'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'AssetId' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
70
|
+
|
71
|
+
# query parameters
|
72
|
+
query_params = opts[:query_params] || {}
|
73
|
+
|
74
|
+
# header parameters
|
75
|
+
header_params = opts[:header_params] || {}
|
76
|
+
# HTTP header 'Content-Type'
|
77
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
78
|
+
if !content_type.nil?
|
79
|
+
header_params['Content-Type'] = content_type
|
80
|
+
end
|
81
|
+
|
82
|
+
# form parameters
|
83
|
+
form_params = opts[:form_params] || {}
|
84
|
+
|
85
|
+
# http body (model)
|
86
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(parameters)
|
87
|
+
|
88
|
+
# return_type
|
89
|
+
return_type = opts[:debug_return_type]
|
90
|
+
|
91
|
+
# auth_names
|
92
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
93
|
+
|
94
|
+
new_options = opts.merge(
|
95
|
+
:operation => :"AssetsApi.assets_assign_by_tenantid_and_assetid",
|
96
|
+
:header_params => header_params,
|
97
|
+
:query_params => query_params,
|
98
|
+
:form_params => form_params,
|
99
|
+
:body => post_body,
|
100
|
+
:auth_names => auth_names,
|
101
|
+
:return_type => return_type
|
102
|
+
)
|
103
|
+
|
104
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug "API called: AssetsApi#assets_assign_by_tenantid_and_assetid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
107
|
+
end
|
108
|
+
return data, status_code, headers
|
109
|
+
end
|
110
|
+
|
111
|
+
# Archive an Asset and and models for future deletion
|
112
|
+
# <span style='font-size: 17px;'>Summary:</span>Archive an Asset and and models for future deletion.<br/>Return Type: <b></b><br/><br/>
|
113
|
+
# @param asset_id [Integer] key: AssetId
|
114
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
115
|
+
# @param region [String] The data center region the data resides in
|
116
|
+
# @param [Hash] opts the optional parameters
|
117
|
+
# @option opts [String] :if_match If-Match header
|
118
|
+
# @return [nil]
|
119
|
+
def assets_delete_by_assetid_and_tenantid(asset_id, tenant_id, region, opts = {})
|
120
|
+
assets_delete_by_assetid_and_tenantid_with_http_info(asset_id, tenant_id, region, opts)
|
121
|
+
nil
|
122
|
+
end
|
123
|
+
|
124
|
+
# Archive an Asset and and models for future deletion
|
125
|
+
# <span style='font-size: 17px;'>Summary:</span>Archive an Asset and and models for future deletion.<br/>Return Type: <b></b><br/><br/>
|
126
|
+
# @param asset_id [Integer] key: AssetId
|
127
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
128
|
+
# @param region [String] The data center region the data resides in
|
129
|
+
# @param [Hash] opts the optional parameters
|
130
|
+
# @option opts [String] :if_match If-Match header
|
131
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
132
|
+
def assets_delete_by_assetid_and_tenantid_with_http_info(asset_id, tenant_id, region, opts = {})
|
133
|
+
if @api_client.config.debugging
|
134
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.assets_delete_by_assetid_and_tenantid ...'
|
135
|
+
end
|
136
|
+
# verify the required parameter 'asset_id' is set
|
137
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
138
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.assets_delete_by_assetid_and_tenantid"
|
139
|
+
end
|
140
|
+
# verify the required parameter 'tenant_id' is set
|
141
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
142
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AssetsApi.assets_delete_by_assetid_and_tenantid"
|
143
|
+
end
|
144
|
+
# verify the required parameter 'region' is set
|
145
|
+
if @api_client.config.client_side_validation && region.nil?
|
146
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AssetsApi.assets_delete_by_assetid_and_tenantid"
|
147
|
+
end
|
148
|
+
# verify enum value
|
149
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
150
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
151
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
152
|
+
end
|
153
|
+
# resource path
|
154
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Assets({AssetId})'.sub('{' + 'AssetId' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
155
|
+
|
156
|
+
# query parameters
|
157
|
+
query_params = opts[:query_params] || {}
|
158
|
+
|
159
|
+
# header parameters
|
160
|
+
header_params = opts[:header_params] || {}
|
161
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
162
|
+
|
163
|
+
# form parameters
|
164
|
+
form_params = opts[:form_params] || {}
|
165
|
+
|
166
|
+
# http body (model)
|
167
|
+
post_body = opts[:debug_body]
|
168
|
+
|
169
|
+
# return_type
|
170
|
+
return_type = opts[:debug_return_type]
|
171
|
+
|
172
|
+
# auth_names
|
173
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
174
|
+
|
175
|
+
new_options = opts.merge(
|
176
|
+
:operation => :"AssetsApi.assets_delete_by_assetid_and_tenantid",
|
177
|
+
:header_params => header_params,
|
178
|
+
:query_params => query_params,
|
179
|
+
:form_params => form_params,
|
180
|
+
:body => post_body,
|
181
|
+
:auth_names => auth_names,
|
182
|
+
:return_type => return_type
|
183
|
+
)
|
184
|
+
|
185
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
186
|
+
if @api_client.config.debugging
|
187
|
+
@api_client.config.logger.debug "API called: AssetsApi#assets_delete_by_assetid_and_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
188
|
+
end
|
189
|
+
return data, status_code, headers
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the EntitySet Assets
|
193
|
+
# <span style='font-size: 17px;'>Summary:</span>Returns the EntitySet Assets.<br/>Return Type: <b>ODataListResponseOfAsset</b><br/>For more information about OData responses <a href='https://www.odata.org/getting-started/understand-odata-in-6-steps/'>link</a>.<br/><br/>
|
194
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
195
|
+
# @param region [String] The data center region the data resides in
|
196
|
+
# @param [Hash] opts the optional parameters
|
197
|
+
# @option opts [String] :expand Expands related entities inline.
|
198
|
+
# @option opts [String] :filter Filters the results, based on a Boolean condition.
|
199
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
200
|
+
# @option opts [String] :orderby Sorts the results.
|
201
|
+
# @option opts [Integer] :top Returns only the first n results.
|
202
|
+
# @option opts [Integer] :skip Skips the first n results.
|
203
|
+
# @option opts [Boolean] :count Includes a count of the matching results in the response.
|
204
|
+
# @return [ODataListResponseOfAsset]
|
205
|
+
def assets_get_by_tenantid(tenant_id, region, opts = {})
|
206
|
+
data, _status_code, _headers = assets_get_by_tenantid_with_http_info(tenant_id, region, opts)
|
207
|
+
data
|
208
|
+
end
|
209
|
+
|
210
|
+
# Returns the EntitySet Assets
|
211
|
+
# <span style='font-size: 17px;'>Summary:</span>Returns the EntitySet Assets.<br/>Return Type: <b>ODataListResponseOfAsset</b><br/>For more information about OData responses <a href='https://www.odata.org/getting-started/understand-odata-in-6-steps/'>link</a>.<br/><br/>
|
212
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
213
|
+
# @param region [String] The data center region the data resides in
|
214
|
+
# @param [Hash] opts the optional parameters
|
215
|
+
# @option opts [String] :expand Expands related entities inline.
|
216
|
+
# @option opts [String] :filter Filters the results, based on a Boolean condition.
|
217
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
218
|
+
# @option opts [String] :orderby Sorts the results.
|
219
|
+
# @option opts [Integer] :top Returns only the first n results.
|
220
|
+
# @option opts [Integer] :skip Skips the first n results.
|
221
|
+
# @option opts [Boolean] :count Includes a count of the matching results in the response.
|
222
|
+
# @return [Array<(ODataListResponseOfAsset, Integer, Hash)>] ODataListResponseOfAsset data, response status code and response headers
|
223
|
+
def assets_get_by_tenantid_with_http_info(tenant_id, region, opts = {})
|
224
|
+
if @api_client.config.debugging
|
225
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.assets_get_by_tenantid ...'
|
226
|
+
end
|
227
|
+
# verify the required parameter 'tenant_id' is set
|
228
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
229
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AssetsApi.assets_get_by_tenantid"
|
230
|
+
end
|
231
|
+
# verify the required parameter 'region' is set
|
232
|
+
if @api_client.config.client_side_validation && region.nil?
|
233
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AssetsApi.assets_get_by_tenantid"
|
234
|
+
end
|
235
|
+
# verify enum value
|
236
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
237
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
238
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
239
|
+
end
|
240
|
+
# resource path
|
241
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Assets'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
242
|
+
|
243
|
+
# query parameters
|
244
|
+
query_params = opts[:query_params] || {}
|
245
|
+
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
246
|
+
query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
247
|
+
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
|
248
|
+
query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
|
249
|
+
query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
|
250
|
+
query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
251
|
+
query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
|
252
|
+
|
253
|
+
# header parameters
|
254
|
+
header_params = opts[:header_params] || {}
|
255
|
+
# HTTP header 'Accept' (if needed)
|
256
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
|
257
|
+
|
258
|
+
# form parameters
|
259
|
+
form_params = opts[:form_params] || {}
|
260
|
+
|
261
|
+
# http body (model)
|
262
|
+
post_body = opts[:debug_body]
|
263
|
+
|
264
|
+
# return_type
|
265
|
+
return_type = opts[:debug_return_type] || 'ODataListResponseOfAsset'
|
266
|
+
|
267
|
+
# auth_names
|
268
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
269
|
+
|
270
|
+
new_options = opts.merge(
|
271
|
+
:operation => :"AssetsApi.assets_get_by_tenantid",
|
272
|
+
:header_params => header_params,
|
273
|
+
:query_params => query_params,
|
274
|
+
:form_params => form_params,
|
275
|
+
:body => post_body,
|
276
|
+
:auth_names => auth_names,
|
277
|
+
:return_type => return_type
|
278
|
+
)
|
279
|
+
|
280
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
281
|
+
if @api_client.config.debugging
|
282
|
+
@api_client.config.logger.debug "API called: AssetsApi#assets_get_by_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
283
|
+
end
|
284
|
+
return data, status_code, headers
|
285
|
+
end
|
286
|
+
|
287
|
+
# Returns the entity with the key from Assets
|
288
|
+
# <span style='font-size: 17px;'>Summary:</span>Returns the entity with the key from Assets.<br/>Return Type: <b>Asset</b><br/><br/>
|
289
|
+
# @param asset_id [Integer] key: AssetId
|
290
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
291
|
+
# @param region [String] The data center region the data resides in
|
292
|
+
# @param [Hash] opts the optional parameters
|
293
|
+
# @option opts [String] :expand Expands related entities inline.
|
294
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
295
|
+
# @return [Asset]
|
296
|
+
def assets_get_single_by_assetid_and_tenantid(asset_id, tenant_id, region, opts = {})
|
297
|
+
data, _status_code, _headers = assets_get_single_by_assetid_and_tenantid_with_http_info(asset_id, tenant_id, region, opts)
|
298
|
+
data
|
299
|
+
end
|
300
|
+
|
301
|
+
# Returns the entity with the key from Assets
|
302
|
+
# <span style='font-size: 17px;'>Summary:</span>Returns the entity with the key from Assets.<br/>Return Type: <b>Asset</b><br/><br/>
|
303
|
+
# @param asset_id [Integer] key: AssetId
|
304
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
305
|
+
# @param region [String] The data center region the data resides in
|
306
|
+
# @param [Hash] opts the optional parameters
|
307
|
+
# @option opts [String] :expand Expands related entities inline.
|
308
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
309
|
+
# @return [Array<(Asset, Integer, Hash)>] Asset data, response status code and response headers
|
310
|
+
def assets_get_single_by_assetid_and_tenantid_with_http_info(asset_id, tenant_id, region, opts = {})
|
311
|
+
if @api_client.config.debugging
|
312
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.assets_get_single_by_assetid_and_tenantid ...'
|
313
|
+
end
|
314
|
+
# verify the required parameter 'asset_id' is set
|
315
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
316
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.assets_get_single_by_assetid_and_tenantid"
|
317
|
+
end
|
318
|
+
# verify the required parameter 'tenant_id' is set
|
319
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
320
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AssetsApi.assets_get_single_by_assetid_and_tenantid"
|
321
|
+
end
|
322
|
+
# verify the required parameter 'region' is set
|
323
|
+
if @api_client.config.client_side_validation && region.nil?
|
324
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AssetsApi.assets_get_single_by_assetid_and_tenantid"
|
325
|
+
end
|
326
|
+
# verify enum value
|
327
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
328
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
329
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
330
|
+
end
|
331
|
+
# resource path
|
332
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Assets({AssetId})'.sub('{' + 'AssetId' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
333
|
+
|
334
|
+
# query parameters
|
335
|
+
query_params = opts[:query_params] || {}
|
336
|
+
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
337
|
+
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
|
338
|
+
|
339
|
+
# header parameters
|
340
|
+
header_params = opts[:header_params] || {}
|
341
|
+
# HTTP header 'Accept' (if needed)
|
342
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full'])
|
343
|
+
|
344
|
+
# form parameters
|
345
|
+
form_params = opts[:form_params] || {}
|
346
|
+
|
347
|
+
# http body (model)
|
348
|
+
post_body = opts[:debug_body]
|
349
|
+
|
350
|
+
# return_type
|
351
|
+
return_type = opts[:debug_return_type] || 'Asset'
|
352
|
+
|
353
|
+
# auth_names
|
354
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
355
|
+
|
356
|
+
new_options = opts.merge(
|
357
|
+
:operation => :"AssetsApi.assets_get_single_by_assetid_and_tenantid",
|
358
|
+
:header_params => header_params,
|
359
|
+
:query_params => query_params,
|
360
|
+
:form_params => form_params,
|
361
|
+
:body => post_body,
|
362
|
+
:auth_names => auth_names,
|
363
|
+
:return_type => return_type
|
364
|
+
)
|
365
|
+
|
366
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
367
|
+
if @api_client.config.debugging
|
368
|
+
@api_client.config.logger.debug "API called: AssetsApi#assets_get_single_by_assetid_and_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
369
|
+
end
|
370
|
+
return data, status_code, headers
|
371
|
+
end
|
372
|
+
|
373
|
+
# Gets the list of users with access to this item and their permissions
|
374
|
+
# <span style='font-size: 17px;'>Summary:</span>Gets the list of users with access to this item and their permissions.<br/>Return Type: <b>ODataListResponseOfMemberPermission</b><br/>For more information about OData responses <a href='https://www.odata.org/getting-started/understand-odata-in-6-steps/'>link</a>.<br/><br/>
|
375
|
+
# @param asset_id [Integer]
|
376
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
377
|
+
# @param region [String] The data center region the data resides in
|
378
|
+
# @param [Hash] opts the optional parameters
|
379
|
+
# @option opts [String] :expand Expands related entities inline.
|
380
|
+
# @option opts [String] :filter Filters the results, based on a Boolean condition.
|
381
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
382
|
+
# @option opts [String] :orderby Sorts the results.
|
383
|
+
# @option opts [Integer] :top Returns only the first n results.
|
384
|
+
# @option opts [Integer] :skip Skips the first n results.
|
385
|
+
# @option opts [Boolean] :count Includes a count of the matching results in the response.
|
386
|
+
# @return [ODataListResponseOfMemberPermission]
|
387
|
+
def assets_member_access_by_assetid_and_tenantid(asset_id, tenant_id, region, opts = {})
|
388
|
+
data, _status_code, _headers = assets_member_access_by_assetid_and_tenantid_with_http_info(asset_id, tenant_id, region, opts)
|
389
|
+
data
|
390
|
+
end
|
391
|
+
|
392
|
+
# Gets the list of users with access to this item and their permissions
|
393
|
+
# <span style='font-size: 17px;'>Summary:</span>Gets the list of users with access to this item and their permissions.<br/>Return Type: <b>ODataListResponseOfMemberPermission</b><br/>For more information about OData responses <a href='https://www.odata.org/getting-started/understand-odata-in-6-steps/'>link</a>.<br/><br/>
|
394
|
+
# @param asset_id [Integer]
|
395
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
396
|
+
# @param region [String] The data center region the data resides in
|
397
|
+
# @param [Hash] opts the optional parameters
|
398
|
+
# @option opts [String] :expand Expands related entities inline.
|
399
|
+
# @option opts [String] :filter Filters the results, based on a Boolean condition.
|
400
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
401
|
+
# @option opts [String] :orderby Sorts the results.
|
402
|
+
# @option opts [Integer] :top Returns only the first n results.
|
403
|
+
# @option opts [Integer] :skip Skips the first n results.
|
404
|
+
# @option opts [Boolean] :count Includes a count of the matching results in the response.
|
405
|
+
# @return [Array<(ODataListResponseOfMemberPermission, Integer, Hash)>] ODataListResponseOfMemberPermission data, response status code and response headers
|
406
|
+
def assets_member_access_by_assetid_and_tenantid_with_http_info(asset_id, tenant_id, region, opts = {})
|
407
|
+
if @api_client.config.debugging
|
408
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.assets_member_access_by_assetid_and_tenantid ...'
|
409
|
+
end
|
410
|
+
# verify the required parameter 'asset_id' is set
|
411
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
412
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.assets_member_access_by_assetid_and_tenantid"
|
413
|
+
end
|
414
|
+
# verify the required parameter 'tenant_id' is set
|
415
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
416
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AssetsApi.assets_member_access_by_assetid_and_tenantid"
|
417
|
+
end
|
418
|
+
# verify the required parameter 'region' is set
|
419
|
+
if @api_client.config.client_side_validation && region.nil?
|
420
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AssetsApi.assets_member_access_by_assetid_and_tenantid"
|
421
|
+
end
|
422
|
+
# verify enum value
|
423
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
424
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
425
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
426
|
+
end
|
427
|
+
# resource path
|
428
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Assets({AssetId})/MemberAccess'.sub('{' + 'AssetId' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
429
|
+
|
430
|
+
# query parameters
|
431
|
+
query_params = opts[:query_params] || {}
|
432
|
+
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
433
|
+
query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
434
|
+
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
|
435
|
+
query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
|
436
|
+
query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
|
437
|
+
query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
438
|
+
query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
|
439
|
+
|
440
|
+
# header parameters
|
441
|
+
header_params = opts[:header_params] || {}
|
442
|
+
# HTTP header 'Accept' (if needed)
|
443
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
|
444
|
+
|
445
|
+
# form parameters
|
446
|
+
form_params = opts[:form_params] || {}
|
447
|
+
|
448
|
+
# http body (model)
|
449
|
+
post_body = opts[:debug_body]
|
450
|
+
|
451
|
+
# return_type
|
452
|
+
return_type = opts[:debug_return_type] || 'ODataListResponseOfMemberPermission'
|
453
|
+
|
454
|
+
# auth_names
|
455
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
456
|
+
|
457
|
+
new_options = opts.merge(
|
458
|
+
:operation => :"AssetsApi.assets_member_access_by_assetid_and_tenantid",
|
459
|
+
:header_params => header_params,
|
460
|
+
:query_params => query_params,
|
461
|
+
:form_params => form_params,
|
462
|
+
:body => post_body,
|
463
|
+
:auth_names => auth_names,
|
464
|
+
:return_type => return_type
|
465
|
+
)
|
466
|
+
|
467
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
468
|
+
if @api_client.config.debugging
|
469
|
+
@api_client.config.logger.debug "API called: AssetsApi#assets_member_access_by_assetid_and_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
470
|
+
end
|
471
|
+
return data, status_code, headers
|
472
|
+
end
|
473
|
+
|
474
|
+
# Edit an existing asset
|
475
|
+
# <span style='font-size: 17px;'>Summary:</span>Edit an existing asset.<br/>Return Type: <b>Asset</b><br/><br/>
|
476
|
+
# @param asset_id [Integer]
|
477
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
478
|
+
# @param region [String] The data center region the data resides in
|
479
|
+
# @param asset [AssetEdit] The entity to patch
|
480
|
+
# @param [Hash] opts the optional parameters
|
481
|
+
# @return [Asset]
|
482
|
+
def assets_patch_by_assetid_and_tenantid(asset_id, tenant_id, region, asset, opts = {})
|
483
|
+
data, _status_code, _headers = assets_patch_by_assetid_and_tenantid_with_http_info(asset_id, tenant_id, region, asset, opts)
|
484
|
+
data
|
485
|
+
end
|
486
|
+
|
487
|
+
# Edit an existing asset
|
488
|
+
# <span style='font-size: 17px;'>Summary:</span>Edit an existing asset.<br/>Return Type: <b>Asset</b><br/><br/>
|
489
|
+
# @param asset_id [Integer]
|
490
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
491
|
+
# @param region [String] The data center region the data resides in
|
492
|
+
# @param asset [AssetEdit] The entity to patch
|
493
|
+
# @param [Hash] opts the optional parameters
|
494
|
+
# @return [Array<(Asset, Integer, Hash)>] Asset data, response status code and response headers
|
495
|
+
def assets_patch_by_assetid_and_tenantid_with_http_info(asset_id, tenant_id, region, asset, opts = {})
|
496
|
+
if @api_client.config.debugging
|
497
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.assets_patch_by_assetid_and_tenantid ...'
|
498
|
+
end
|
499
|
+
# verify the required parameter 'asset_id' is set
|
500
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
501
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.assets_patch_by_assetid_and_tenantid"
|
502
|
+
end
|
503
|
+
# verify the required parameter 'tenant_id' is set
|
504
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
505
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AssetsApi.assets_patch_by_assetid_and_tenantid"
|
506
|
+
end
|
507
|
+
# verify the required parameter 'region' is set
|
508
|
+
if @api_client.config.client_side_validation && region.nil?
|
509
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AssetsApi.assets_patch_by_assetid_and_tenantid"
|
510
|
+
end
|
511
|
+
# verify enum value
|
512
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
513
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
514
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
515
|
+
end
|
516
|
+
# verify the required parameter 'asset' is set
|
517
|
+
if @api_client.config.client_side_validation && asset.nil?
|
518
|
+
fail ArgumentError, "Missing the required parameter 'asset' when calling AssetsApi.assets_patch_by_assetid_and_tenantid"
|
519
|
+
end
|
520
|
+
# resource path
|
521
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Assets({AssetId})'.sub('{' + 'AssetId' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
522
|
+
|
523
|
+
# query parameters
|
524
|
+
query_params = opts[:query_params] || {}
|
525
|
+
|
526
|
+
# header parameters
|
527
|
+
header_params = opts[:header_params] || {}
|
528
|
+
# HTTP header 'Accept' (if needed)
|
529
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
530
|
+
# HTTP header 'Content-Type'
|
531
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
532
|
+
if !content_type.nil?
|
533
|
+
header_params['Content-Type'] = content_type
|
534
|
+
end
|
535
|
+
|
536
|
+
# form parameters
|
537
|
+
form_params = opts[:form_params] || {}
|
538
|
+
|
539
|
+
# http body (model)
|
540
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(asset)
|
541
|
+
|
542
|
+
# return_type
|
543
|
+
return_type = opts[:debug_return_type] || 'Asset'
|
544
|
+
|
545
|
+
# auth_names
|
546
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
547
|
+
|
548
|
+
new_options = opts.merge(
|
549
|
+
:operation => :"AssetsApi.assets_patch_by_assetid_and_tenantid",
|
550
|
+
:header_params => header_params,
|
551
|
+
:query_params => query_params,
|
552
|
+
:form_params => form_params,
|
553
|
+
:body => post_body,
|
554
|
+
:auth_names => auth_names,
|
555
|
+
:return_type => return_type
|
556
|
+
)
|
557
|
+
|
558
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
559
|
+
if @api_client.config.debugging
|
560
|
+
@api_client.config.logger.debug "API called: AssetsApi#assets_patch_by_assetid_and_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
561
|
+
end
|
562
|
+
return data, status_code, headers
|
563
|
+
end
|
564
|
+
|
565
|
+
# Gets the effective permissions for this current user
|
566
|
+
# <span style='font-size: 17px;'>Summary:</span>Gets the effective permissions for this current user.<br/>Return Type: <b>UserPermissions</b><br/><br/>
|
567
|
+
# @param asset_id [Integer]
|
568
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
569
|
+
# @param region [String] The data center region the data resides in
|
570
|
+
# @param [Hash] opts the optional parameters
|
571
|
+
# @option opts [String] :expand Expands related entities inline.
|
572
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
573
|
+
# @return [UserPermissions]
|
574
|
+
def assets_permissions_by_assetid_and_tenantid(asset_id, tenant_id, region, opts = {})
|
575
|
+
data, _status_code, _headers = assets_permissions_by_assetid_and_tenantid_with_http_info(asset_id, tenant_id, region, opts)
|
576
|
+
data
|
577
|
+
end
|
578
|
+
|
579
|
+
# Gets the effective permissions for this current user
|
580
|
+
# <span style='font-size: 17px;'>Summary:</span>Gets the effective permissions for this current user.<br/>Return Type: <b>UserPermissions</b><br/><br/>
|
581
|
+
# @param asset_id [Integer]
|
582
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
583
|
+
# @param region [String] The data center region the data resides in
|
584
|
+
# @param [Hash] opts the optional parameters
|
585
|
+
# @option opts [String] :expand Expands related entities inline.
|
586
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
587
|
+
# @return [Array<(UserPermissions, Integer, Hash)>] UserPermissions data, response status code and response headers
|
588
|
+
def assets_permissions_by_assetid_and_tenantid_with_http_info(asset_id, tenant_id, region, opts = {})
|
589
|
+
if @api_client.config.debugging
|
590
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.assets_permissions_by_assetid_and_tenantid ...'
|
591
|
+
end
|
592
|
+
# verify the required parameter 'asset_id' is set
|
593
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
594
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.assets_permissions_by_assetid_and_tenantid"
|
595
|
+
end
|
596
|
+
# verify the required parameter 'tenant_id' is set
|
597
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
598
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AssetsApi.assets_permissions_by_assetid_and_tenantid"
|
599
|
+
end
|
600
|
+
# verify the required parameter 'region' is set
|
601
|
+
if @api_client.config.client_side_validation && region.nil?
|
602
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AssetsApi.assets_permissions_by_assetid_and_tenantid"
|
603
|
+
end
|
604
|
+
# verify enum value
|
605
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
606
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
607
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
608
|
+
end
|
609
|
+
# resource path
|
610
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Assets({AssetId})/Permissions'.sub('{' + 'AssetId' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
611
|
+
|
612
|
+
# query parameters
|
613
|
+
query_params = opts[:query_params] || {}
|
614
|
+
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
615
|
+
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
|
616
|
+
|
617
|
+
# header parameters
|
618
|
+
header_params = opts[:header_params] || {}
|
619
|
+
# HTTP header 'Accept' (if needed)
|
620
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
621
|
+
|
622
|
+
# form parameters
|
623
|
+
form_params = opts[:form_params] || {}
|
624
|
+
|
625
|
+
# http body (model)
|
626
|
+
post_body = opts[:debug_body]
|
627
|
+
|
628
|
+
# return_type
|
629
|
+
return_type = opts[:debug_return_type] || 'UserPermissions'
|
630
|
+
|
631
|
+
# auth_names
|
632
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
633
|
+
|
634
|
+
new_options = opts.merge(
|
635
|
+
:operation => :"AssetsApi.assets_permissions_by_assetid_and_tenantid",
|
636
|
+
:header_params => header_params,
|
637
|
+
:query_params => query_params,
|
638
|
+
:form_params => form_params,
|
639
|
+
:body => post_body,
|
640
|
+
:auth_names => auth_names,
|
641
|
+
:return_type => return_type
|
642
|
+
)
|
643
|
+
|
644
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
645
|
+
if @api_client.config.debugging
|
646
|
+
@api_client.config.logger.debug "API called: AssetsApi#assets_permissions_by_assetid_and_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
647
|
+
end
|
648
|
+
return data, status_code, headers
|
649
|
+
end
|
650
|
+
|
651
|
+
# Post a new entity to EntitySet Assets
|
652
|
+
# <span style='font-size: 17px;'>Summary:</span>Post a new entity to EntitySet Assets.<br/>Return Type: <b>Asset</b><br/><br/>
|
653
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
654
|
+
# @param region [String] The data center region the data resides in
|
655
|
+
# @param asset [AssetCreate] The entity to post
|
656
|
+
# @param [Hash] opts the optional parameters
|
657
|
+
# @return [Asset]
|
658
|
+
def assets_post_by_tenantid(tenant_id, region, asset, opts = {})
|
659
|
+
data, _status_code, _headers = assets_post_by_tenantid_with_http_info(tenant_id, region, asset, opts)
|
660
|
+
data
|
661
|
+
end
|
662
|
+
|
663
|
+
# Post a new entity to EntitySet Assets
|
664
|
+
# <span style='font-size: 17px;'>Summary:</span>Post a new entity to EntitySet Assets.<br/>Return Type: <b>Asset</b><br/><br/>
|
665
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
666
|
+
# @param region [String] The data center region the data resides in
|
667
|
+
# @param asset [AssetCreate] The entity to post
|
668
|
+
# @param [Hash] opts the optional parameters
|
669
|
+
# @return [Array<(Asset, Integer, Hash)>] Asset data, response status code and response headers
|
670
|
+
def assets_post_by_tenantid_with_http_info(tenant_id, region, asset, opts = {})
|
671
|
+
if @api_client.config.debugging
|
672
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.assets_post_by_tenantid ...'
|
673
|
+
end
|
674
|
+
# verify the required parameter 'tenant_id' is set
|
675
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
676
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AssetsApi.assets_post_by_tenantid"
|
677
|
+
end
|
678
|
+
# verify the required parameter 'region' is set
|
679
|
+
if @api_client.config.client_side_validation && region.nil?
|
680
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AssetsApi.assets_post_by_tenantid"
|
681
|
+
end
|
682
|
+
# verify enum value
|
683
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
684
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
685
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
686
|
+
end
|
687
|
+
# verify the required parameter 'asset' is set
|
688
|
+
if @api_client.config.client_side_validation && asset.nil?
|
689
|
+
fail ArgumentError, "Missing the required parameter 'asset' when calling AssetsApi.assets_post_by_tenantid"
|
690
|
+
end
|
691
|
+
# resource path
|
692
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Assets'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
693
|
+
|
694
|
+
# query parameters
|
695
|
+
query_params = opts[:query_params] || {}
|
696
|
+
|
697
|
+
# header parameters
|
698
|
+
header_params = opts[:header_params] || {}
|
699
|
+
# HTTP header 'Accept' (if needed)
|
700
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
701
|
+
# HTTP header 'Content-Type'
|
702
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
703
|
+
if !content_type.nil?
|
704
|
+
header_params['Content-Type'] = content_type
|
705
|
+
end
|
706
|
+
|
707
|
+
# form parameters
|
708
|
+
form_params = opts[:form_params] || {}
|
709
|
+
|
710
|
+
# http body (model)
|
711
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(asset)
|
712
|
+
|
713
|
+
# return_type
|
714
|
+
return_type = opts[:debug_return_type] || 'Asset'
|
715
|
+
|
716
|
+
# auth_names
|
717
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
718
|
+
|
719
|
+
new_options = opts.merge(
|
720
|
+
:operation => :"AssetsApi.assets_post_by_tenantid",
|
721
|
+
:header_params => header_params,
|
722
|
+
:query_params => query_params,
|
723
|
+
:form_params => form_params,
|
724
|
+
:body => post_body,
|
725
|
+
:auth_names => auth_names,
|
726
|
+
:return_type => return_type
|
727
|
+
)
|
728
|
+
|
729
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
730
|
+
if @api_client.config.debugging
|
731
|
+
@api_client.config.logger.debug "API called: AssetsApi#assets_post_by_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
732
|
+
end
|
733
|
+
return data, status_code, headers
|
734
|
+
end
|
735
|
+
|
736
|
+
# Revokes a user from the given role on the asset
|
737
|
+
# <span style='font-size: 17px;'>Summary:</span>Revokes a user from the given role on the asset.<br/>Return Type: <b></b><br/><br/>
|
738
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
739
|
+
# @param asset_id [Integer]
|
740
|
+
# @param region [String] The data center region the data resides in
|
741
|
+
# @param parameters [InlineObject1]
|
742
|
+
# @param [Hash] opts the optional parameters
|
743
|
+
# @return [nil]
|
744
|
+
def assets_revoke_by_tenantid_and_assetid(tenant_id, asset_id, region, parameters, opts = {})
|
745
|
+
assets_revoke_by_tenantid_and_assetid_with_http_info(tenant_id, asset_id, region, parameters, opts)
|
746
|
+
nil
|
747
|
+
end
|
748
|
+
|
749
|
+
# Revokes a user from the given role on the asset
|
750
|
+
# <span style='font-size: 17px;'>Summary:</span>Revokes a user from the given role on the asset.<br/>Return Type: <b></b><br/><br/>
|
751
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
752
|
+
# @param asset_id [Integer]
|
753
|
+
# @param region [String] The data center region the data resides in
|
754
|
+
# @param parameters [InlineObject1]
|
755
|
+
# @param [Hash] opts the optional parameters
|
756
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
757
|
+
def assets_revoke_by_tenantid_and_assetid_with_http_info(tenant_id, asset_id, region, parameters, opts = {})
|
758
|
+
if @api_client.config.debugging
|
759
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.assets_revoke_by_tenantid_and_assetid ...'
|
760
|
+
end
|
761
|
+
# verify the required parameter 'tenant_id' is set
|
762
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
763
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AssetsApi.assets_revoke_by_tenantid_and_assetid"
|
764
|
+
end
|
765
|
+
# verify the required parameter 'asset_id' is set
|
766
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
767
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.assets_revoke_by_tenantid_and_assetid"
|
768
|
+
end
|
769
|
+
# verify the required parameter 'region' is set
|
770
|
+
if @api_client.config.client_side_validation && region.nil?
|
771
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AssetsApi.assets_revoke_by_tenantid_and_assetid"
|
772
|
+
end
|
773
|
+
# verify enum value
|
774
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
775
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
776
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
777
|
+
end
|
778
|
+
# verify the required parameter 'parameters' is set
|
779
|
+
if @api_client.config.client_side_validation && parameters.nil?
|
780
|
+
fail ArgumentError, "Missing the required parameter 'parameters' when calling AssetsApi.assets_revoke_by_tenantid_and_assetid"
|
781
|
+
end
|
782
|
+
# resource path
|
783
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Assets({AssetId})/Roles.Revoke'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'AssetId' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
784
|
+
|
785
|
+
# query parameters
|
786
|
+
query_params = opts[:query_params] || {}
|
787
|
+
|
788
|
+
# header parameters
|
789
|
+
header_params = opts[:header_params] || {}
|
790
|
+
# HTTP header 'Content-Type'
|
791
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
792
|
+
if !content_type.nil?
|
793
|
+
header_params['Content-Type'] = content_type
|
794
|
+
end
|
795
|
+
|
796
|
+
# form parameters
|
797
|
+
form_params = opts[:form_params] || {}
|
798
|
+
|
799
|
+
# http body (model)
|
800
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(parameters)
|
801
|
+
|
802
|
+
# return_type
|
803
|
+
return_type = opts[:debug_return_type]
|
804
|
+
|
805
|
+
# auth_names
|
806
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
807
|
+
|
808
|
+
new_options = opts.merge(
|
809
|
+
:operation => :"AssetsApi.assets_revoke_by_tenantid_and_assetid",
|
810
|
+
:header_params => header_params,
|
811
|
+
:query_params => query_params,
|
812
|
+
:form_params => form_params,
|
813
|
+
:body => post_body,
|
814
|
+
:auth_names => auth_names,
|
815
|
+
:return_type => return_type
|
816
|
+
)
|
817
|
+
|
818
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
819
|
+
if @api_client.config.debugging
|
820
|
+
@api_client.config.logger.debug "API called: AssetsApi#assets_revoke_by_tenantid_and_assetid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
821
|
+
end
|
822
|
+
return data, status_code, headers
|
823
|
+
end
|
824
|
+
|
825
|
+
# Gets the roles for the given Asset
|
826
|
+
# <span style='font-size: 17px;'>Summary:</span>Gets the roles for the given Asset.<br/>Return Type: <b>ODataListResponseOfRole</b><br/>For more information about OData responses <a href='https://www.odata.org/getting-started/understand-odata-in-6-steps/'>link</a>.<br/><br/>
|
827
|
+
# @param asset_id [Integer]
|
828
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
829
|
+
# @param region [String] The data center region the data resides in
|
830
|
+
# @param [Hash] opts the optional parameters
|
831
|
+
# @option opts [String] :expand Expands related entities inline.
|
832
|
+
# @option opts [String] :filter Filters the results, based on a Boolean condition.
|
833
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
834
|
+
# @option opts [String] :orderby Sorts the results.
|
835
|
+
# @option opts [Integer] :top Returns only the first n results.
|
836
|
+
# @option opts [Integer] :skip Skips the first n results.
|
837
|
+
# @option opts [Boolean] :count Includes a count of the matching results in the response.
|
838
|
+
# @return [ODataListResponseOfRole]
|
839
|
+
def assets_roles_by_assetid_and_tenantid(asset_id, tenant_id, region, opts = {})
|
840
|
+
data, _status_code, _headers = assets_roles_by_assetid_and_tenantid_with_http_info(asset_id, tenant_id, region, opts)
|
841
|
+
data
|
842
|
+
end
|
843
|
+
|
844
|
+
# Gets the roles for the given Asset
|
845
|
+
# <span style='font-size: 17px;'>Summary:</span>Gets the roles for the given Asset.<br/>Return Type: <b>ODataListResponseOfRole</b><br/>For more information about OData responses <a href='https://www.odata.org/getting-started/understand-odata-in-6-steps/'>link</a>.<br/><br/>
|
846
|
+
# @param asset_id [Integer]
|
847
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
848
|
+
# @param region [String] The data center region the data resides in
|
849
|
+
# @param [Hash] opts the optional parameters
|
850
|
+
# @option opts [String] :expand Expands related entities inline.
|
851
|
+
# @option opts [String] :filter Filters the results, based on a Boolean condition.
|
852
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
853
|
+
# @option opts [String] :orderby Sorts the results.
|
854
|
+
# @option opts [Integer] :top Returns only the first n results.
|
855
|
+
# @option opts [Integer] :skip Skips the first n results.
|
856
|
+
# @option opts [Boolean] :count Includes a count of the matching results in the response.
|
857
|
+
# @return [Array<(ODataListResponseOfRole, Integer, Hash)>] ODataListResponseOfRole data, response status code and response headers
|
858
|
+
def assets_roles_by_assetid_and_tenantid_with_http_info(asset_id, tenant_id, region, opts = {})
|
859
|
+
if @api_client.config.debugging
|
860
|
+
@api_client.config.logger.debug 'Calling API: AssetsApi.assets_roles_by_assetid_and_tenantid ...'
|
861
|
+
end
|
862
|
+
# verify the required parameter 'asset_id' is set
|
863
|
+
if @api_client.config.client_side_validation && asset_id.nil?
|
864
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.assets_roles_by_assetid_and_tenantid"
|
865
|
+
end
|
866
|
+
# verify the required parameter 'tenant_id' is set
|
867
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
868
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AssetsApi.assets_roles_by_assetid_and_tenantid"
|
869
|
+
end
|
870
|
+
# verify the required parameter 'region' is set
|
871
|
+
if @api_client.config.client_side_validation && region.nil?
|
872
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AssetsApi.assets_roles_by_assetid_and_tenantid"
|
873
|
+
end
|
874
|
+
# verify enum value
|
875
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
876
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
877
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
878
|
+
end
|
879
|
+
# resource path
|
880
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Assets({AssetId})/Roles'.sub('{' + 'AssetId' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
881
|
+
|
882
|
+
# query parameters
|
883
|
+
query_params = opts[:query_params] || {}
|
884
|
+
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
885
|
+
query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
886
|
+
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
|
887
|
+
query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
|
888
|
+
query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
|
889
|
+
query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
890
|
+
query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
|
891
|
+
|
892
|
+
# header parameters
|
893
|
+
header_params = opts[:header_params] || {}
|
894
|
+
# HTTP header 'Accept' (if needed)
|
895
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json;odata.metadata=none', 'application/json;odata.metadata=minimal', 'application/json;odata.metadata=full', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
|
896
|
+
|
897
|
+
# form parameters
|
898
|
+
form_params = opts[:form_params] || {}
|
899
|
+
|
900
|
+
# http body (model)
|
901
|
+
post_body = opts[:debug_body]
|
902
|
+
|
903
|
+
# return_type
|
904
|
+
return_type = opts[:debug_return_type] || 'ODataListResponseOfRole'
|
905
|
+
|
906
|
+
# auth_names
|
907
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
908
|
+
|
909
|
+
new_options = opts.merge(
|
910
|
+
:operation => :"AssetsApi.assets_roles_by_assetid_and_tenantid",
|
911
|
+
:header_params => header_params,
|
912
|
+
:query_params => query_params,
|
913
|
+
:form_params => form_params,
|
914
|
+
:body => post_body,
|
915
|
+
:auth_names => auth_names,
|
916
|
+
:return_type => return_type
|
917
|
+
)
|
918
|
+
|
919
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
920
|
+
if @api_client.config.debugging
|
921
|
+
@api_client.config.logger.debug "API called: AssetsApi#assets_roles_by_assetid_and_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
922
|
+
end
|
923
|
+
return data, status_code, headers
|
924
|
+
end
|
925
|
+
end
|
926
|
+
end
|