class ClusterServiceBrokerOperationsImpl extends ExtensibleResourceAdapter<ClusterServiceBroker>
    implements ClusterServiceBrokerResource {

  @Override
  public ExtensibleResourceAdapter<ClusterServiceBroker> newInstance() {
    return new ClusterServiceBrokerOperationsImpl();
  }

  @Override
  public ClusterServicePlanList listPlans() {
    ClusterServiceBroker item = get();
    return client.adapt(ServiceCatalogClient.class).clusterServicePlans()
        .withField("spec.clusterServiceBrokerName", item.getMetadata().getName())
        .list();
  }

  @Override
  public ClusterServiceClassList listClasses() {
    ClusterServiceBroker item = get();
    return client.adapt(ServiceCatalogClient.class).clusterServiceClasses()
        .withField("spec.clusterServiceBrokerName", item.getMetadata().getName())
        .list();
  }

  @Override
  public ClusterServiceClassResource useServiceClass(String externalName) {<FILL_FUNCTION_BODY>}

}

    ClusterServiceBroker item = get();
    Map<String, String> fields = new HashMap<>();
    fields.put("spec.clusterServiceBrokerName", item.getMetadata().getName());
    if (externalName != null) {
      fields.put("spec.externalName", externalName);
    }

    List<ClusterServiceClass> list = client.adapt(ServiceCatalogClient.class).clusterServiceClasses().withFields(fields).list()
        .getItems();

    if (list.size() != 1) {
      throw new IllegalArgumentException("No unique ClusterServiceClass with external name:" + externalName
          + "found for ClusterServiceBroker: " + item.getMetadata().getName());
    }
    ClusterServiceClass c = list.get(0);
    return client.adapt(ServiceCatalogClient.class).clusterServiceClasses().resource(c);
  
<methods>public void <init>() ,public ExtensibleResource<ClusterServiceBroker> dryRun(boolean) ,public ExtensibleResource<ClusterServiceBroker> fieldManager(java.lang.String) ,public ExtensibleResource<ClusterServiceBroker> fieldValidation(io.fabric8.kubernetes.client.dsl.FieldValidateable.Validation) ,public ExtensibleResource<ClusterServiceBroker> forceConflicts() ,public ExtensibleResource<ClusterServiceBroker> fromServer() ,public ClusterServiceBroker getItem() ,public C inWriteContext(Class<C>) ,public ExtensibleResourceAdapter<ClusterServiceBroker> init(ExtensibleResource<ClusterServiceBroker>, io.fabric8.kubernetes.client.Client) ,public ExtensibleResource<ClusterServiceBroker> lockResourceVersion(java.lang.String) ,public ExtensibleResource<ClusterServiceBroker> lockResourceVersion() ,public abstract ExtensibleResourceAdapter<ClusterServiceBroker> newInstance() ,public ExtensibleResource<ClusterServiceBroker> subresource(java.lang.String) ,public ExtensibleResource<ClusterServiceBroker> unlock() ,public ExtensibleResource<ClusterServiceBroker> withGracePeriod(long) ,public ExtensibleResource<ClusterServiceBroker> withIndexers(Map<java.lang.String,Function<ClusterServiceBroker,List<java.lang.String>>>) ,public ExtensibleResource<ClusterServiceBroker> withLimit(java.lang.Long) ,public ExtensibleResource<ClusterServiceBroker> withPropagationPolicy(io.fabric8.kubernetes.api.model.DeletionPropagation) ,public ExtensibleResource<ClusterServiceBroker> withResourceVersion(java.lang.String) ,public ExtensibleResource<ClusterServiceBroker> withTimeout(long, java.util.concurrent.TimeUnit) ,public ExtensibleResource<ClusterServiceBroker> withTimeoutInMillis(long) <variables>protected io.fabric8.kubernetes.client.Client client,protected ExtensibleResource<ClusterServiceBroker> resource