code: public static void runExample(
        AdWordsServicesInterface adWordsServices, AdWordsSession session, long adGroupId)
        throws RemoteException {
      // Get the AdGroupService.
      AdGroupServiceInterface adGroupService =
          adWordsServices.get(session, AdGroupServiceInterface.class);
  
      // Create ad group with REMOVED status.
      AdGroup adGroup = new AdGroup();
      adGroup.setId(adGroupId);
      adGroup.setStatus(AdGroupStatus.REMOVED);
  
      // Create operations.
      AdGroupOperation operation = new AdGroupOperation();
      operation.setOperand(adGroup);
      operation.setOperator(Operator.SET);
  
      AdGroupOperation[] operations = new AdGroupOperation[] {operation};
  
      // Remove ad group.
      AdGroupReturnValue result = adGroupService.mutate(operations);
  
      // Display ad groups.
      for (AdGroup adGroupResult : result.getValue()) {
        System.out.printf("Ad group with name '%s' and ID %d was removed.%n",
            adGroupResult.getName(), adGroupResult.getId());
      }
    }
docs: Runs the example.
  
  @param adWordsServices the services factory.
  @param session the session.
  @param adGroupId the ID of the ad group to remove.
  @throws ApiException if the API request failed with one or more service errors.
  @throws RemoteException if the API request failed due to other errors.