io.fabric8.knative.client.eventing.v1beta1.internal.KafkaSourceOperationsImpl Maven / Gradle / Ivy
package io.fabric8.knative.client.eventing.v1beta1.internal;
import io.fabric8.kubernetes.api.builder.Visitor;
import io.fabric8.kubernetes.client.Config;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation;
import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation;
import io.fabric8.kubernetes.client.utils.ApiVersionUtil;
import io.fabric8.kubernetes.client.dsl.base.OperationContext;
import okhttp3.OkHttpClient;
import io.fabric8.knative.eventing.contrib.kafka.v1beta1.KafkaSource;
import io.fabric8.knative.eventing.contrib.kafka.v1beta1.KafkaSourceBuilder;
import io.fabric8.knative.eventing.contrib.kafka.v1beta1.KafkaSourceList;
import java.util.Map;
import java.util.TreeMap;
public class KafkaSourceOperationsImpl extends HasMetadataOperation> {
public KafkaSourceOperationsImpl(OkHttpClient client, Config config) {
this(new OperationContext().withOkhttpClient(client).withConfig(config).withPropagationPolicy(DEFAULT_PROPAGATION_POLICY));
}
public KafkaSourceOperationsImpl(OperationContext context) {
super(context.withApiGroupName("sources.knative.dev")
.withApiGroupVersion("v1beta1")
.withPlural("kafkasources"));
this.type = KafkaSource.class;
this.listType = KafkaSourceList.class;
}
public KafkaSourceOperationsImpl newInstance(OperationContext context) {
return new KafkaSourceOperationsImpl(context);
}
@Override
public KafkaSource edit(Visitor... visitors) {
return patch(new KafkaSourceBuilder(getMandatory()).accept(visitors).build());
}
@Override
public boolean isResourceNamespaced() {
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy