Skip to content

Commit

Permalink
Convert Provider to an interface
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhailshilkov committed Feb 6, 2025
1 parent adc2d56 commit 91dd3d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

import com.pulumi.provider.internal.models.*;

public abstract class Provider {
public CompletableFuture<GetSchemaResponse> getSchema(GetSchemaRequest request) {
throw new UnsupportedOperationException("Method 'getSchema' is not implemented");
}
public interface Provider {
/**
* Returns the schema for this provider's package.
* @param request The schema request
* @return A future containing the schema response
*/
CompletableFuture<GetSchemaResponse> getSchema(GetSchemaRequest request);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.concurrent.CompletableFuture;
import com.pulumi.provider.internal.Provider;

public class ExampleProvider extends Provider {
public class ExampleProvider implements Provider {
@Override
public CompletableFuture<GetSchemaResponse> getSchema(GetSchemaRequest request) {
String schema = "{\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.concurrent.CompletableFuture;
import com.pulumi.provider.internal.Provider;

public class ExampleProvider extends Provider {
public class ExampleProvider implements Provider {
@Override
public CompletableFuture<GetSchemaResponse> getSchema(GetSchemaRequest request) {
String schema = "{\n" +
Expand Down

0 comments on commit 91dd3d7

Please sign in to comment.