spacesContainedComponentsByAssetmodelidAndEntityidAndTenantidWithHttpInfo method

Future<Response> spacesContainedComponentsByAssetmodelidAndEntityidAndTenantidWithHttpInfo(
  1. int assetModelId,
  2. int entityId,
  3. String tenantId,
  4. String region, {
  5. String dollarExpand,
  6. String dollarFilter,
  7. String dollarSelect,
  8. String dollarOrderby,
  9. int dollarTop,
  10. int dollarSkip,
  11. bool dollarCount,
  12. double tolerance,
  13. bool inSameAsset,
})

Gets the set of Components which are placed within the Geometry footprint of this Space

Summary:Gets the set of Components which are placed within the Geometry footprint of this Space.
Returns all Components with geometry contained wholly or partly within the footprint of the space, and wholly or party within the Z-axis.
A 'tolerance' can be provided to extend or reduce the spaces included at the boundary of the space
.
Return Type: ODataListResponseOfComponent
For more information about OData responses link.

Note: This method returns the HTTP Response.

Parameters:

  • int assetModelId (required): The assetModel ID of the Space

  • int entityId (required): The ID of the space entity

  • String tenantId (required): The unique Tenant ID (UUID or Identifier string)

  • String region (required): The data center region the data resides in

  • String dollarExpand: Expands related entities inline.

  • String dollarFilter: Filters the results, based on a Boolean condition.

  • String dollarSelect: Selects which properties to include in the response.

  • String dollarOrderby: Sorts the results.

  • int dollarTop: Returns only the first n results.

  • int dollarSkip: Skips the first n results.

  • bool dollarCount: Includes a count of the matching results in the response.

  • double tolerance: Tolerance in millimeters. Can be negative. Default: 10mm

  • bool inSameAsset: Limit the results to spaces in the same Asset

Implementation

Future<Response> spacesContainedComponentsByAssetmodelidAndEntityidAndTenantidWithHttpInfo(int assetModelId, int entityId, String tenantId, String region, { String dollarExpand, String dollarFilter, String dollarSelect, String dollarOrderby, int dollarTop, int dollarSkip, bool dollarCount, double tolerance, bool inSameAsset, }) async {
  // Verify required params are set.
  if (assetModelId == null) {
   throw ApiException(HttpStatus.badRequest, 'Missing required param: assetModelId');
  }
  if (entityId == null) {
   throw ApiException(HttpStatus.badRequest, 'Missing required param: entityId');
  }
  if (tenantId == null) {
   throw ApiException(HttpStatus.badRequest, 'Missing required param: tenantId');
  }
  if (region == null) {
   throw ApiException(HttpStatus.badRequest, 'Missing required param: region');
  }

  // ignore: prefer_const_declarations
  final path = r'/{region}/aim/2.0/{tenantId}/Spaces(AssetModelId={assetModelId}, EntityId={entityId})/ContainedComponents'
    .replaceAll('{assetModelId}', assetModelId.toString())
    .replaceAll('{entityId}', entityId.toString())
    .replaceAll('{tenantId}', tenantId)
    .replaceAll('{region}', region);

  // ignore: prefer_final_locals
  Object postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (dollarExpand != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', '\$expand', dollarExpand));
  }
  if (dollarFilter != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', '\$filter', dollarFilter));
  }
  if (dollarSelect != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', '\$select', dollarSelect));
  }
  if (dollarOrderby != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', '\$orderby', dollarOrderby));
  }
  if (dollarTop != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', '\$top', dollarTop));
  }
  if (dollarSkip != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', '\$skip', dollarSkip));
  }
  if (dollarCount != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', '\$count', dollarCount));
  }
  if (tolerance != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', 'tolerance', tolerance));
  }
  if (inSameAsset != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', 'inSameAsset', inSameAsset));
  }

  const authNames = <String>['oauth2'];
  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes[0],
    authNames,
  );
}