Skip to content

Commit

Permalink
fix(visual-recognition-v4): remove trainingStatus as a parameter for …
Browse files Browse the repository at this point in the history
…create & update Collection
  • Loading branch information
kevinkowa committed Nov 17, 2020
1 parent c740bc7 commit 5568bf9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,6 @@ public ServiceCall<Collection> createCollection(CreateCollectionOptions createCo
if (createCollectionOptions.description() != null) {
contentJson.addProperty("description", createCollectionOptions.description());
}
if (createCollectionOptions.trainingStatus() != null) {
contentJson.add(
"training_status",
com.ibm.cloud.sdk.core.util.GsonSingleton.getGson()
.toJsonTree(createCollectionOptions.trainingStatus()));
}
builder.bodyJson(contentJson);
ResponseConverter<Collection> responseConverter =
ResponseConverterUtils.getValue(
Expand Down Expand Up @@ -381,12 +375,6 @@ public ServiceCall<Collection> updateCollection(UpdateCollectionOptions updateCo
if (updateCollectionOptions.description() != null) {
contentJson.addProperty("description", updateCollectionOptions.description());
}
if (updateCollectionOptions.trainingStatus() != null) {
contentJson.add(
"training_status",
com.ibm.cloud.sdk.core.util.GsonSingleton.getGson()
.toJsonTree(updateCollectionOptions.trainingStatus()));
}
builder.bodyJson(contentJson);
ResponseConverter<Collection> responseConverter =
ResponseConverterUtils.getValue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ public class CreateCollectionOptions extends GenericModel {
public static class Builder {
private String name;
private String description;
private TrainingStatus trainingStatus;

private Builder(CreateCollectionOptions createCollectionOptions) {
this.name = createCollectionOptions.name;
this.description = createCollectionOptions.description;
this.trainingStatus = createCollectionOptions.trainingStatus;
}

/** Instantiates a new builder. */
Expand Down Expand Up @@ -66,23 +64,11 @@ public Builder description(String description) {
this.description = description;
return this;
}

/**
* Set the trainingStatus.
*
* @param trainingStatus the trainingStatus
* @return the CreateCollectionOptions builder
*/
public Builder trainingStatus(TrainingStatus trainingStatus) {
this.trainingStatus = trainingStatus;
return this;
}
}

protected CreateCollectionOptions(Builder builder) {
name = builder.name;
description = builder.description;
trainingStatus = builder.trainingStatus;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ public static class Builder {
private String collectionId;
private String name;
private String description;
private TrainingStatus trainingStatus;

private Builder(UpdateCollectionOptions updateCollectionOptions) {
this.collectionId = updateCollectionOptions.collectionId;
this.name = updateCollectionOptions.name;
this.description = updateCollectionOptions.description;
this.trainingStatus = updateCollectionOptions.trainingStatus;
}

/** Instantiates a new builder. */
Expand Down Expand Up @@ -89,17 +87,6 @@ public Builder description(String description) {
this.description = description;
return this;
}

/**
* Set the trainingStatus.
*
* @param trainingStatus the trainingStatus
* @return the UpdateCollectionOptions builder
*/
public Builder trainingStatus(TrainingStatus trainingStatus) {
this.trainingStatus = trainingStatus;
return this;
}
}

protected UpdateCollectionOptions(Builder builder) {
Expand All @@ -108,7 +95,6 @@ protected UpdateCollectionOptions(Builder builder) {
collectionId = builder.collectionId;
name = builder.name;
description = builder.description;
trainingStatus = builder.trainingStatus;
}

/**
Expand Down

0 comments on commit 5568bf9

Please sign in to comment.