contactsGetSingleEntityByAssetmodelidAndEntityidAndTenantidWithHttpInfo method

Future<Response> contactsGetSingleEntityByAssetmodelidAndEntityidAndTenantidWithHttpInfo(
  1. int assetModelId,
  2. int entityId,
  3. String tenantId,
  4. String region, {
  5. String dollarExpand,
  6. String dollarSelect,
})

Get Contacts single entity by assetmodelid, entityid and tenantid

Summary:Return Type: Contact

Note: This method returns the HTTP Response.

Parameters:

  • int assetModelId (required):

  • int entityId (required):

  • 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 dollarSelect: Selects which properties to include in the response.

Implementation

Future<Response> contactsGetSingleEntityByAssetmodelidAndEntityidAndTenantidWithHttpInfo(int assetModelId, int entityId, String tenantId, String region, { String dollarExpand, String dollarSelect, }) 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}/Contacts(AssetModelId={assetModelId}, EntityId={entityId})'
    .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 (dollarSelect != null) {
    queryParams.addAll(_convertParametersForCollectionFormat('', '\$select', dollarSelect));
  }

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


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