componentTypesPatchByAssetmodelidAndEntityidAndTenantidWithHttpInfo method

Future<Response> componentTypesPatchByAssetmodelidAndEntityidAndTenantidWithHttpInfo(
  1. int assetModelId,
  2. int entityId,
  3. String tenantId,
  4. String region,
  5. EntityEdit patch_,
)

Patch ComponentTypes by assetmodelid, entityid and tenantid

Summary:Return Type: Entity

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

  • EntityEdit patch_ (required):

Implementation

Future<Response> componentTypesPatchByAssetmodelidAndEntityidAndTenantidWithHttpInfo(int assetModelId, int entityId, String tenantId, String region, EntityEdit patch_,) 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');
  }
  if (patch_ == null) {
   throw ApiException(HttpStatus.badRequest, 'Missing required param: patch_');
  }

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

  // ignore: prefer_final_locals
  Object postBody = patch_;

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

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


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