xbim_aim 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,789 @@
|
|
|
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 AttributesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Change the underlying data type for the attribute, migrating any existing data where possible
|
|
23
|
+
# <span style='font-size: 17px;'>Summary:</span>Change the underlying data type for the attribute, migrating any existing data where possible.<br/>This operation will attempt to generate new typed data values from the current value. Note this may result in an empty value if no conversion can be made - however the original values will be kept allowing the process to be reversed, so this is not permanently lossy. <br />E.g. converting Text value '15' to a Real or Integer will produce expected results, but an original value of 'FIVE' would fail to parse. <br /> Equally, some conversions make little sense, such as Logical converting to Date, and will be rejected..<br/>Return Type: <b>ODataResponseOfBoolean</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/>
|
|
24
|
+
# @param asset_model_id [Integer] The model Id
|
|
25
|
+
# @param definition_id [Integer] The attribute definition Id
|
|
26
|
+
# @param data_type [String]
|
|
27
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
28
|
+
# @param region [String] The data center region the data resides in
|
|
29
|
+
# @param [Hash] opts the optional parameters
|
|
30
|
+
# @return [ODataResponseOfBoolean]
|
|
31
|
+
def attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid(asset_model_id, definition_id, data_type, tenant_id, region, opts = {})
|
|
32
|
+
data, _status_code, _headers = attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid_with_http_info(asset_model_id, definition_id, data_type, tenant_id, region, opts)
|
|
33
|
+
data
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Change the underlying data type for the attribute, migrating any existing data where possible
|
|
37
|
+
# <span style='font-size: 17px;'>Summary:</span>Change the underlying data type for the attribute, migrating any existing data where possible.<br/>This operation will attempt to generate new typed data values from the current value. Note this may result in an empty value if no conversion can be made - however the original values will be kept allowing the process to be reversed, so this is not permanently lossy. <br />E.g. converting Text value '15' to a Real or Integer will produce expected results, but an original value of 'FIVE' would fail to parse. <br /> Equally, some conversions make little sense, such as Logical converting to Date, and will be rejected..<br/>Return Type: <b>ODataResponseOfBoolean</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/>
|
|
38
|
+
# @param asset_model_id [Integer] The model Id
|
|
39
|
+
# @param definition_id [Integer] The attribute definition Id
|
|
40
|
+
# @param data_type [String]
|
|
41
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
42
|
+
# @param region [String] The data center region the data resides in
|
|
43
|
+
# @param [Hash] opts the optional parameters
|
|
44
|
+
# @return [Array<(ODataResponseOfBoolean, Integer, Hash)>] ODataResponseOfBoolean data, response status code and response headers
|
|
45
|
+
def attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid_with_http_info(asset_model_id, definition_id, data_type, tenant_id, region, opts = {})
|
|
46
|
+
if @api_client.config.debugging
|
|
47
|
+
@api_client.config.logger.debug 'Calling API: AttributesApi.attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid ...'
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'asset_model_id' is set
|
|
50
|
+
if @api_client.config.client_side_validation && asset_model_id.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'asset_model_id' when calling AttributesApi.attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid"
|
|
52
|
+
end
|
|
53
|
+
# verify the required parameter 'definition_id' is set
|
|
54
|
+
if @api_client.config.client_side_validation && definition_id.nil?
|
|
55
|
+
fail ArgumentError, "Missing the required parameter 'definition_id' when calling AttributesApi.attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid"
|
|
56
|
+
end
|
|
57
|
+
# verify the required parameter 'data_type' is set
|
|
58
|
+
if @api_client.config.client_side_validation && data_type.nil?
|
|
59
|
+
fail ArgumentError, "Missing the required parameter 'data_type' when calling AttributesApi.attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid"
|
|
60
|
+
end
|
|
61
|
+
# verify enum value
|
|
62
|
+
allowable_values = ["Integer", "Real", "Date", "Logical", "Text"]
|
|
63
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(data_type)
|
|
64
|
+
fail ArgumentError, "invalid value for \"data_type\", must be one of #{allowable_values}"
|
|
65
|
+
end
|
|
66
|
+
# verify the required parameter 'tenant_id' is set
|
|
67
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
68
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AttributesApi.attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid"
|
|
69
|
+
end
|
|
70
|
+
# verify the required parameter 'region' is set
|
|
71
|
+
if @api_client.config.client_side_validation && region.nil?
|
|
72
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AttributesApi.attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid"
|
|
73
|
+
end
|
|
74
|
+
# verify enum value
|
|
75
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
|
76
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
|
77
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
|
78
|
+
end
|
|
79
|
+
# resource path
|
|
80
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Attributes(AssetModelId={assetModelId},AttributeDefinitionId={definitionId})/ChangeDataType()'.sub('{' + 'assetModelId' + '}', CGI.escape(asset_model_id.to_s)).sub('{' + 'definitionId' + '}', CGI.escape(definition_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
|
81
|
+
|
|
82
|
+
# query parameters
|
|
83
|
+
query_params = opts[:query_params] || {}
|
|
84
|
+
query_params[:'dataType'] = data_type
|
|
85
|
+
|
|
86
|
+
# header parameters
|
|
87
|
+
header_params = opts[:header_params] || {}
|
|
88
|
+
# HTTP header 'Accept' (if needed)
|
|
89
|
+
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'])
|
|
90
|
+
|
|
91
|
+
# form parameters
|
|
92
|
+
form_params = opts[:form_params] || {}
|
|
93
|
+
|
|
94
|
+
# http body (model)
|
|
95
|
+
post_body = opts[:debug_body]
|
|
96
|
+
|
|
97
|
+
# return_type
|
|
98
|
+
return_type = opts[:debug_return_type] || 'ODataResponseOfBoolean'
|
|
99
|
+
|
|
100
|
+
# auth_names
|
|
101
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
102
|
+
|
|
103
|
+
new_options = opts.merge(
|
|
104
|
+
:operation => :"AttributesApi.attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid",
|
|
105
|
+
:header_params => header_params,
|
|
106
|
+
:query_params => query_params,
|
|
107
|
+
:form_params => form_params,
|
|
108
|
+
:body => post_body,
|
|
109
|
+
:auth_names => auth_names,
|
|
110
|
+
:return_type => return_type
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
114
|
+
if @api_client.config.debugging
|
|
115
|
+
@api_client.config.logger.debug "API called: AttributesApi#attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
116
|
+
end
|
|
117
|
+
return data, status_code, headers
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Operation to interrogate a single attribute definition
|
|
121
|
+
# <span style='font-size: 17px;'>Summary:</span>Operation to interrogate a single attribute definition.<br/>This service returns a single attribute definition for the provided keys, or responds with a not found (404).<br/>Return Type: <b>AttributeDefinitionEntity</b><br/><br/>
|
|
122
|
+
# @param asset_model_id [Integer] The model Id
|
|
123
|
+
# @param definition_id [Integer] The attribute definition ID
|
|
124
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
125
|
+
# @param region [String] The data center region the data resides in
|
|
126
|
+
# @param [Hash] opts the optional parameters
|
|
127
|
+
# @option opts [String] :expand Expands related entities inline.
|
|
128
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
|
129
|
+
# @return [AttributeDefinitionEntity]
|
|
130
|
+
def attributes_get_by_assetmodelid_and_definitionid_and_tenantid(asset_model_id, definition_id, tenant_id, region, opts = {})
|
|
131
|
+
data, _status_code, _headers = attributes_get_by_assetmodelid_and_definitionid_and_tenantid_with_http_info(asset_model_id, definition_id, tenant_id, region, opts)
|
|
132
|
+
data
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Operation to interrogate a single attribute definition
|
|
136
|
+
# <span style='font-size: 17px;'>Summary:</span>Operation to interrogate a single attribute definition.<br/>This service returns a single attribute definition for the provided keys, or responds with a not found (404).<br/>Return Type: <b>AttributeDefinitionEntity</b><br/><br/>
|
|
137
|
+
# @param asset_model_id [Integer] The model Id
|
|
138
|
+
# @param definition_id [Integer] The attribute definition ID
|
|
139
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
140
|
+
# @param region [String] The data center region the data resides in
|
|
141
|
+
# @param [Hash] opts the optional parameters
|
|
142
|
+
# @option opts [String] :expand Expands related entities inline.
|
|
143
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
|
144
|
+
# @return [Array<(AttributeDefinitionEntity, Integer, Hash)>] AttributeDefinitionEntity data, response status code and response headers
|
|
145
|
+
def attributes_get_by_assetmodelid_and_definitionid_and_tenantid_with_http_info(asset_model_id, definition_id, tenant_id, region, opts = {})
|
|
146
|
+
if @api_client.config.debugging
|
|
147
|
+
@api_client.config.logger.debug 'Calling API: AttributesApi.attributes_get_by_assetmodelid_and_definitionid_and_tenantid ...'
|
|
148
|
+
end
|
|
149
|
+
# verify the required parameter 'asset_model_id' is set
|
|
150
|
+
if @api_client.config.client_side_validation && asset_model_id.nil?
|
|
151
|
+
fail ArgumentError, "Missing the required parameter 'asset_model_id' when calling AttributesApi.attributes_get_by_assetmodelid_and_definitionid_and_tenantid"
|
|
152
|
+
end
|
|
153
|
+
# verify the required parameter 'definition_id' is set
|
|
154
|
+
if @api_client.config.client_side_validation && definition_id.nil?
|
|
155
|
+
fail ArgumentError, "Missing the required parameter 'definition_id' when calling AttributesApi.attributes_get_by_assetmodelid_and_definitionid_and_tenantid"
|
|
156
|
+
end
|
|
157
|
+
# verify the required parameter 'tenant_id' is set
|
|
158
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
159
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AttributesApi.attributes_get_by_assetmodelid_and_definitionid_and_tenantid"
|
|
160
|
+
end
|
|
161
|
+
# verify the required parameter 'region' is set
|
|
162
|
+
if @api_client.config.client_side_validation && region.nil?
|
|
163
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AttributesApi.attributes_get_by_assetmodelid_and_definitionid_and_tenantid"
|
|
164
|
+
end
|
|
165
|
+
# verify enum value
|
|
166
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
|
167
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
|
168
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
|
169
|
+
end
|
|
170
|
+
# resource path
|
|
171
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Attributes(AssetModelId={assetModelId},AttributeDefinitionId={definitionId})'.sub('{' + 'assetModelId' + '}', CGI.escape(asset_model_id.to_s)).sub('{' + 'definitionId' + '}', CGI.escape(definition_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
|
172
|
+
|
|
173
|
+
# query parameters
|
|
174
|
+
query_params = opts[:query_params] || {}
|
|
175
|
+
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
|
176
|
+
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
|
|
177
|
+
|
|
178
|
+
# header parameters
|
|
179
|
+
header_params = opts[:header_params] || {}
|
|
180
|
+
# HTTP header 'Accept' (if needed)
|
|
181
|
+
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'])
|
|
182
|
+
|
|
183
|
+
# form parameters
|
|
184
|
+
form_params = opts[:form_params] || {}
|
|
185
|
+
|
|
186
|
+
# http body (model)
|
|
187
|
+
post_body = opts[:debug_body]
|
|
188
|
+
|
|
189
|
+
# return_type
|
|
190
|
+
return_type = opts[:debug_return_type] || 'AttributeDefinitionEntity'
|
|
191
|
+
|
|
192
|
+
# auth_names
|
|
193
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
194
|
+
|
|
195
|
+
new_options = opts.merge(
|
|
196
|
+
:operation => :"AttributesApi.attributes_get_by_assetmodelid_and_definitionid_and_tenantid",
|
|
197
|
+
:header_params => header_params,
|
|
198
|
+
:query_params => query_params,
|
|
199
|
+
:form_params => form_params,
|
|
200
|
+
:body => post_body,
|
|
201
|
+
:auth_names => auth_names,
|
|
202
|
+
:return_type => return_type
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
206
|
+
if @api_client.config.debugging
|
|
207
|
+
@api_client.config.logger.debug "API called: AttributesApi#attributes_get_by_assetmodelid_and_definitionid_and_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
208
|
+
end
|
|
209
|
+
return data, status_code, headers
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Returns the EntitySet Attributes
|
|
213
|
+
# <span style='font-size: 17px;'>Summary:</span>Returns the EntitySet Attributes.<br/>Return Type: <b>ODataListResponseOfAttributeDefinitionEntity</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/>
|
|
214
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
215
|
+
# @param region [String] The data center region the data resides in
|
|
216
|
+
# @param [Hash] opts the optional parameters
|
|
217
|
+
# @option opts [String] :expand Expands related entities inline.
|
|
218
|
+
# @option opts [String] :filter Filters the results, based on a Boolean condition.
|
|
219
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
|
220
|
+
# @option opts [String] :orderby Sorts the results.
|
|
221
|
+
# @option opts [Integer] :top Returns only the first n results.
|
|
222
|
+
# @option opts [Integer] :skip Skips the first n results.
|
|
223
|
+
# @option opts [Boolean] :count Includes a count of the matching results in the response.
|
|
224
|
+
# @return [ODataListResponseOfAttributeDefinitionEntity]
|
|
225
|
+
def attributes_get_by_tenantid(tenant_id, region, opts = {})
|
|
226
|
+
data, _status_code, _headers = attributes_get_by_tenantid_with_http_info(tenant_id, region, opts)
|
|
227
|
+
data
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Returns the EntitySet Attributes
|
|
231
|
+
# <span style='font-size: 17px;'>Summary:</span>Returns the EntitySet Attributes.<br/>Return Type: <b>ODataListResponseOfAttributeDefinitionEntity</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/>
|
|
232
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
233
|
+
# @param region [String] The data center region the data resides in
|
|
234
|
+
# @param [Hash] opts the optional parameters
|
|
235
|
+
# @option opts [String] :expand Expands related entities inline.
|
|
236
|
+
# @option opts [String] :filter Filters the results, based on a Boolean condition.
|
|
237
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
|
238
|
+
# @option opts [String] :orderby Sorts the results.
|
|
239
|
+
# @option opts [Integer] :top Returns only the first n results.
|
|
240
|
+
# @option opts [Integer] :skip Skips the first n results.
|
|
241
|
+
# @option opts [Boolean] :count Includes a count of the matching results in the response.
|
|
242
|
+
# @return [Array<(ODataListResponseOfAttributeDefinitionEntity, Integer, Hash)>] ODataListResponseOfAttributeDefinitionEntity data, response status code and response headers
|
|
243
|
+
def attributes_get_by_tenantid_with_http_info(tenant_id, region, opts = {})
|
|
244
|
+
if @api_client.config.debugging
|
|
245
|
+
@api_client.config.logger.debug 'Calling API: AttributesApi.attributes_get_by_tenantid ...'
|
|
246
|
+
end
|
|
247
|
+
# verify the required parameter 'tenant_id' is set
|
|
248
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
249
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AttributesApi.attributes_get_by_tenantid"
|
|
250
|
+
end
|
|
251
|
+
# verify the required parameter 'region' is set
|
|
252
|
+
if @api_client.config.client_side_validation && region.nil?
|
|
253
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AttributesApi.attributes_get_by_tenantid"
|
|
254
|
+
end
|
|
255
|
+
# verify enum value
|
|
256
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
|
257
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
|
258
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
|
259
|
+
end
|
|
260
|
+
# resource path
|
|
261
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Attributes'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
|
262
|
+
|
|
263
|
+
# query parameters
|
|
264
|
+
query_params = opts[:query_params] || {}
|
|
265
|
+
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
|
266
|
+
query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
|
267
|
+
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
|
|
268
|
+
query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
|
|
269
|
+
query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
|
|
270
|
+
query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
|
271
|
+
query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
272
|
+
|
|
273
|
+
# header parameters
|
|
274
|
+
header_params = opts[:header_params] || {}
|
|
275
|
+
# HTTP header 'Accept' (if needed)
|
|
276
|
+
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'])
|
|
277
|
+
|
|
278
|
+
# form parameters
|
|
279
|
+
form_params = opts[:form_params] || {}
|
|
280
|
+
|
|
281
|
+
# http body (model)
|
|
282
|
+
post_body = opts[:debug_body]
|
|
283
|
+
|
|
284
|
+
# return_type
|
|
285
|
+
return_type = opts[:debug_return_type] || 'ODataListResponseOfAttributeDefinitionEntity'
|
|
286
|
+
|
|
287
|
+
# auth_names
|
|
288
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
289
|
+
|
|
290
|
+
new_options = opts.merge(
|
|
291
|
+
:operation => :"AttributesApi.attributes_get_by_tenantid",
|
|
292
|
+
:header_params => header_params,
|
|
293
|
+
:query_params => query_params,
|
|
294
|
+
:form_params => form_params,
|
|
295
|
+
:body => post_body,
|
|
296
|
+
:auth_names => auth_names,
|
|
297
|
+
:return_type => return_type
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
301
|
+
if @api_client.config.debugging
|
|
302
|
+
@api_client.config.logger.debug "API called: AttributesApi#attributes_get_by_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
303
|
+
end
|
|
304
|
+
return data, status_code, headers
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# Gets a sample of the attribute values for the definition
|
|
308
|
+
# <span style='font-size: 17px;'>Summary:</span>Gets a sample of the attribute values for the definition.<br/>Return Type: <b>ODataListResponseOfComplexValueBase</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/>
|
|
309
|
+
# @param asset_model_id [Integer] The model Id
|
|
310
|
+
# @param definition_id [Integer] The attribute definition Id
|
|
311
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
312
|
+
# @param region [String] The data center region the data resides in
|
|
313
|
+
# @param [Hash] opts the optional parameters
|
|
314
|
+
# @option opts [String] :expand Expands related entities inline.
|
|
315
|
+
# @option opts [String] :filter Filters the results, based on a Boolean condition.
|
|
316
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
|
317
|
+
# @option opts [String] :orderby Sorts the results.
|
|
318
|
+
# @option opts [Integer] :top Returns only the first n results.
|
|
319
|
+
# @option opts [Integer] :skip Skips the first n results.
|
|
320
|
+
# @option opts [Boolean] :count Includes a count of the matching results in the response.
|
|
321
|
+
# @return [ODataListResponseOfComplexValueBase]
|
|
322
|
+
def attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid(asset_model_id, definition_id, tenant_id, region, opts = {})
|
|
323
|
+
data, _status_code, _headers = attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid_with_http_info(asset_model_id, definition_id, tenant_id, region, opts)
|
|
324
|
+
data
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Gets a sample of the attribute values for the definition
|
|
328
|
+
# <span style='font-size: 17px;'>Summary:</span>Gets a sample of the attribute values for the definition.<br/>Return Type: <b>ODataListResponseOfComplexValueBase</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/>
|
|
329
|
+
# @param asset_model_id [Integer] The model Id
|
|
330
|
+
# @param definition_id [Integer] The attribute definition Id
|
|
331
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
332
|
+
# @param region [String] The data center region the data resides in
|
|
333
|
+
# @param [Hash] opts the optional parameters
|
|
334
|
+
# @option opts [String] :expand Expands related entities inline.
|
|
335
|
+
# @option opts [String] :filter Filters the results, based on a Boolean condition.
|
|
336
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
|
337
|
+
# @option opts [String] :orderby Sorts the results.
|
|
338
|
+
# @option opts [Integer] :top Returns only the first n results.
|
|
339
|
+
# @option opts [Integer] :skip Skips the first n results.
|
|
340
|
+
# @option opts [Boolean] :count Includes a count of the matching results in the response.
|
|
341
|
+
# @return [Array<(ODataListResponseOfComplexValueBase, Integer, Hash)>] ODataListResponseOfComplexValueBase data, response status code and response headers
|
|
342
|
+
def attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid_with_http_info(asset_model_id, definition_id, tenant_id, region, opts = {})
|
|
343
|
+
if @api_client.config.debugging
|
|
344
|
+
@api_client.config.logger.debug 'Calling API: AttributesApi.attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid ...'
|
|
345
|
+
end
|
|
346
|
+
# verify the required parameter 'asset_model_id' is set
|
|
347
|
+
if @api_client.config.client_side_validation && asset_model_id.nil?
|
|
348
|
+
fail ArgumentError, "Missing the required parameter 'asset_model_id' when calling AttributesApi.attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid"
|
|
349
|
+
end
|
|
350
|
+
# verify the required parameter 'definition_id' is set
|
|
351
|
+
if @api_client.config.client_side_validation && definition_id.nil?
|
|
352
|
+
fail ArgumentError, "Missing the required parameter 'definition_id' when calling AttributesApi.attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid"
|
|
353
|
+
end
|
|
354
|
+
# verify the required parameter 'tenant_id' is set
|
|
355
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
356
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AttributesApi.attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid"
|
|
357
|
+
end
|
|
358
|
+
# verify the required parameter 'region' is set
|
|
359
|
+
if @api_client.config.client_side_validation && region.nil?
|
|
360
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AttributesApi.attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid"
|
|
361
|
+
end
|
|
362
|
+
# verify enum value
|
|
363
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
|
364
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
|
365
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
|
366
|
+
end
|
|
367
|
+
# resource path
|
|
368
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Attributes(AssetModelId={assetModelId},AttributeDefinitionId={definitionId})/GetModelValues()'.sub('{' + 'assetModelId' + '}', CGI.escape(asset_model_id.to_s)).sub('{' + 'definitionId' + '}', CGI.escape(definition_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
|
369
|
+
|
|
370
|
+
# query parameters
|
|
371
|
+
query_params = opts[:query_params] || {}
|
|
372
|
+
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
|
373
|
+
query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
|
374
|
+
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
|
|
375
|
+
query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
|
|
376
|
+
query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
|
|
377
|
+
query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
|
378
|
+
query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
379
|
+
|
|
380
|
+
# header parameters
|
|
381
|
+
header_params = opts[:header_params] || {}
|
|
382
|
+
# HTTP header 'Accept' (if needed)
|
|
383
|
+
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'])
|
|
384
|
+
|
|
385
|
+
# form parameters
|
|
386
|
+
form_params = opts[:form_params] || {}
|
|
387
|
+
|
|
388
|
+
# http body (model)
|
|
389
|
+
post_body = opts[:debug_body]
|
|
390
|
+
|
|
391
|
+
# return_type
|
|
392
|
+
return_type = opts[:debug_return_type] || 'ODataListResponseOfComplexValueBase'
|
|
393
|
+
|
|
394
|
+
# auth_names
|
|
395
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
396
|
+
|
|
397
|
+
new_options = opts.merge(
|
|
398
|
+
:operation => :"AttributesApi.attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid",
|
|
399
|
+
:header_params => header_params,
|
|
400
|
+
:query_params => query_params,
|
|
401
|
+
:form_params => form_params,
|
|
402
|
+
:body => post_body,
|
|
403
|
+
:auth_names => auth_names,
|
|
404
|
+
:return_type => return_type
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
408
|
+
if @api_client.config.debugging
|
|
409
|
+
@api_client.config.logger.debug "API called: AttributesApi#attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
410
|
+
end
|
|
411
|
+
return data, status_code, headers
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Gets the unimported attribute values for an entity from the source model
|
|
415
|
+
# <span style='font-size: 17px;'>Summary:</span>Gets the unimported attribute values for an entity from the source model.<br/>Can be used to see values not yet imported.<br/>Return Type: <b>ODataListResponseOfAttributeValue</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/>
|
|
416
|
+
# @param asset_model_id [Integer] The model Id
|
|
417
|
+
# @param entity_id [Integer] The entity Id
|
|
418
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
419
|
+
# @param region [String] The data center region the data resides in
|
|
420
|
+
# @param [Hash] opts the optional parameters
|
|
421
|
+
# @option opts [String] :expand Expands related entities inline.
|
|
422
|
+
# @option opts [String] :filter Filters the results, based on a Boolean condition.
|
|
423
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
|
424
|
+
# @option opts [String] :orderby Sorts the results.
|
|
425
|
+
# @option opts [Integer] :top Returns only the first n results.
|
|
426
|
+
# @option opts [Integer] :skip Skips the first n results.
|
|
427
|
+
# @option opts [Boolean] :count Includes a count of the matching results in the response.
|
|
428
|
+
# @return [ODataListResponseOfAttributeValue]
|
|
429
|
+
def attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid(asset_model_id, entity_id, tenant_id, region, opts = {})
|
|
430
|
+
data, _status_code, _headers = attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid_with_http_info(asset_model_id, entity_id, tenant_id, region, opts)
|
|
431
|
+
data
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# Gets the unimported attribute values for an entity from the source model
|
|
435
|
+
# <span style='font-size: 17px;'>Summary:</span>Gets the unimported attribute values for an entity from the source model.<br/>Can be used to see values not yet imported.<br/>Return Type: <b>ODataListResponseOfAttributeValue</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/>
|
|
436
|
+
# @param asset_model_id [Integer] The model Id
|
|
437
|
+
# @param entity_id [Integer] The entity Id
|
|
438
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
439
|
+
# @param region [String] The data center region the data resides in
|
|
440
|
+
# @param [Hash] opts the optional parameters
|
|
441
|
+
# @option opts [String] :expand Expands related entities inline.
|
|
442
|
+
# @option opts [String] :filter Filters the results, based on a Boolean condition.
|
|
443
|
+
# @option opts [String] :select Selects which properties to include in the response.
|
|
444
|
+
# @option opts [String] :orderby Sorts the results.
|
|
445
|
+
# @option opts [Integer] :top Returns only the first n results.
|
|
446
|
+
# @option opts [Integer] :skip Skips the first n results.
|
|
447
|
+
# @option opts [Boolean] :count Includes a count of the matching results in the response.
|
|
448
|
+
# @return [Array<(ODataListResponseOfAttributeValue, Integer, Hash)>] ODataListResponseOfAttributeValue data, response status code and response headers
|
|
449
|
+
def attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid_with_http_info(asset_model_id, entity_id, tenant_id, region, opts = {})
|
|
450
|
+
if @api_client.config.debugging
|
|
451
|
+
@api_client.config.logger.debug 'Calling API: AttributesApi.attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid ...'
|
|
452
|
+
end
|
|
453
|
+
# verify the required parameter 'asset_model_id' is set
|
|
454
|
+
if @api_client.config.client_side_validation && asset_model_id.nil?
|
|
455
|
+
fail ArgumentError, "Missing the required parameter 'asset_model_id' when calling AttributesApi.attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid"
|
|
456
|
+
end
|
|
457
|
+
# verify the required parameter 'entity_id' is set
|
|
458
|
+
if @api_client.config.client_side_validation && entity_id.nil?
|
|
459
|
+
fail ArgumentError, "Missing the required parameter 'entity_id' when calling AttributesApi.attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid"
|
|
460
|
+
end
|
|
461
|
+
# verify the required parameter 'tenant_id' is set
|
|
462
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
463
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AttributesApi.attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid"
|
|
464
|
+
end
|
|
465
|
+
# verify the required parameter 'region' is set
|
|
466
|
+
if @api_client.config.client_side_validation && region.nil?
|
|
467
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AttributesApi.attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid"
|
|
468
|
+
end
|
|
469
|
+
# verify enum value
|
|
470
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
|
471
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
|
472
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
|
473
|
+
end
|
|
474
|
+
# resource path
|
|
475
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Attributes/GetValuesForEntity(assetModelId={assetModelId},entityId={entityId})'.sub('{' + 'assetModelId' + '}', CGI.escape(asset_model_id.to_s)).sub('{' + 'entityId' + '}', CGI.escape(entity_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
|
476
|
+
|
|
477
|
+
# query parameters
|
|
478
|
+
query_params = opts[:query_params] || {}
|
|
479
|
+
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
|
480
|
+
query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
|
481
|
+
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
|
|
482
|
+
query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
|
|
483
|
+
query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
|
|
484
|
+
query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
|
485
|
+
query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
486
|
+
|
|
487
|
+
# header parameters
|
|
488
|
+
header_params = opts[:header_params] || {}
|
|
489
|
+
# HTTP header 'Accept' (if needed)
|
|
490
|
+
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'])
|
|
491
|
+
|
|
492
|
+
# form parameters
|
|
493
|
+
form_params = opts[:form_params] || {}
|
|
494
|
+
|
|
495
|
+
# http body (model)
|
|
496
|
+
post_body = opts[:debug_body]
|
|
497
|
+
|
|
498
|
+
# return_type
|
|
499
|
+
return_type = opts[:debug_return_type] || 'ODataListResponseOfAttributeValue'
|
|
500
|
+
|
|
501
|
+
# auth_names
|
|
502
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
503
|
+
|
|
504
|
+
new_options = opts.merge(
|
|
505
|
+
:operation => :"AttributesApi.attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid",
|
|
506
|
+
:header_params => header_params,
|
|
507
|
+
:query_params => query_params,
|
|
508
|
+
:form_params => form_params,
|
|
509
|
+
:body => post_body,
|
|
510
|
+
:auth_names => auth_names,
|
|
511
|
+
:return_type => return_type
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
515
|
+
if @api_client.config.debugging
|
|
516
|
+
@api_client.config.logger.debug "API called: AttributesApi#attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
517
|
+
end
|
|
518
|
+
return data, status_code, headers
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
# Imports attribute values from the source model file
|
|
522
|
+
# <span style='font-size: 17px;'>Summary:</span>Imports attribute values from the source model file.<br/>Return Type: <b>ODataResponseOfBoolean</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/>
|
|
523
|
+
# @param asset_model_id [Integer] The model Id
|
|
524
|
+
# @param definition_id [Integer] The attribute definition Id
|
|
525
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
526
|
+
# @param region [String] The data center region the data resides in
|
|
527
|
+
# @param [Hash] opts the optional parameters
|
|
528
|
+
# @return [ODataResponseOfBoolean]
|
|
529
|
+
def attributes_import_by_assetmodelid_and_definitionid_and_tenantid(asset_model_id, definition_id, tenant_id, region, opts = {})
|
|
530
|
+
data, _status_code, _headers = attributes_import_by_assetmodelid_and_definitionid_and_tenantid_with_http_info(asset_model_id, definition_id, tenant_id, region, opts)
|
|
531
|
+
data
|
|
532
|
+
end
|
|
533
|
+
|
|
534
|
+
# Imports attribute values from the source model file
|
|
535
|
+
# <span style='font-size: 17px;'>Summary:</span>Imports attribute values from the source model file.<br/>Return Type: <b>ODataResponseOfBoolean</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/>
|
|
536
|
+
# @param asset_model_id [Integer] The model Id
|
|
537
|
+
# @param definition_id [Integer] The attribute definition Id
|
|
538
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
539
|
+
# @param region [String] The data center region the data resides in
|
|
540
|
+
# @param [Hash] opts the optional parameters
|
|
541
|
+
# @return [Array<(ODataResponseOfBoolean, Integer, Hash)>] ODataResponseOfBoolean data, response status code and response headers
|
|
542
|
+
def attributes_import_by_assetmodelid_and_definitionid_and_tenantid_with_http_info(asset_model_id, definition_id, tenant_id, region, opts = {})
|
|
543
|
+
if @api_client.config.debugging
|
|
544
|
+
@api_client.config.logger.debug 'Calling API: AttributesApi.attributes_import_by_assetmodelid_and_definitionid_and_tenantid ...'
|
|
545
|
+
end
|
|
546
|
+
# verify the required parameter 'asset_model_id' is set
|
|
547
|
+
if @api_client.config.client_side_validation && asset_model_id.nil?
|
|
548
|
+
fail ArgumentError, "Missing the required parameter 'asset_model_id' when calling AttributesApi.attributes_import_by_assetmodelid_and_definitionid_and_tenantid"
|
|
549
|
+
end
|
|
550
|
+
# verify the required parameter 'definition_id' is set
|
|
551
|
+
if @api_client.config.client_side_validation && definition_id.nil?
|
|
552
|
+
fail ArgumentError, "Missing the required parameter 'definition_id' when calling AttributesApi.attributes_import_by_assetmodelid_and_definitionid_and_tenantid"
|
|
553
|
+
end
|
|
554
|
+
# verify the required parameter 'tenant_id' is set
|
|
555
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
556
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AttributesApi.attributes_import_by_assetmodelid_and_definitionid_and_tenantid"
|
|
557
|
+
end
|
|
558
|
+
# verify the required parameter 'region' is set
|
|
559
|
+
if @api_client.config.client_side_validation && region.nil?
|
|
560
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AttributesApi.attributes_import_by_assetmodelid_and_definitionid_and_tenantid"
|
|
561
|
+
end
|
|
562
|
+
# verify enum value
|
|
563
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
|
564
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
|
565
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
|
566
|
+
end
|
|
567
|
+
# resource path
|
|
568
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Attributes(AssetModelId={assetModelId},AttributeDefinitionId={definitionId})/Import()'.sub('{' + 'assetModelId' + '}', CGI.escape(asset_model_id.to_s)).sub('{' + 'definitionId' + '}', CGI.escape(definition_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
|
569
|
+
|
|
570
|
+
# query parameters
|
|
571
|
+
query_params = opts[:query_params] || {}
|
|
572
|
+
|
|
573
|
+
# header parameters
|
|
574
|
+
header_params = opts[:header_params] || {}
|
|
575
|
+
# HTTP header 'Accept' (if needed)
|
|
576
|
+
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'])
|
|
577
|
+
|
|
578
|
+
# form parameters
|
|
579
|
+
form_params = opts[:form_params] || {}
|
|
580
|
+
|
|
581
|
+
# http body (model)
|
|
582
|
+
post_body = opts[:debug_body]
|
|
583
|
+
|
|
584
|
+
# return_type
|
|
585
|
+
return_type = opts[:debug_return_type] || 'ODataResponseOfBoolean'
|
|
586
|
+
|
|
587
|
+
# auth_names
|
|
588
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
589
|
+
|
|
590
|
+
new_options = opts.merge(
|
|
591
|
+
:operation => :"AttributesApi.attributes_import_by_assetmodelid_and_definitionid_and_tenantid",
|
|
592
|
+
:header_params => header_params,
|
|
593
|
+
:query_params => query_params,
|
|
594
|
+
:form_params => form_params,
|
|
595
|
+
:body => post_body,
|
|
596
|
+
:auth_names => auth_names,
|
|
597
|
+
:return_type => return_type
|
|
598
|
+
)
|
|
599
|
+
|
|
600
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
601
|
+
if @api_client.config.debugging
|
|
602
|
+
@api_client.config.logger.debug "API called: AttributesApi#attributes_import_by_assetmodelid_and_definitionid_and_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
603
|
+
end
|
|
604
|
+
return data, status_code, headers
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
# Update an AttributeDefinition for a model
|
|
608
|
+
# <span style='font-size: 17px;'>Summary:</span>Update an AttributeDefinition for a model.<br/>'EditPermissions' for a model is required to amend an attribute.<br/>Return Type: <b>AttributeDefinitionEntity</b><br/><br/>
|
|
609
|
+
# @param asset_model_id [Integer]
|
|
610
|
+
# @param definition_id [Integer]
|
|
611
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
612
|
+
# @param region [String] The data center region the data resides in
|
|
613
|
+
# @param patch [AttributeDefinitionEdit]
|
|
614
|
+
# @param [Hash] opts the optional parameters
|
|
615
|
+
# @return [AttributeDefinitionEntity]
|
|
616
|
+
def attributes_patch_by_assetmodelid_and_definitionid_and_tenantid(asset_model_id, definition_id, tenant_id, region, patch, opts = {})
|
|
617
|
+
data, _status_code, _headers = attributes_patch_by_assetmodelid_and_definitionid_and_tenantid_with_http_info(asset_model_id, definition_id, tenant_id, region, patch, opts)
|
|
618
|
+
data
|
|
619
|
+
end
|
|
620
|
+
|
|
621
|
+
# Update an AttributeDefinition for a model
|
|
622
|
+
# <span style='font-size: 17px;'>Summary:</span>Update an AttributeDefinition for a model.<br/>'EditPermissions' for a model is required to amend an attribute.<br/>Return Type: <b>AttributeDefinitionEntity</b><br/><br/>
|
|
623
|
+
# @param asset_model_id [Integer]
|
|
624
|
+
# @param definition_id [Integer]
|
|
625
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
626
|
+
# @param region [String] The data center region the data resides in
|
|
627
|
+
# @param patch [AttributeDefinitionEdit]
|
|
628
|
+
# @param [Hash] opts the optional parameters
|
|
629
|
+
# @return [Array<(AttributeDefinitionEntity, Integer, Hash)>] AttributeDefinitionEntity data, response status code and response headers
|
|
630
|
+
def attributes_patch_by_assetmodelid_and_definitionid_and_tenantid_with_http_info(asset_model_id, definition_id, tenant_id, region, patch, opts = {})
|
|
631
|
+
if @api_client.config.debugging
|
|
632
|
+
@api_client.config.logger.debug 'Calling API: AttributesApi.attributes_patch_by_assetmodelid_and_definitionid_and_tenantid ...'
|
|
633
|
+
end
|
|
634
|
+
# verify the required parameter 'asset_model_id' is set
|
|
635
|
+
if @api_client.config.client_side_validation && asset_model_id.nil?
|
|
636
|
+
fail ArgumentError, "Missing the required parameter 'asset_model_id' when calling AttributesApi.attributes_patch_by_assetmodelid_and_definitionid_and_tenantid"
|
|
637
|
+
end
|
|
638
|
+
# verify the required parameter 'definition_id' is set
|
|
639
|
+
if @api_client.config.client_side_validation && definition_id.nil?
|
|
640
|
+
fail ArgumentError, "Missing the required parameter 'definition_id' when calling AttributesApi.attributes_patch_by_assetmodelid_and_definitionid_and_tenantid"
|
|
641
|
+
end
|
|
642
|
+
# verify the required parameter 'tenant_id' is set
|
|
643
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
644
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AttributesApi.attributes_patch_by_assetmodelid_and_definitionid_and_tenantid"
|
|
645
|
+
end
|
|
646
|
+
# verify the required parameter 'region' is set
|
|
647
|
+
if @api_client.config.client_side_validation && region.nil?
|
|
648
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AttributesApi.attributes_patch_by_assetmodelid_and_definitionid_and_tenantid"
|
|
649
|
+
end
|
|
650
|
+
# verify enum value
|
|
651
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
|
652
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
|
653
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
|
654
|
+
end
|
|
655
|
+
# verify the required parameter 'patch' is set
|
|
656
|
+
if @api_client.config.client_side_validation && patch.nil?
|
|
657
|
+
fail ArgumentError, "Missing the required parameter 'patch' when calling AttributesApi.attributes_patch_by_assetmodelid_and_definitionid_and_tenantid"
|
|
658
|
+
end
|
|
659
|
+
# resource path
|
|
660
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Attributes(AssetModelId={assetModelId},AttributeDefinitionId={definitionId})'.sub('{' + 'assetModelId' + '}', CGI.escape(asset_model_id.to_s)).sub('{' + 'definitionId' + '}', CGI.escape(definition_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
|
661
|
+
|
|
662
|
+
# query parameters
|
|
663
|
+
query_params = opts[:query_params] || {}
|
|
664
|
+
|
|
665
|
+
# header parameters
|
|
666
|
+
header_params = opts[:header_params] || {}
|
|
667
|
+
# HTTP header 'Accept' (if needed)
|
|
668
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
669
|
+
# HTTP header 'Content-Type'
|
|
670
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
671
|
+
if !content_type.nil?
|
|
672
|
+
header_params['Content-Type'] = content_type
|
|
673
|
+
end
|
|
674
|
+
|
|
675
|
+
# form parameters
|
|
676
|
+
form_params = opts[:form_params] || {}
|
|
677
|
+
|
|
678
|
+
# http body (model)
|
|
679
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patch)
|
|
680
|
+
|
|
681
|
+
# return_type
|
|
682
|
+
return_type = opts[:debug_return_type] || 'AttributeDefinitionEntity'
|
|
683
|
+
|
|
684
|
+
# auth_names
|
|
685
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
686
|
+
|
|
687
|
+
new_options = opts.merge(
|
|
688
|
+
:operation => :"AttributesApi.attributes_patch_by_assetmodelid_and_definitionid_and_tenantid",
|
|
689
|
+
:header_params => header_params,
|
|
690
|
+
:query_params => query_params,
|
|
691
|
+
:form_params => form_params,
|
|
692
|
+
:body => post_body,
|
|
693
|
+
:auth_names => auth_names,
|
|
694
|
+
:return_type => return_type
|
|
695
|
+
)
|
|
696
|
+
|
|
697
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
698
|
+
if @api_client.config.debugging
|
|
699
|
+
@api_client.config.logger.debug "API called: AttributesApi#attributes_patch_by_assetmodelid_and_definitionid_and_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
700
|
+
end
|
|
701
|
+
return data, status_code, headers
|
|
702
|
+
end
|
|
703
|
+
|
|
704
|
+
# Creates a new AttributeDefinition for a model
|
|
705
|
+
# <span style='font-size: 17px;'>Summary:</span>Creates a new AttributeDefinition for a model.<br/>'EditPermissions' for a model is required to create an attribute.<br/>Return Type: <b>AttributeDefinitionEntity</b><br/><br/>
|
|
706
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
707
|
+
# @param region [String] The data center region the data resides in
|
|
708
|
+
# @param attribute_definition_entity [AttributeDefinitionCreate] The entity to post
|
|
709
|
+
# @param [Hash] opts the optional parameters
|
|
710
|
+
# @return [AttributeDefinitionEntity]
|
|
711
|
+
def attributes_post_by_tenantid(tenant_id, region, attribute_definition_entity, opts = {})
|
|
712
|
+
data, _status_code, _headers = attributes_post_by_tenantid_with_http_info(tenant_id, region, attribute_definition_entity, opts)
|
|
713
|
+
data
|
|
714
|
+
end
|
|
715
|
+
|
|
716
|
+
# Creates a new AttributeDefinition for a model
|
|
717
|
+
# <span style='font-size: 17px;'>Summary:</span>Creates a new AttributeDefinition for a model.<br/>'EditPermissions' for a model is required to create an attribute.<br/>Return Type: <b>AttributeDefinitionEntity</b><br/><br/>
|
|
718
|
+
# @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
|
|
719
|
+
# @param region [String] The data center region the data resides in
|
|
720
|
+
# @param attribute_definition_entity [AttributeDefinitionCreate] The entity to post
|
|
721
|
+
# @param [Hash] opts the optional parameters
|
|
722
|
+
# @return [Array<(AttributeDefinitionEntity, Integer, Hash)>] AttributeDefinitionEntity data, response status code and response headers
|
|
723
|
+
def attributes_post_by_tenantid_with_http_info(tenant_id, region, attribute_definition_entity, opts = {})
|
|
724
|
+
if @api_client.config.debugging
|
|
725
|
+
@api_client.config.logger.debug 'Calling API: AttributesApi.attributes_post_by_tenantid ...'
|
|
726
|
+
end
|
|
727
|
+
# verify the required parameter 'tenant_id' is set
|
|
728
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
729
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling AttributesApi.attributes_post_by_tenantid"
|
|
730
|
+
end
|
|
731
|
+
# verify the required parameter 'region' is set
|
|
732
|
+
if @api_client.config.client_side_validation && region.nil?
|
|
733
|
+
fail ArgumentError, "Missing the required parameter 'region' when calling AttributesApi.attributes_post_by_tenantid"
|
|
734
|
+
end
|
|
735
|
+
# verify enum value
|
|
736
|
+
allowable_values = ["UK", "WestEurope", "Sandbox"]
|
|
737
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(region)
|
|
738
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
|
739
|
+
end
|
|
740
|
+
# verify the required parameter 'attribute_definition_entity' is set
|
|
741
|
+
if @api_client.config.client_side_validation && attribute_definition_entity.nil?
|
|
742
|
+
fail ArgumentError, "Missing the required parameter 'attribute_definition_entity' when calling AttributesApi.attributes_post_by_tenantid"
|
|
743
|
+
end
|
|
744
|
+
# resource path
|
|
745
|
+
local_var_path = '/{region}/aim/2.0/{tenantId}/Attributes'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s)).sub('{' + 'region' + '}', CGI.escape(region.to_s))
|
|
746
|
+
|
|
747
|
+
# query parameters
|
|
748
|
+
query_params = opts[:query_params] || {}
|
|
749
|
+
|
|
750
|
+
# header parameters
|
|
751
|
+
header_params = opts[:header_params] || {}
|
|
752
|
+
# HTTP header 'Accept' (if needed)
|
|
753
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
754
|
+
# HTTP header 'Content-Type'
|
|
755
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
756
|
+
if !content_type.nil?
|
|
757
|
+
header_params['Content-Type'] = content_type
|
|
758
|
+
end
|
|
759
|
+
|
|
760
|
+
# form parameters
|
|
761
|
+
form_params = opts[:form_params] || {}
|
|
762
|
+
|
|
763
|
+
# http body (model)
|
|
764
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(attribute_definition_entity)
|
|
765
|
+
|
|
766
|
+
# return_type
|
|
767
|
+
return_type = opts[:debug_return_type] || 'AttributeDefinitionEntity'
|
|
768
|
+
|
|
769
|
+
# auth_names
|
|
770
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
|
771
|
+
|
|
772
|
+
new_options = opts.merge(
|
|
773
|
+
:operation => :"AttributesApi.attributes_post_by_tenantid",
|
|
774
|
+
:header_params => header_params,
|
|
775
|
+
:query_params => query_params,
|
|
776
|
+
:form_params => form_params,
|
|
777
|
+
:body => post_body,
|
|
778
|
+
:auth_names => auth_names,
|
|
779
|
+
:return_type => return_type
|
|
780
|
+
)
|
|
781
|
+
|
|
782
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
783
|
+
if @api_client.config.debugging
|
|
784
|
+
@api_client.config.logger.debug "API called: AttributesApi#attributes_post_by_tenantid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
785
|
+
end
|
|
786
|
+
return data, status_code, headers
|
|
787
|
+
end
|
|
788
|
+
end
|
|
789
|
+
end
|