001 002package com.commercetools.api.client; 003 004import java.util.function.UnaryOperator; 005 006import io.vrap.rmf.base.client.ApiHttpClient; 007import io.vrap.rmf.base.client.utils.Generated; 008 009@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 010public class ByProjectKeyBusinessUnitsByIDRequestBuilder { 011 012 private final ApiHttpClient apiHttpClient; 013 private final String projectKey; 014 private final String ID; 015 016 public ByProjectKeyBusinessUnitsByIDRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey, 017 final String ID) { 018 this.apiHttpClient = apiHttpClient; 019 this.projectKey = projectKey; 020 this.ID = ID; 021 } 022 023 public ByProjectKeyBusinessUnitsByIDGet get() { 024 return new ByProjectKeyBusinessUnitsByIDGet(apiHttpClient, projectKey, ID); 025 } 026 027 public ByProjectKeyBusinessUnitsByIDPost post( 028 com.commercetools.api.models.business_unit.BusinessUnitUpdate businessUnitUpdate) { 029 return new ByProjectKeyBusinessUnitsByIDPost(apiHttpClient, projectKey, ID, businessUnitUpdate); 030 } 031 032 public ByProjectKeyBusinessUnitsByIDPostString post(final String businessUnitUpdate) { 033 return new ByProjectKeyBusinessUnitsByIDPostString(apiHttpClient, projectKey, ID, businessUnitUpdate); 034 } 035 036 public ByProjectKeyBusinessUnitsByIDPost post( 037 UnaryOperator<com.commercetools.api.models.business_unit.BusinessUnitUpdateBuilder> op) { 038 return post(op.apply(com.commercetools.api.models.business_unit.BusinessUnitUpdateBuilder.of()).build()); 039 } 040 041 public ByProjectKeyBusinessUnitsByIDDelete delete() { 042 return new ByProjectKeyBusinessUnitsByIDDelete(apiHttpClient, projectKey, ID); 043 } 044 045 public <TValue> ByProjectKeyBusinessUnitsByIDDelete delete(TValue version) { 046 return delete().withVersion(version); 047 } 048 049}