Skip to content

Commit

Permalink
Revert app use case fields for project
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Oct 8, 2024
1 parent fef5512 commit 8b93264
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 66 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package io.github.stefanbratanov.jvm.openai;

import java.util.Optional;

public record CreateProjectRequest(
String name, Optional<String> appUseCase, Optional<String> businessWebsite) {
public record CreateProjectRequest(String name) {

public static Builder newBuilder() {
return new Builder();
Expand All @@ -13,9 +10,6 @@ public static class Builder {

private String name;

private Optional<String> appUseCase = Optional.empty();
private Optional<String> businessWebsite = Optional.empty();

/**
* @param name The friendly name of the project, this name appears in reports.
*/
Expand All @@ -24,25 +18,8 @@ public Builder name(String name) {
return this;
}

/**
* @param appUseCase A description of your business, project, or use case.
*/
public Builder appUseCase(String appUseCase) {
this.appUseCase = Optional.of(appUseCase);
return this;
}

/**
* @param businessWebsite Your business URL, or if you don't have one yet, a URL to your
* LinkedIn or other social media.
*/
public Builder businessWebsite(String businessWebsite) {
this.businessWebsite = Optional.of(businessWebsite);
return this;
}

public CreateProjectRequest build() {
return new CreateProjectRequest(name, appUseCase, businessWebsite);
return new CreateProjectRequest(name);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package io.github.stefanbratanov.jvm.openai;

import java.util.Optional;

public record ModifyProjectRequest(
String name, Optional<String> appUseCase, Optional<String> businessWebsite) {
public record ModifyProjectRequest(String name) {

public static Builder newBuilder() {
return new Builder();
Expand All @@ -13,9 +10,6 @@ public static class Builder {

private String name;

private Optional<String> appUseCase = Optional.empty();
private Optional<String> businessWebsite = Optional.empty();

/**
* @param name The updated name of the project, this name appears in reports.
*/
Expand All @@ -24,25 +18,8 @@ public Builder name(String name) {
return this;
}

/**
* @param appUseCase A description of your business, project, or use case.
*/
public Builder appUseCase(String appUseCase) {
this.appUseCase = Optional.of(appUseCase);
return this;
}

/**
* @param businessWebsite Your business URL, or if you don't have one yet, a URL to your
* LinkedIn or other social media.
*/
public Builder businessWebsite(String businessWebsite) {
this.businessWebsite = Optional.of(businessWebsite);
return this;
}

public ModifyProjectRequest build() {
return new ModifyProjectRequest(name, appUseCase, businessWebsite);
return new ModifyProjectRequest(name);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
package io.github.stefanbratanov.jvm.openai;

/** Represents an individual project. */
public record Project(
String id,
String name,
long createdAt,
Long archivedAt,
String status,
String appUseCase,
String businessWebsite) {}
public record Project(String id, String name, long createdAt, Long archivedAt, String status) {}
Original file line number Diff line number Diff line change
Expand Up @@ -805,11 +805,7 @@ public User randomUser() {
}

public CreateProjectRequest randomCreateProjectRequest() {
return CreateProjectRequest.newBuilder()
.name(randomString(7))
.appUseCase(randomString(12))
.businessWebsite("example.com")
.build();
return CreateProjectRequest.newBuilder().name(randomString(7)).build();
}

public Project randomProject() {
Expand All @@ -818,9 +814,7 @@ public Project randomProject() {
randomString(7),
randomLong(10_000, 1_000_000),
randomLong(11_111, 1_111_111),
oneOf("active", "archived"),
randomString(12),
"example.com");
oneOf("active", "archived"));
}

public CreateProjectUserRequest randomCreateProjectUserRequest() {
Expand Down

0 comments on commit 8b93264

Please sign in to comment.