Skip to content

Commit

Permalink
bumped protobuf, regenerated rpc, corrected Language trait (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbialy authored Oct 7, 2024
1 parent 0086ea6 commit 38abc4e
Show file tree
Hide file tree
Showing 115 changed files with 4,937 additions and 849 deletions.
6 changes: 2 additions & 4 deletions besom-rpc/src/main/scala/com/google/rpc/status/Status.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package com.google.rpc.status

Expand Down Expand Up @@ -206,8 +204,8 @@ object Status extends scalapb.GeneratedMessageCompanion[com.google.rpc.status.St
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = StatusProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = StatusProto.scalaDescriptor.messages(0)
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = com.google.rpc.status.StatusProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = com.google.rpc.status.StatusProto.scalaDescriptor.messages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null
(__number: @_root_.scala.unchecked) match {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package com.google.rpc.status

Expand Down
10 changes: 4 additions & 6 deletions besom-rpc/src/main/scala/pulumirpc/alias/Alias.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.alias

Expand Down Expand Up @@ -109,8 +107,8 @@ object Alias extends scalapb.GeneratedMessageCompanion[pulumirpc.alias.Alias] {
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = AliasProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = AliasProto.scalaDescriptor.messages(0)
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.alias.AliasProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.alias.AliasProto.scalaDescriptor.messages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null
(__number: @_root_.scala.unchecked) match {
Expand All @@ -126,7 +124,7 @@ object Alias extends scalapb.GeneratedMessageCompanion[pulumirpc.alias.Alias] {
lazy val defaultInstance = pulumirpc.alias.Alias(
alias = pulumirpc.alias.Alias.Alias.Empty
)
sealed trait Alias extends _root_.scalapb.GeneratedOneof {
sealed abstract class Alias extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isUrn: _root_.scala.Boolean = false
Expand Down Expand Up @@ -382,7 +380,7 @@ object Alias extends scalapb.GeneratedMessageCompanion[pulumirpc.alias.Alias] {
project = "",
parent = pulumirpc.alias.Alias.Spec.Parent.Empty
)
sealed trait Parent extends _root_.scalapb.GeneratedOneof {
sealed abstract class Parent extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isParentUrn: _root_.scala.Boolean = false
Expand Down
2 changes: 0 additions & 2 deletions besom-rpc/src/main/scala/pulumirpc/alias/AliasProto.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.alias

Expand Down
6 changes: 2 additions & 4 deletions besom-rpc/src/main/scala/pulumirpc/callback/Callback.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.callback

Expand Down Expand Up @@ -126,8 +124,8 @@ object Callback extends scalapb.GeneratedMessageCompanion[pulumirpc.callback.Cal
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = CallbackProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = CallbackProto.scalaDescriptor.messages(0)
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.callback.CallbackProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.callback.CallbackProto.scalaDescriptor.messages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.callback

Expand Down Expand Up @@ -126,8 +124,8 @@ object CallbackInvokeRequest extends scalapb.GeneratedMessageCompanion[pulumirpc
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = CallbackProto.javaDescriptor.getMessageTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = CallbackProto.scalaDescriptor.messages(1)
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.callback.CallbackProto.javaDescriptor.getMessageTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.callback.CallbackProto.scalaDescriptor.messages(1)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.callback

Expand Down Expand Up @@ -99,8 +97,8 @@ object CallbackInvokeResponse extends scalapb.GeneratedMessageCompanion[pulumirp
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = CallbackProto.javaDescriptor.getMessageTypes().get(2)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = CallbackProto.scalaDescriptor.messages(2)
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.callback.CallbackProto.javaDescriptor.getMessageTypes().get(2)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.callback.CallbackProto.scalaDescriptor.messages(2)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.callback

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.callback

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.codegen.hcl

Expand Down Expand Up @@ -207,8 +205,8 @@ object Diagnostic extends scalapb.GeneratedMessageCompanion[pulumirpc.codegen.hc
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = HclProto.javaDescriptor.getMessageTypes().get(2)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = HclProto.scalaDescriptor.messages(2)
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.codegen.hcl.HclProto.javaDescriptor.getMessageTypes().get(2)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.codegen.hcl.HclProto.scalaDescriptor.messages(2)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null
(__number: @_root_.scala.unchecked) match {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.codegen.hcl

Expand Down Expand Up @@ -60,6 +58,6 @@ object DiagnosticSeverity extends _root_.scalapb.GeneratedEnumCompanion[Diagnost
case 2 => DIAG_WARNING
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = HclProto.javaDescriptor.getEnumTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = HclProto.scalaDescriptor.enums(0)
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = pulumirpc.codegen.hcl.HclProto.javaDescriptor.getEnumTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = pulumirpc.codegen.hcl.HclProto.scalaDescriptor.enums(0)
}
2 changes: 0 additions & 2 deletions besom-rpc/src/main/scala/pulumirpc/codegen/hcl/HclProto.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.codegen.hcl

Expand Down
6 changes: 2 additions & 4 deletions besom-rpc/src/main/scala/pulumirpc/codegen/hcl/Pos.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.codegen.hcl

Expand Down Expand Up @@ -165,8 +163,8 @@ object Pos extends scalapb.GeneratedMessageCompanion[pulumirpc.codegen.hcl.Pos]
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = HclProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = HclProto.scalaDescriptor.messages(0)
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.codegen.hcl.HclProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.codegen.hcl.HclProto.scalaDescriptor.messages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber)
Expand Down
6 changes: 2 additions & 4 deletions besom-rpc/src/main/scala/pulumirpc/codegen/hcl/Range.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.codegen.hcl

Expand Down Expand Up @@ -145,8 +143,8 @@ object Range extends scalapb.GeneratedMessageCompanion[pulumirpc.codegen.hcl.Ran
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = HclProto.javaDescriptor.getMessageTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = HclProto.scalaDescriptor.messages(1)
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.codegen.hcl.HclProto.javaDescriptor.getMessageTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.codegen.hcl.HclProto.scalaDescriptor.messages(1)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null
(__number: @_root_.scala.unchecked) match {
Expand Down
41 changes: 39 additions & 2 deletions besom-rpc/src/main/scala/pulumirpc/engine/EngineGrpc.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package pulumirpc.engine

Expand Down Expand Up @@ -37,12 +35,23 @@ object EngineGrpc {
.setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.engine.EngineProto.javaDescriptor.getServices().get(0).getMethods().get(2)))
.build()

val METHOD_START_DEBUGGING: _root_.io.grpc.MethodDescriptor[pulumirpc.engine.StartDebuggingRequest, com.google.protobuf.empty.Empty] =
_root_.io.grpc.MethodDescriptor.newBuilder()
.setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.Engine", "StartDebugging"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.engine.StartDebuggingRequest])
.setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[com.google.protobuf.empty.Empty])
.setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.engine.EngineProto.javaDescriptor.getServices().get(0).getMethods().get(3)))
.build()

val SERVICE: _root_.io.grpc.ServiceDescriptor =
_root_.io.grpc.ServiceDescriptor.newBuilder("pulumirpc.Engine")
.setSchemaDescriptor(new _root_.scalapb.grpc.ConcreteProtoFileDescriptorSupplier(pulumirpc.engine.EngineProto.javaDescriptor))
.addMethod(METHOD_LOG)
.addMethod(METHOD_GET_ROOT_RESOURCE)
.addMethod(METHOD_SET_ROOT_RESOURCE)
.addMethod(METHOD_START_DEBUGGING)
.build()

/** Engine is an auxiliary service offered to language and resource provider plugins. Its main purpose today is
Expand All @@ -61,6 +70,10 @@ object EngineGrpc {
/** SetRootResource sets the URN of the root resource.
*/
def setRootResource(request: pulumirpc.engine.SetRootResourceRequest): scala.concurrent.Future[pulumirpc.engine.SetRootResourceResponse]
/** StartDebugging indicates to the engine that the program has started under a debugger, and the engine
* should notify the user of how to connect to the debugger.
*/
def startDebugging(request: pulumirpc.engine.StartDebuggingRequest): scala.concurrent.Future[com.google.protobuf.empty.Empty]
}

object Engine extends _root_.scalapb.grpc.ServiceCompanion[Engine] {
Expand All @@ -87,6 +100,12 @@ object EngineGrpc {
serviceImpl.setRootResource(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))(
executionContext)
}))
.addMethod(
METHOD_START_DEBUGGING,
_root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.engine.StartDebuggingRequest, observer: _root_.io.grpc.stub.StreamObserver[com.google.protobuf.empty.Empty]) => {
serviceImpl.startDebugging(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))(
executionContext)
}))
.build()
}

Expand All @@ -106,6 +125,10 @@ object EngineGrpc {
/** SetRootResource sets the URN of the root resource.
*/
def setRootResource(request: pulumirpc.engine.SetRootResourceRequest): pulumirpc.engine.SetRootResourceResponse
/** StartDebugging indicates to the engine that the program has started under a debugger, and the engine
* should notify the user of how to connect to the debugger.
*/
def startDebugging(request: pulumirpc.engine.StartDebuggingRequest): com.google.protobuf.empty.Empty
}

class EngineBlockingStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[EngineBlockingStub](channel, options) with EngineBlockingClient {
Expand All @@ -128,6 +151,13 @@ object EngineGrpc {
_root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_SET_ROOT_RESOURCE, options, request)
}

/** StartDebugging indicates to the engine that the program has started under a debugger, and the engine
* should notify the user of how to connect to the debugger.
*/
override def startDebugging(request: pulumirpc.engine.StartDebuggingRequest): com.google.protobuf.empty.Empty = {
_root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_START_DEBUGGING, options, request)
}

override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): EngineBlockingStub = new EngineBlockingStub(channel, options)
}

Expand All @@ -151,6 +181,13 @@ object EngineGrpc {
_root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_SET_ROOT_RESOURCE, options, request)
}

/** StartDebugging indicates to the engine that the program has started under a debugger, and the engine
* should notify the user of how to connect to the debugger.
*/
override def startDebugging(request: pulumirpc.engine.StartDebuggingRequest): scala.concurrent.Future[com.google.protobuf.empty.Empty] = {
_root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_START_DEBUGGING, options, request)
}

override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): EngineStub = new EngineStub(channel, options)
}

Expand Down
Loading

0 comments on commit 38abc4e

Please sign in to comment.