class PlacementRuleCreate {
  private static final Logger logger = LoggerFactory.getLogger(PlacementRuleCreate.class.getSimpleName());

  public static void main(String[] args) {<FILL_FUNCTION_BODY>}
}

    try (OpenClusterManagementClient ocmClient = new DefaultOpenClusterManagementClient()) {

      PlacementRule placementRule = new PlacementRuleBuilder()
          .withNewMetadata().withName("towhichcluster").endMetadata()
          .withNewSpec()
          .addNewClusterCondition()
          .withType("ManagedClusterConditionAvailable")
          .withStatus("True")
          .endClusterCondition()
          .endSpec()
          .build();
      logger.info("Creating PlacementRule {}", placementRule.getMetadata().getName());
      ocmClient.apps().placementRules().inNamespace("default").create(placementRule);
      logger.info("Success.");
    }
  
<no_super_class>