assembliesPostByTenantidWithHttpInfo method

Future<Response> assembliesPostByTenantidWithHttpInfo(
  1. String tenantId,
  2. String region,
  3. EntityCreate assemblyItem
)

Post a new entity to EntitySet Assemblies

Summary:Post a new entity to EntitySet Assemblies.
Return Type: Entity

Note: This method returns the HTTP Response.

Parameters:

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

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

  • EntityCreate assemblyItem (required): The entity to post

Implementation

Future<Response> assembliesPostByTenantidWithHttpInfo(String tenantId, String region, EntityCreate assemblyItem,) async {
  // Verify required params are set.
  if (tenantId == null) {
   throw ApiException(HttpStatus.badRequest, 'Missing required param: tenantId');
  }
  if (region == null) {
   throw ApiException(HttpStatus.badRequest, 'Missing required param: region');
  }
  if (assemblyItem == null) {
   throw ApiException(HttpStatus.badRequest, 'Missing required param: assemblyItem');
  }

  // ignore: prefer_const_declarations
  final path = r'/{region}/aim/2.0/{tenantId}/Assemblies'
    .replaceAll('{tenantId}', tenantId)
    .replaceAll('{region}', region);

  // ignore: prefer_final_locals
  Object postBody = assemblyItem;

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

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


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