public DoneableDeploymentConfig(DeploymentConfig item){ super(item);this.builder=new DeploymentConfigBuilder(this, item);this.function=new Function<DeploymentConfig, DeploymentConfig>() { public DeploymentConfig apply(DeploymentConfig item) { return item; } } ; }
@Override public DeploymentConfigBuilder edit(DeploymentConfig item) { return new DeploymentConfigBuilder(item); }
public DoneableDeploymentConfig(DeploymentConfig item,Function<DeploymentConfig,DeploymentConfig> function){ super(item);this.builder=new DeploymentConfigBuilder(this, item);this.function=function; } public DoneableDeploymentConfig(DeploymentConfig item){
public DoneableDeploymentConfig(Function<DeploymentConfig,DeploymentConfig> function){ super();this.builder=new DeploymentConfigBuilder(this);this.function=function; } public DoneableDeploymentConfig(DeploymentConfig item,Function<DeploymentConfig,DeploymentConfig> function){
public T addToDeploymentConfigItems( DeploymentConfig item){ if (item != null) {DeploymentConfigBuilder builder = new DeploymentConfigBuilder(item);_visitables.add(builder);this.deploymentConfigItems.add(builder);} return (T)this; } public DeploymentConfigItemsNested<T> addNewDeploymentConfigItem(){
public T addToItems( DeploymentConfig item){ if (item != null) {DeploymentConfigBuilder builder = new DeploymentConfigBuilder(item);_visitables.add(builder);this.items.add(builder);} return (T)this; } public List<DeploymentConfig> getItems(){
public T addToDeploymentConfigItems( DeploymentConfig item){ if (item != null) {DeploymentConfigBuilder builder = new DeploymentConfigBuilder(item);_visitables.add(builder);this.deploymentConfigItems.add(builder);} return (T)this; } public DeploymentConfigItemsNested<T> addNewDeploymentConfigItem(){
public T addToDeploymentConfigObjects( DeploymentConfig item){ if (item != null) {DeploymentConfigBuilder builder = new DeploymentConfigBuilder(item);_visitables.add(builder);this.deploymentConfigObjects.add(builder);} return (T)this; } public DeploymentConfigObjectsNested<T> addNewDeploymentConfigObject(){
public T addToItems( DeploymentConfig item){ if (item != null) {DeploymentConfigBuilder builder = new DeploymentConfigBuilder(item);_visitables.add(builder);this.items.add(builder);} return (T)this; } public List<DeploymentConfig> getItems(){
public T addToDeploymentConfigObjects( DeploymentConfig item){ if (item != null) {DeploymentConfigBuilder builder = new DeploymentConfigBuilder(item);_visitables.add(builder);this.deploymentConfigObjects.add(builder);} return (T)this; } public DeploymentConfigObjectsNested<T> addNewDeploymentConfigObject(){
public A removeFromDeploymentConfigObjects(DeploymentConfig... items){ for (DeploymentConfig item : items) {DeploymentConfigBuilder builder = new DeploymentConfigBuilder(item);_visitables.remove(builder);this.objects.remove(builder);} return (A)this; }
public A removeFromDeploymentConfigItems(DeploymentConfig... items){ for (DeploymentConfig item : items) {DeploymentConfigBuilder builder = new DeploymentConfigBuilder(item);_visitables.remove(builder);this.items.remove(builder);} return (A)this; }
public A addToDeploymentConfigObjects(DeploymentConfig... items){ for (DeploymentConfig item : items) {DeploymentConfigBuilder builder = new DeploymentConfigBuilder(item);_visitables.add(builder);this.objects.add(builder);} return (A)this; }
MetadataNested (){ this.builder = new ListMetaBuilder(this); }
MetadataNested ( ListMeta item){ this.builder = new ListMetaBuilder(item); }
@Override public void scale(String name, Map<String, String> labels, int desiredReplicas, long amount, TimeUnit timeUnit) throws InterruptedException { String sName = openshiftName(name); getDeploymentsByLabel(labels) .stream() .filter(d -> d.getMetadata().getName().equals(sName)) .map(d -> new DeploymentConfigBuilder(d).editSpec().withReplicas(desiredReplicas).endSpec().build()) .findAny().ifPresent(d -> openShiftClient.deploymentConfigs().createOrReplace(d)); }
MetadataNested ( ListMeta item){ this.builder = new ListMetaBuilder(item); }
ParametersNested (){ this.builder = new ParameterBuilder(this); }
MetadataNested ( ListMeta item){ this.builder = new ListMetaBuilder(this, item); }
@Override protected DeploymentConfig resource() { return new DeploymentConfigBuilder().withNewMetadata() .withNamespace(NAMESPACE) .withName(RESOURCE_NAME) .endMetadata() .withNewSpec() .withNewTemplate() .withNewSpec() .addToContainers(new ContainerBuilder().withImage("img").build()) .endSpec() .endTemplate() .endSpec().build(); }