diff --git a/Justfile b/Justfile index a4d83c61..40e94836 100644 --- a/Justfile +++ b/Justfile @@ -43,20 +43,20 @@ build-packages-for-templates-and-examples: grep -hr "0.3-SNAPSHOT" examples/**/*.scala templates/**/*.scala | sed -n 's/.*besom-\([^:]*:[^"]*\).*-core.0.3-SNAPSHOT.*/\1/p' | sort -u | tr '\n' ' ' | xargs -I {} just cli packages local {} # Cleans everything -clean-all: clean-json clean-sdk clean-auto clean-out clean-compiler-plugin clean-codegen clean-scripts clean-test-integration clean-cfg clean-test-templates clean-test-examples clean-test-markdown +clean-all: clean-json clean-rpc clean-sdk clean-auto clean-out clean-compiler-plugin clean-codegen clean-scripts clean-test-integration clean-cfg clean-test-templates clean-test-examples clean-test-markdown # Compiles everything -compile-all: compile-json compile-sdk compile-auto compile-codegen compile-scripts compile-compiler-plugin build-language-plugin +compile-all: compile-json compile-rpc compile-sdk compile-auto compile-codegen compile-scripts compile-compiler-plugin build-language-plugin # Tests everything test-all: test-json test-sdk test-auto test-codegen test-scripts test-integration build-packages-for-templates-and-examples test-templates test-examples test-markdown # Publishes everything locally -publish-local-all: publish-local-json publish-local-sdk publish-local-auto publish-local-codegen publish-local-scripts install-language-plugin +publish-local-all: publish-local-json publish-local-rpc publish-local-sdk publish-local-auto publish-local-codegen publish-local-scripts install-language-plugin # Publishes everything to Maven # TODO add publish-maven-auto once stable -publish-maven-all: publish-maven-json publish-maven-sdk publish-maven-codegen publish-maven-scripts +publish-maven-all: publish-maven-json publish-maven-rpc publish-maven-sdk publish-maven-codegen publish-maven-scripts # Runs all necessary checks before committing before-commit: compile-all test-all @@ -66,7 +66,7 @@ before-commit: compile-all test-all #################### # Compiles core besom SDK -compile-core: publish-local-json +compile-core: publish-local-json publish-local-rpc scala-cli --power compile {{no-bloop-ci}} core --suppress-experimental-feature-warning # Compiles besom cats-effect extension @@ -109,7 +109,7 @@ publish-local-sdk: publish-local-core publish-local-cats publish-local-zio publi publish-maven-sdk: publish-maven-core publish-maven-cats publish-maven-zio publish-maven-compiler-plugin # Publishes locally core besom SDK -publish-local-core: publish-local-json +publish-local-core: publish-local-json publish-local-rpc scala-cli --power publish local {{no-bloop-ci}} core --project-version {{besom-version}} --suppress-experimental-feature-warning # Publishes locally besom cats-effect extension @@ -167,6 +167,22 @@ clean-out: clean-coverage: clean-sdk rm -rf {{coverage-output-dir}} +#################### +# RPC +#################### + +compile-rpc: + scala-cli --power compile {{no-bloop-ci}} besom-rpc --suppress-experimental-feature-warning + +clean-rpc: + scala-cli --power clean {{no-bloop-ci}} besom-rpc --suppress-experimental-feature-warning + +publish-local-rpc: + scala-cli --power publish local {{no-bloop-ci}} besom-rpc --project-version {{besom-version}} --suppress-experimental-feature-warning + +publish-maven-rpc: + scala-cli --power publish {{no-bloop-ci}} besom-rpc --project-version {{besom-version}} {{publish-maven-auth-options}} --suppress-experimental-feature-warning + #################### # Json #################### @@ -191,7 +207,6 @@ publish-local-json: publish-maven-json: scala-cli --power publish {{no-bloop-ci}} besom-json --project-version {{besom-version}} {{publish-maven-auth-options}} --suppress-experimental-feature-warning - #################### # Auto #################### diff --git a/besom-rpc/project.scala b/besom-rpc/project.scala new file mode 100644 index 00000000..5baa1064 --- /dev/null +++ b/besom-rpc/project.scala @@ -0,0 +1,18 @@ +//> using scala 3.3.3 + +//> using options "-java-output-version:11" + +// TODO dependency bumps +//> using dep "com.google.protobuf:protobuf-java-util:3.25.1" +//> using dep "com.thesamet.scalapb::scalapb-runtime:0.11.15" +//> using dep "com.thesamet.scalapb::scalapb-runtime-grpc:0.11.15" + +//> using publish.name "besom-rpc" +//> using publish.organization "org.virtuslab" +//> using publish.url "https://github.com/VirtusLab/besom" +//> using publish.vcs "github:VirtusLab/besom" +//> using publish.license "Apache-2.0" +//> using publish.repository "central" +//> using publish.developer "lbialy|Łukasz Biały|https://github.com/lbialy" +//> using publish.developer "prolativ|Michał Pałka|https://github.com/prolativ" +//> using repository sonatype:snapshots diff --git a/besom-rpc/src/main/scala/com/google/rpc/status/Status.scala b/besom-rpc/src/main/scala/com/google/rpc/status/Status.scala new file mode 100644 index 00000000..c2212611 --- /dev/null +++ b/besom-rpc/src/main/scala/com/google/rpc/status/Status.scala @@ -0,0 +1,243 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package com.google.rpc.status + +/** The `Status` type defines a logical error model that is suitable for different + * programming environments, including REST APIs and RPC APIs. It is used by + * [gRPC](https://github.com/grpc). The error model is designed to be: + * + * - Simple to use and understand for most users + * - Flexible enough to meet unexpected needs + * + * # Overview + * + * The `Status` message contains three pieces of data: error code, error message, + * and error details. The error code should be an enum value of + * [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The + * error message should be a developer-facing English message that helps + * developers *understand* and *resolve* the error. If a localized user-facing + * error message is needed, put the localized message in the error details or + * localize it in the client. The optional error details may contain arbitrary + * information about the error. There is a predefined set of error detail types + * in the package `google.rpc` which can be used for common error conditions. + * + * # Language mapping + * + * The `Status` message is the logical representation of the error model, but it + * is not necessarily the actual wire format. When the `Status` message is + * exposed in different client libraries and different wire protocols, it can be + * mapped differently. For example, it will likely be mapped to some exceptions + * in Java, but more likely mapped to some error codes in C. + * + * # Other uses + * + * The error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a + * consistent developer experience across different environments. + * + * Example uses of this error model include: + * + * - Partial errors. If a service needs to return partial errors to the client, + * it may embed the `Status` in the normal response to indicate the partial + * errors. + * + * - Workflow errors. A typical workflow has multiple steps. Each step may + * have a `Status` message for error reporting purpose. + * + * - Batch operations. If a client uses batch request and batch response, the + * `Status` message should be used directly inside batch response, one for + * each error sub-response. + * + * - Asynchronous operations. If an API call embeds asynchronous operation + * results in its response, the status of those operations should be + * represented directly using the `Status` message. + * + * - Logging. If some API errors are stored in logs, the message `Status` could + * be used directly after any stripping needed for security/privacy reasons. + * + * @param code + * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + * @param message + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + * @param details + * A list of messages that carry the error details. There will be a + * common set of message types for APIs to use. + */ +@SerialVersionUID(0L) +final case class Status( + code: _root_.scala.Int = 0, + message: _root_.scala.Predef.String = "", + details: _root_.scala.Seq[com.google.protobuf.any.Any] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Status] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = code + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(1, __value) + } + }; + + { + val __value = message + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + details.foreach { __item => + val __value = __item + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = code + if (__v != 0) { + _output__.writeInt32(1, __v) + } + }; + { + val __v = message + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + details.foreach { __v => + val __m = __v + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withCode(__v: _root_.scala.Int): Status = copy(code = __v) + def withMessage(__v: _root_.scala.Predef.String): Status = copy(message = __v) + def clearDetails = copy(details = _root_.scala.Seq.empty) + def addDetails(__vs: com.google.protobuf.any.Any *): Status = addAllDetails(__vs) + def addAllDetails(__vs: Iterable[com.google.protobuf.any.Any]): Status = copy(details = details ++ __vs) + def withDetails(__v: _root_.scala.Seq[com.google.protobuf.any.Any]): Status = copy(details = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = code + if (__t != 0) __t else null + } + case 2 => { + val __t = message + if (__t != "") __t else null + } + case 3 => details + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PInt(code) + case 2 => _root_.scalapb.descriptors.PString(message) + case 3 => _root_.scalapb.descriptors.PRepeated(details.iterator.map(_.toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: com.google.rpc.status.Status.type = com.google.rpc.status.Status + // @@protoc_insertion_point(GeneratedMessage[google.rpc.Status]) +} + +object Status extends scalapb.GeneratedMessageCompanion[com.google.rpc.status.Status] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.google.rpc.status.Status] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.google.rpc.status.Status = { + var __code: _root_.scala.Int = 0 + var __message: _root_.scala.Predef.String = "" + val __details: _root_.scala.collection.immutable.VectorBuilder[com.google.protobuf.any.Any] = new _root_.scala.collection.immutable.VectorBuilder[com.google.protobuf.any.Any] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 8 => + __code = _input__.readInt32() + case 18 => + __message = _input__.readStringRequireUtf8() + case 26 => + __details += _root_.scalapb.LiteParser.readMessage[com.google.protobuf.any.Any](_input__) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + com.google.rpc.status.Status( + code = __code, + message = __message, + details = __details.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[com.google.rpc.status.Status] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + com.google.rpc.status.Status( + code = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Int]).getOrElse(0), + message = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + details = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[com.google.protobuf.any.Any]]).getOrElse(_root_.scala.Seq.empty) + ) + 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 messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 3 => __out = com.google.protobuf.any.Any + } + __out + } + 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) + lazy val defaultInstance = com.google.rpc.status.Status( + code = 0, + message = "", + details = _root_.scala.Seq.empty + ) + implicit class StatusLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.google.rpc.status.Status]) extends _root_.scalapb.lenses.MessageLens[UpperPB, com.google.rpc.status.Status](_l) { + def code: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.code)((c_, f_) => c_.copy(code = f_)) + def message: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.message)((c_, f_) => c_.copy(message = f_)) + def details: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[com.google.protobuf.any.Any]] = field(_.details)((c_, f_) => c_.copy(details = f_)) + } + final val CODE_FIELD_NUMBER = 1 + final val MESSAGE_FIELD_NUMBER = 2 + final val DETAILS_FIELD_NUMBER = 3 + def of( + code: _root_.scala.Int, + message: _root_.scala.Predef.String, + details: _root_.scala.Seq[com.google.protobuf.any.Any] + ): _root_.com.google.rpc.status.Status = _root_.com.google.rpc.status.Status( + code, + message, + details + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[google.rpc.Status]) +} diff --git a/besom-rpc/src/main/scala/com/google/rpc/status/StatusProto.scala b/besom-rpc/src/main/scala/com/google/rpc/status/StatusProto.scala new file mode 100644 index 00000000..edcbdc25 --- /dev/null +++ b/besom-rpc/src/main/scala/com/google/rpc/status/StatusProto.scala @@ -0,0 +1,36 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package com.google.rpc.status + +object StatusProto extends _root_.scalapb.GeneratedFileObject { + lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq( + com.google.protobuf.any.AnyProto + ) + lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + com.google.rpc.status.Status + ) + private lazy val ProtoBytes: _root_.scala.Array[Byte] = + scalapb.Encoding.fromBase64(scala.collection.immutable.Seq( + """Chxnb29nbGUvcHJvdG9idWYvc3RhdHVzLnByb3RvEgpnb29nbGUucnBjGhlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvIo0BC + gZTdGF0dXMSHQoEY29kZRgBIAEoBUIJ4j8GEgRjb2RlUgRjb2RlEiYKB21lc3NhZ2UYAiABKAlCDOI/CRIHbWVzc2FnZVIHbWVzc + 2FnZRI8CgdkZXRhaWxzGAMgAygLMhQuZ29vZ2xlLnByb3RvYnVmLkFueUIM4j8JEgdkZXRhaWxzUgdkZXRhaWxzQl4KDmNvbS5nb + 29nbGUucnBjQgtTdGF0dXNQcm90b1ABWjdnb29nbGUuZ29sYW5nLm9yZy9nZW5wcm90by9nb29nbGVhcGlzL3JwYy9zdGF0dXM7c + 3RhdHVzogIDUlBDYgZwcm90bzM=""" + ).mkString) + lazy val scalaDescriptor: _root_.scalapb.descriptors.FileDescriptor = { + val scalaProto = com.google.protobuf.descriptor.FileDescriptorProto.parseFrom(ProtoBytes) + _root_.scalapb.descriptors.FileDescriptor.buildFrom(scalaProto, dependencies.map(_.scalaDescriptor)) + } + lazy val javaDescriptor: com.google.protobuf.Descriptors.FileDescriptor = { + val javaProto = com.google.protobuf.DescriptorProtos.FileDescriptorProto.parseFrom(ProtoBytes) + com.google.protobuf.Descriptors.FileDescriptor.buildFrom(javaProto, _root_.scala.Array( + com.google.protobuf.any.AnyProto.javaDescriptor + )) + } + @deprecated("Use javaDescriptor instead. In a future version this will refer to scalaDescriptor.", "ScalaPB 0.5.47") + def descriptor: com.google.protobuf.Descriptors.FileDescriptor = javaDescriptor +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/alias/Alias.scala b/besom-rpc/src/main/scala/pulumirpc/alias/Alias.scala new file mode 100644 index 00000000..1506df9e --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/alias/Alias.scala @@ -0,0 +1,462 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.alias + +@SerialVersionUID(0L) +final case class Alias( + alias: pulumirpc.alias.Alias.Alias = pulumirpc.alias.Alias.Alias.Empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Alias] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + if (alias.urn.isDefined) { + val __value = alias.urn.get + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + }; + if (alias.spec.isDefined) { + val __value = alias.spec.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + alias.urn.foreach { __v => + val __m = __v + _output__.writeString(1, __m) + }; + alias.spec.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def getUrn: _root_.scala.Predef.String = alias.urn.getOrElse("") + def withUrn(__v: _root_.scala.Predef.String): Alias = copy(alias = pulumirpc.alias.Alias.Alias.Urn(__v)) + def getSpec: pulumirpc.alias.Alias.Spec = alias.spec.getOrElse(pulumirpc.alias.Alias.Spec.defaultInstance) + def withSpec(__v: pulumirpc.alias.Alias.Spec): Alias = copy(alias = pulumirpc.alias.Alias.Alias.Spec(__v)) + def clearAlias: Alias = copy(alias = pulumirpc.alias.Alias.Alias.Empty) + def withAlias(__v: pulumirpc.alias.Alias.Alias): Alias = copy(alias = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => alias.urn.orNull + case 2 => alias.spec.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => alias.urn.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 2 => alias.spec.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.alias.Alias.type = pulumirpc.alias.Alias + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.Alias]) +} + +object Alias extends scalapb.GeneratedMessageCompanion[pulumirpc.alias.Alias] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.alias.Alias] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.alias.Alias = { + var __alias: pulumirpc.alias.Alias.Alias = pulumirpc.alias.Alias.Alias.Empty + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __alias = pulumirpc.alias.Alias.Alias.Urn(_input__.readStringRequireUtf8()) + case 18 => + __alias = pulumirpc.alias.Alias.Alias.Spec(__alias.spec.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.alias.Alias.Spec](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.alias.Alias( + alias = __alias, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.alias.Alias] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.alias.Alias( + alias = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(pulumirpc.alias.Alias.Alias.Urn(_)) + .orElse[pulumirpc.alias.Alias.Alias](__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[pulumirpc.alias.Alias.Spec]]).map(pulumirpc.alias.Alias.Alias.Spec(_))) + .getOrElse(pulumirpc.alias.Alias.Alias.Empty) + ) + 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 messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = pulumirpc.alias.Alias.Spec + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.alias.Alias.Spec + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.alias.Alias( + alias = pulumirpc.alias.Alias.Alias.Empty + ) + sealed trait Alias extends _root_.scalapb.GeneratedOneof { + def isEmpty: _root_.scala.Boolean = false + def isDefined: _root_.scala.Boolean = true + def isUrn: _root_.scala.Boolean = false + def isSpec: _root_.scala.Boolean = false + def urn: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None + def spec: _root_.scala.Option[pulumirpc.alias.Alias.Spec] = _root_.scala.None + } + object Alias { + @SerialVersionUID(0L) + case object Empty extends pulumirpc.alias.Alias.Alias { + type ValueType = _root_.scala.Nothing + override def isEmpty: _root_.scala.Boolean = true + override def isDefined: _root_.scala.Boolean = false + override def number: _root_.scala.Int = 0 + override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value") + } + + @SerialVersionUID(0L) + final case class Urn(value: _root_.scala.Predef.String) extends pulumirpc.alias.Alias.Alias { + type ValueType = _root_.scala.Predef.String + override def isUrn: _root_.scala.Boolean = true + override def urn: _root_.scala.Option[_root_.scala.Predef.String] = Some(value) + override def number: _root_.scala.Int = 1 + } + @SerialVersionUID(0L) + final case class Spec(value: pulumirpc.alias.Alias.Spec) extends pulumirpc.alias.Alias.Alias { + type ValueType = pulumirpc.alias.Alias.Spec + override def isSpec: _root_.scala.Boolean = true + override def spec: _root_.scala.Option[pulumirpc.alias.Alias.Spec] = Some(value) + override def number: _root_.scala.Int = 2 + } + } + /** @param name + * The previous name of the resource. If none is provided, we will use the current name. + * @param type + * The previous type of the resource. If none is provided, we will use the current resoource type. + * @param stack + * The previous stack of the resource. If not set, the current stack of the resource is used. + * @param project + * The previous project of the resource. If not set, the current project of the resource is used. + */ + @SerialVersionUID(0L) + final case class Spec( + name: _root_.scala.Predef.String = "", + `type`: _root_.scala.Predef.String = "", + stack: _root_.scala.Predef.String = "", + project: _root_.scala.Predef.String = "", + parent: pulumirpc.alias.Alias.Spec.Parent = pulumirpc.alias.Alias.Spec.Parent.Empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Spec] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = name + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = `type` + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = stack + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + + { + val __value = project + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value) + } + }; + if (parent.parentUrn.isDefined) { + val __value = parent.parentUrn.get + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(5, __value) + }; + if (parent.noParent.isDefined) { + val __value = parent.noParent.get + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(6, __value) + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = name + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = `type` + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = stack + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + { + val __v = project + if (!__v.isEmpty) { + _output__.writeString(4, __v) + } + }; + parent.parentUrn.foreach { __v => + val __m = __v + _output__.writeString(5, __m) + }; + parent.noParent.foreach { __v => + val __m = __v + _output__.writeBool(6, __m) + }; + unknownFields.writeTo(_output__) + } + def withName(__v: _root_.scala.Predef.String): Spec = copy(name = __v) + def withType(__v: _root_.scala.Predef.String): Spec = copy(`type` = __v) + def withStack(__v: _root_.scala.Predef.String): Spec = copy(stack = __v) + def withProject(__v: _root_.scala.Predef.String): Spec = copy(project = __v) + def getParentUrn: _root_.scala.Predef.String = parent.parentUrn.getOrElse("") + def withParentUrn(__v: _root_.scala.Predef.String): Spec = copy(parent = pulumirpc.alias.Alias.Spec.Parent.ParentUrn(__v)) + def getNoParent: _root_.scala.Boolean = parent.noParent.getOrElse(false) + def withNoParent(__v: _root_.scala.Boolean): Spec = copy(parent = pulumirpc.alias.Alias.Spec.Parent.NoParent(__v)) + def clearParent: Spec = copy(parent = pulumirpc.alias.Alias.Spec.Parent.Empty) + def withParent(__v: pulumirpc.alias.Alias.Spec.Parent): Spec = copy(parent = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = name + if (__t != "") __t else null + } + case 2 => { + val __t = `type` + if (__t != "") __t else null + } + case 3 => { + val __t = stack + if (__t != "") __t else null + } + case 4 => { + val __t = project + if (__t != "") __t else null + } + case 5 => parent.parentUrn.orNull + case 6 => parent.noParent.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(name) + case 2 => _root_.scalapb.descriptors.PString(`type`) + case 3 => _root_.scalapb.descriptors.PString(stack) + case 4 => _root_.scalapb.descriptors.PString(project) + case 5 => parent.parentUrn.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 6 => parent.noParent.map(_root_.scalapb.descriptors.PBoolean(_)).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.alias.Alias.Spec.type = pulumirpc.alias.Alias.Spec + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.Alias.Spec]) + } + + object Spec extends scalapb.GeneratedMessageCompanion[pulumirpc.alias.Alias.Spec] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.alias.Alias.Spec] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.alias.Alias.Spec = { + var __name: _root_.scala.Predef.String = "" + var __type: _root_.scala.Predef.String = "" + var __stack: _root_.scala.Predef.String = "" + var __project: _root_.scala.Predef.String = "" + var __parent: pulumirpc.alias.Alias.Spec.Parent = pulumirpc.alias.Alias.Spec.Parent.Empty + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __name = _input__.readStringRequireUtf8() + case 18 => + __type = _input__.readStringRequireUtf8() + case 26 => + __stack = _input__.readStringRequireUtf8() + case 34 => + __project = _input__.readStringRequireUtf8() + case 42 => + __parent = pulumirpc.alias.Alias.Spec.Parent.ParentUrn(_input__.readStringRequireUtf8()) + case 48 => + __parent = pulumirpc.alias.Alias.Spec.Parent.NoParent(_input__.readBool()) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.alias.Alias.Spec( + name = __name, + `type` = __type, + stack = __stack, + project = __project, + parent = __parent, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.alias.Alias.Spec] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.alias.Alias.Spec( + name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + `type` = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + stack = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + project = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + parent = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(pulumirpc.alias.Alias.Spec.Parent.ParentUrn(_)) + .orElse[pulumirpc.alias.Alias.Spec.Parent](__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Boolean]]).map(pulumirpc.alias.Alias.Spec.Parent.NoParent(_))) + .getOrElse(pulumirpc.alias.Alias.Spec.Parent.Empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.alias.Alias.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.alias.Alias.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.alias.Alias.Spec( + name = "", + `type` = "", + stack = "", + project = "", + parent = pulumirpc.alias.Alias.Spec.Parent.Empty + ) + sealed trait Parent extends _root_.scalapb.GeneratedOneof { + def isEmpty: _root_.scala.Boolean = false + def isDefined: _root_.scala.Boolean = true + def isParentUrn: _root_.scala.Boolean = false + def isNoParent: _root_.scala.Boolean = false + def parentUrn: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None + def noParent: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None + } + object Parent { + @SerialVersionUID(0L) + case object Empty extends pulumirpc.alias.Alias.Spec.Parent { + type ValueType = _root_.scala.Nothing + override def isEmpty: _root_.scala.Boolean = true + override def isDefined: _root_.scala.Boolean = false + override def number: _root_.scala.Int = 0 + override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value") + } + + @SerialVersionUID(0L) + final case class ParentUrn(value: _root_.scala.Predef.String) extends pulumirpc.alias.Alias.Spec.Parent { + type ValueType = _root_.scala.Predef.String + override def isParentUrn: _root_.scala.Boolean = true + override def parentUrn: _root_.scala.Option[_root_.scala.Predef.String] = Some(value) + override def number: _root_.scala.Int = 5 + } + @SerialVersionUID(0L) + final case class NoParent(value: _root_.scala.Boolean) extends pulumirpc.alias.Alias.Spec.Parent { + type ValueType = _root_.scala.Boolean + override def isNoParent: _root_.scala.Boolean = true + override def noParent: _root_.scala.Option[_root_.scala.Boolean] = Some(value) + override def number: _root_.scala.Int = 6 + } + } + implicit class SpecLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.alias.Alias.Spec]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.alias.Alias.Spec](_l) { + def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_)) + def `type`: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.`type`)((c_, f_) => c_.copy(`type` = f_)) + def stack: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.stack)((c_, f_) => c_.copy(stack = f_)) + def project: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.project)((c_, f_) => c_.copy(project = f_)) + def parentUrn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getParentUrn)((c_, f_) => c_.copy(parent = pulumirpc.alias.Alias.Spec.Parent.ParentUrn(f_))) + def noParent: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.getNoParent)((c_, f_) => c_.copy(parent = pulumirpc.alias.Alias.Spec.Parent.NoParent(f_))) + def parent: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.alias.Alias.Spec.Parent] = field(_.parent)((c_, f_) => c_.copy(parent = f_)) + } + final val NAME_FIELD_NUMBER = 1 + final val TYPE_FIELD_NUMBER = 2 + final val STACK_FIELD_NUMBER = 3 + final val PROJECT_FIELD_NUMBER = 4 + final val PARENTURN_FIELD_NUMBER = 5 + final val NOPARENT_FIELD_NUMBER = 6 + def of( + name: _root_.scala.Predef.String, + `type`: _root_.scala.Predef.String, + stack: _root_.scala.Predef.String, + project: _root_.scala.Predef.String, + parent: pulumirpc.alias.Alias.Spec.Parent + ): _root_.pulumirpc.alias.Alias.Spec = _root_.pulumirpc.alias.Alias.Spec( + name, + `type`, + stack, + project, + parent + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.Alias.Spec]) + } + + implicit class AliasLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.alias.Alias]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.alias.Alias](_l) { + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getUrn)((c_, f_) => c_.copy(alias = pulumirpc.alias.Alias.Alias.Urn(f_))) + def spec: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.alias.Alias.Spec] = field(_.getSpec)((c_, f_) => c_.copy(alias = pulumirpc.alias.Alias.Alias.Spec(f_))) + def alias: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.alias.Alias.Alias] = field(_.alias)((c_, f_) => c_.copy(alias = f_)) + } + final val URN_FIELD_NUMBER = 1 + final val SPEC_FIELD_NUMBER = 2 + def of( + alias: pulumirpc.alias.Alias.Alias + ): _root_.pulumirpc.alias.Alias = _root_.pulumirpc.alias.Alias( + alias + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.Alias]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/alias/AliasProto.scala b/besom-rpc/src/main/scala/pulumirpc/alias/AliasProto.scala new file mode 100644 index 00000000..a2ab0646 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/alias/AliasProto.scala @@ -0,0 +1,34 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.alias + +object AliasProto extends _root_.scalapb.GeneratedFileObject { + lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq.empty + lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + pulumirpc.alias.Alias + ) + private lazy val ProtoBytes: _root_.scala.Array[Byte] = + scalapb.Encoding.fromBase64(scala.collection.immutable.Seq( + """ChJwdWx1bWkvYWxpYXMucHJvdG8SCXB1bHVtaXJwYyLeAgoFQWxpYXMSHAoDdXJuGAEgASgJQgjiPwUSA3VybkgAUgN1cm4SN + goEc3BlYxgCIAEoCzIVLnB1bHVtaXJwYy5BbGlhcy5TcGVjQgniPwYSBHNwZWNIAFIEc3BlYxr1AQoEU3BlYxIdCgRuYW1lGAEgA + SgJQgniPwYSBG5hbWVSBG5hbWUSHQoEdHlwZRgCIAEoCUIJ4j8GEgR0eXBlUgR0eXBlEiAKBXN0YWNrGAMgASgJQgriPwcSBXN0Y + WNrUgVzdGFjaxImCgdwcm9qZWN0GAQgASgJQgziPwkSB3Byb2plY3RSB3Byb2plY3QSLgoJcGFyZW50VXJuGAUgASgJQg7iPwsSC + XBhcmVudFVybkgAUglwYXJlbnRVcm4SKwoIbm9QYXJlbnQYBiABKAhCDeI/ChIIbm9QYXJlbnRIAFIIbm9QYXJlbnRCCAoGcGFyZ + W50QgcKBWFsaWFzQjRaMmdpdGh1Yi5jb20vcHVsdW1pL3B1bHVtaS9zZGsvdjMvcHJvdG8vZ287cHVsdW1pcnBjYgZwcm90bzM=""" + ).mkString) + lazy val scalaDescriptor: _root_.scalapb.descriptors.FileDescriptor = { + val scalaProto = com.google.protobuf.descriptor.FileDescriptorProto.parseFrom(ProtoBytes) + _root_.scalapb.descriptors.FileDescriptor.buildFrom(scalaProto, dependencies.map(_.scalaDescriptor)) + } + lazy val javaDescriptor: com.google.protobuf.Descriptors.FileDescriptor = { + val javaProto = com.google.protobuf.DescriptorProtos.FileDescriptorProto.parseFrom(ProtoBytes) + com.google.protobuf.Descriptors.FileDescriptor.buildFrom(javaProto, _root_.scala.Array( + )) + } + @deprecated("Use javaDescriptor instead. In a future version this will refer to scalaDescriptor.", "ScalaPB 0.5.47") + def descriptor: com.google.protobuf.Descriptors.FileDescriptor = javaDescriptor +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/callback/Callback.scala b/besom-rpc/src/main/scala/pulumirpc/callback/Callback.scala new file mode 100644 index 00000000..d65b5ca1 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/callback/Callback.scala @@ -0,0 +1,152 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.callback + +/** @param target + * the gRPC target of the callback service. + * @param token + * the service specific unique token for this callback. + */ +@SerialVersionUID(0L) +final case class Callback( + target: _root_.scala.Predef.String = "", + token: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Callback] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = target + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = token + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = target + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = token + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withTarget(__v: _root_.scala.Predef.String): Callback = copy(target = __v) + def withToken(__v: _root_.scala.Predef.String): Callback = copy(token = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = target + if (__t != "") __t else null + } + case 2 => { + val __t = token + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(target) + case 2 => _root_.scalapb.descriptors.PString(token) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.callback.Callback.type = pulumirpc.callback.Callback + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.Callback]) +} + +object Callback extends scalapb.GeneratedMessageCompanion[pulumirpc.callback.Callback] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.callback.Callback] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.callback.Callback = { + var __target: _root_.scala.Predef.String = "" + var __token: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __target = _input__.readStringRequireUtf8() + case 18 => + __token = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.callback.Callback( + target = __target, + token = __token, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.callback.Callback] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.callback.Callback( + target = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + token = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + 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 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) + lazy val defaultInstance = pulumirpc.callback.Callback( + target = "", + token = "" + ) + implicit class CallbackLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.callback.Callback]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.callback.Callback](_l) { + def target: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.target)((c_, f_) => c_.copy(target = f_)) + def token: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.token)((c_, f_) => c_.copy(token = f_)) + } + final val TARGET_FIELD_NUMBER = 1 + final val TOKEN_FIELD_NUMBER = 2 + def of( + target: _root_.scala.Predef.String, + token: _root_.scala.Predef.String + ): _root_.pulumirpc.callback.Callback = _root_.pulumirpc.callback.Callback( + target, + token + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.Callback]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/callback/CallbackInvokeRequest.scala b/besom-rpc/src/main/scala/pulumirpc/callback/CallbackInvokeRequest.scala new file mode 100644 index 00000000..696a0104 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/callback/CallbackInvokeRequest.scala @@ -0,0 +1,152 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.callback + +/** @param token + * the token for the callback. + * @param request + * the serialized protobuf message of the arguments for this callback. + */ +@SerialVersionUID(0L) +final case class CallbackInvokeRequest( + token: _root_.scala.Predef.String = "", + request: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[CallbackInvokeRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = token + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = request + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = token + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = request + if (!__v.isEmpty) { + _output__.writeBytes(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withToken(__v: _root_.scala.Predef.String): CallbackInvokeRequest = copy(token = __v) + def withRequest(__v: _root_.com.google.protobuf.ByteString): CallbackInvokeRequest = copy(request = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = token + if (__t != "") __t else null + } + case 2 => { + val __t = request + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(token) + case 2 => _root_.scalapb.descriptors.PByteString(request) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.callback.CallbackInvokeRequest.type = pulumirpc.callback.CallbackInvokeRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CallbackInvokeRequest]) +} + +object CallbackInvokeRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.callback.CallbackInvokeRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.callback.CallbackInvokeRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.callback.CallbackInvokeRequest = { + var __token: _root_.scala.Predef.String = "" + var __request: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __token = _input__.readStringRequireUtf8() + case 18 => + __request = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.callback.CallbackInvokeRequest( + token = __token, + request = __request, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.callback.CallbackInvokeRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.callback.CallbackInvokeRequest( + token = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + request = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + 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 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) + lazy val defaultInstance = pulumirpc.callback.CallbackInvokeRequest( + token = "", + request = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class CallbackInvokeRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.callback.CallbackInvokeRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.callback.CallbackInvokeRequest](_l) { + def token: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.token)((c_, f_) => c_.copy(token = f_)) + def request: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.request)((c_, f_) => c_.copy(request = f_)) + } + final val TOKEN_FIELD_NUMBER = 1 + final val REQUEST_FIELD_NUMBER = 2 + def of( + token: _root_.scala.Predef.String, + request: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.callback.CallbackInvokeRequest = _root_.pulumirpc.callback.CallbackInvokeRequest( + token, + request + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CallbackInvokeRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/callback/CallbackInvokeResponse.scala b/besom-rpc/src/main/scala/pulumirpc/callback/CallbackInvokeResponse.scala new file mode 100644 index 00000000..4c299aec --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/callback/CallbackInvokeResponse.scala @@ -0,0 +1,120 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.callback + +/** @param response + * the serialized protobuf message of the response for this callback. + */ +@SerialVersionUID(0L) +final case class CallbackInvokeResponse( + response: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[CallbackInvokeResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = response + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(1, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = response + if (!__v.isEmpty) { + _output__.writeBytes(1, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withResponse(__v: _root_.com.google.protobuf.ByteString): CallbackInvokeResponse = copy(response = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = response + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PByteString(response) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.callback.CallbackInvokeResponse.type = pulumirpc.callback.CallbackInvokeResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CallbackInvokeResponse]) +} + +object CallbackInvokeResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.callback.CallbackInvokeResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.callback.CallbackInvokeResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.callback.CallbackInvokeResponse = { + var __response: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __response = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.callback.CallbackInvokeResponse( + response = __response, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.callback.CallbackInvokeResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.callback.CallbackInvokeResponse( + response = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + 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 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) + lazy val defaultInstance = pulumirpc.callback.CallbackInvokeResponse( + response = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class CallbackInvokeResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.callback.CallbackInvokeResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.callback.CallbackInvokeResponse](_l) { + def response: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.response)((c_, f_) => c_.copy(response = f_)) + } + final val RESPONSE_FIELD_NUMBER = 1 + def of( + response: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.callback.CallbackInvokeResponse = _root_.pulumirpc.callback.CallbackInvokeResponse( + response + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CallbackInvokeResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/callback/CallbackProto.scala b/besom-rpc/src/main/scala/pulumirpc/callback/CallbackProto.scala new file mode 100644 index 00000000..8c093687 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/callback/CallbackProto.scala @@ -0,0 +1,36 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.callback + +object CallbackProto extends _root_.scalapb.GeneratedFileObject { + lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq.empty + lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + pulumirpc.callback.Callback, + pulumirpc.callback.CallbackInvokeRequest, + pulumirpc.callback.CallbackInvokeResponse + ) + private lazy val ProtoBytes: _root_.scala.Array[Byte] = + scalapb.Encoding.fromBase64(scala.collection.immutable.Seq( + """ChVwdWx1bWkvY2FsbGJhY2sucHJvdG8SCXB1bHVtaXJwYyJRCghDYWxsYmFjaxIjCgZ0YXJnZXQYASABKAlCC+I/CBIGdGFyZ + 2V0UgZ0YXJnZXQSIAoFdG9rZW4YAiABKAlCCuI/BxIFdG9rZW5SBXRva2VuImEKFUNhbGxiYWNrSW52b2tlUmVxdWVzdBIgCgV0b + 2tlbhgBIAEoCUIK4j8HEgV0b2tlblIFdG9rZW4SJgoHcmVxdWVzdBgCIAEoDEIM4j8JEgdyZXF1ZXN0UgdyZXF1ZXN0IkMKFkNhb + GxiYWNrSW52b2tlUmVzcG9uc2USKQoIcmVzcG9uc2UYASABKAxCDeI/ChIIcmVzcG9uc2VSCHJlc3BvbnNlMlwKCUNhbGxiYWNrc + xJPCgZJbnZva2USIC5wdWx1bWlycGMuQ2FsbGJhY2tJbnZva2VSZXF1ZXN0GiEucHVsdW1pcnBjLkNhbGxiYWNrSW52b2tlUmVzc + G9uc2UiAEI0WjJnaXRodWIuY29tL3B1bHVtaS9wdWx1bWkvc2RrL3YzL3Byb3RvL2dvO3B1bHVtaXJwY2IGcHJvdG8z""" + ).mkString) + lazy val scalaDescriptor: _root_.scalapb.descriptors.FileDescriptor = { + val scalaProto = com.google.protobuf.descriptor.FileDescriptorProto.parseFrom(ProtoBytes) + _root_.scalapb.descriptors.FileDescriptor.buildFrom(scalaProto, dependencies.map(_.scalaDescriptor)) + } + lazy val javaDescriptor: com.google.protobuf.Descriptors.FileDescriptor = { + val javaProto = com.google.protobuf.DescriptorProtos.FileDescriptorProto.parseFrom(ProtoBytes) + com.google.protobuf.Descriptors.FileDescriptor.buildFrom(javaProto, _root_.scala.Array( + )) + } + @deprecated("Use javaDescriptor instead. In a future version this will refer to scalaDescriptor.", "ScalaPB 0.5.47") + def descriptor: com.google.protobuf.Descriptors.FileDescriptor = javaDescriptor +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/callback/CallbacksGrpc.scala b/besom-rpc/src/main/scala/pulumirpc/callback/CallbacksGrpc.scala new file mode 100644 index 00000000..2cc0d5c1 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/callback/CallbacksGrpc.scala @@ -0,0 +1,93 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.callback + + +object CallbacksGrpc { + val METHOD_INVOKE: _root_.io.grpc.MethodDescriptor[pulumirpc.callback.CallbackInvokeRequest, pulumirpc.callback.CallbackInvokeResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.Callbacks", "Invoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.callback.CallbackInvokeRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.callback.CallbackInvokeResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.callback.CallbackProto.javaDescriptor.getServices().get(0).getMethods().get(0))) + .build() + + val SERVICE: _root_.io.grpc.ServiceDescriptor = + _root_.io.grpc.ServiceDescriptor.newBuilder("pulumirpc.Callbacks") + .setSchemaDescriptor(new _root_.scalapb.grpc.ConcreteProtoFileDescriptorSupplier(pulumirpc.callback.CallbackProto.javaDescriptor)) + .addMethod(METHOD_INVOKE) + .build() + + /** Callbacks is a service for invoking functions in one runtime from other processes. + */ + trait Callbacks extends _root_.scalapb.grpc.AbstractService { + override def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[Callbacks] = Callbacks + /** Invoke invokes a given callback, identified by its token. + */ + def invoke(request: pulumirpc.callback.CallbackInvokeRequest): scala.concurrent.Future[pulumirpc.callback.CallbackInvokeResponse] + } + + object Callbacks extends _root_.scalapb.grpc.ServiceCompanion[Callbacks] { + implicit def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[Callbacks] = this + def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = pulumirpc.callback.CallbackProto.javaDescriptor.getServices().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.ServiceDescriptor = pulumirpc.callback.CallbackProto.scalaDescriptor.services(0) + def bindService(serviceImpl: Callbacks, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = + _root_.io.grpc.ServerServiceDefinition.builder(SERVICE) + .addMethod( + METHOD_INVOKE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.callback.CallbackInvokeRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.callback.CallbackInvokeResponse]) => { + serviceImpl.invoke(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .build() + } + + /** Callbacks is a service for invoking functions in one runtime from other processes. + */ + trait CallbacksBlockingClient { + def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[Callbacks] = Callbacks + /** Invoke invokes a given callback, identified by its token. + */ + def invoke(request: pulumirpc.callback.CallbackInvokeRequest): pulumirpc.callback.CallbackInvokeResponse + } + + class CallbacksBlockingStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[CallbacksBlockingStub](channel, options) with CallbacksBlockingClient { + /** Invoke invokes a given callback, identified by its token. + */ + override def invoke(request: pulumirpc.callback.CallbackInvokeRequest): pulumirpc.callback.CallbackInvokeResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_INVOKE, options, request) + } + + override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): CallbacksBlockingStub = new CallbacksBlockingStub(channel, options) + } + + class CallbacksStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[CallbacksStub](channel, options) with Callbacks { + /** Invoke invokes a given callback, identified by its token. + */ + override def invoke(request: pulumirpc.callback.CallbackInvokeRequest): scala.concurrent.Future[pulumirpc.callback.CallbackInvokeResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_INVOKE, options, request) + } + + override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): CallbacksStub = new CallbacksStub(channel, options) + } + + object CallbacksStub extends _root_.io.grpc.stub.AbstractStub.StubFactory[CallbacksStub] { + override def newStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): CallbacksStub = new CallbacksStub(channel, options) + + implicit val stubFactory: _root_.io.grpc.stub.AbstractStub.StubFactory[CallbacksStub] = this + } + + def bindService(serviceImpl: Callbacks, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = Callbacks.bindService(serviceImpl, executionContext) + + def blockingStub(channel: _root_.io.grpc.Channel): CallbacksBlockingStub = new CallbacksBlockingStub(channel) + + def stub(channel: _root_.io.grpc.Channel): CallbacksStub = new CallbacksStub(channel) + + def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = pulumirpc.callback.CallbackProto.javaDescriptor.getServices().get(0) + +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/Diagnostic.scala b/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/Diagnostic.scala new file mode 100644 index 00000000..5dd4c45f --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/Diagnostic.scala @@ -0,0 +1,261 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.codegen.hcl + +/** Diagnostic represents information to be presented to a user about an error or anomaly in parsing or evaluating configuration. + * + * @param summary + * Summary and Detail contain the English-language description of the + * problem. Summary is a terse description of the general problem and + * detail is a more elaborate, often-multi-sentence description of + * the problem and what might be done to solve it. + * @param subject + * Subject and Context are both source ranges relating to the diagnostic. + * + * Subject is a tight range referring to exactly the construct that + * is problematic, while Context is an optional broader range (which should + * fully contain Subject) that ought to be shown around Subject when + * generating isolated source-code snippets in diagnostic messages. + * If Context is nil, the Subject is also the Context. + * + * Some diagnostics have no source ranges at all. If Context is set then + * Subject should always also be set. + */ +@SerialVersionUID(0L) +final case class Diagnostic( + severity: pulumirpc.codegen.hcl.DiagnosticSeverity = pulumirpc.codegen.hcl.DiagnosticSeverity.DIAG_INVALID, + summary: _root_.scala.Predef.String = "", + detail: _root_.scala.Predef.String = "", + subject: _root_.scala.Option[pulumirpc.codegen.hcl.Range] = _root_.scala.None, + context: _root_.scala.Option[pulumirpc.codegen.hcl.Range] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Diagnostic] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = severity.value + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(1, __value) + } + }; + + { + val __value = summary + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = detail + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + if (subject.isDefined) { + val __value = subject.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + if (context.isDefined) { + val __value = context.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = severity.value + if (__v != 0) { + _output__.writeEnum(1, __v) + } + }; + { + val __v = summary + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = detail + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + subject.foreach { __v => + val __m = __v + _output__.writeTag(4, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + context.foreach { __v => + val __m = __v + _output__.writeTag(5, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withSeverity(__v: pulumirpc.codegen.hcl.DiagnosticSeverity): Diagnostic = copy(severity = __v) + def withSummary(__v: _root_.scala.Predef.String): Diagnostic = copy(summary = __v) + def withDetail(__v: _root_.scala.Predef.String): Diagnostic = copy(detail = __v) + def getSubject: pulumirpc.codegen.hcl.Range = subject.getOrElse(pulumirpc.codegen.hcl.Range.defaultInstance) + def clearSubject: Diagnostic = copy(subject = _root_.scala.None) + def withSubject(__v: pulumirpc.codegen.hcl.Range): Diagnostic = copy(subject = Option(__v)) + def getContext: pulumirpc.codegen.hcl.Range = context.getOrElse(pulumirpc.codegen.hcl.Range.defaultInstance) + def clearContext: Diagnostic = copy(context = _root_.scala.None) + def withContext(__v: pulumirpc.codegen.hcl.Range): Diagnostic = copy(context = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = severity.javaValueDescriptor + if (__t.getNumber() != 0) __t else null + } + case 2 => { + val __t = summary + if (__t != "") __t else null + } + case 3 => { + val __t = detail + if (__t != "") __t else null + } + case 4 => subject.orNull + case 5 => context.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PEnum(severity.scalaValueDescriptor) + case 2 => _root_.scalapb.descriptors.PString(summary) + case 3 => _root_.scalapb.descriptors.PString(detail) + case 4 => subject.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 5 => context.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.codegen.hcl.Diagnostic.type = pulumirpc.codegen.hcl.Diagnostic + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.codegen.Diagnostic]) +} + +object Diagnostic extends scalapb.GeneratedMessageCompanion[pulumirpc.codegen.hcl.Diagnostic] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.codegen.hcl.Diagnostic] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.codegen.hcl.Diagnostic = { + var __severity: pulumirpc.codegen.hcl.DiagnosticSeverity = pulumirpc.codegen.hcl.DiagnosticSeverity.DIAG_INVALID + var __summary: _root_.scala.Predef.String = "" + var __detail: _root_.scala.Predef.String = "" + var __subject: _root_.scala.Option[pulumirpc.codegen.hcl.Range] = _root_.scala.None + var __context: _root_.scala.Option[pulumirpc.codegen.hcl.Range] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 8 => + __severity = pulumirpc.codegen.hcl.DiagnosticSeverity.fromValue(_input__.readEnum()) + case 18 => + __summary = _input__.readStringRequireUtf8() + case 26 => + __detail = _input__.readStringRequireUtf8() + case 34 => + __subject = _root_.scala.Option(__subject.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.codegen.hcl.Range](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 42 => + __context = _root_.scala.Option(__context.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.codegen.hcl.Range](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.codegen.hcl.Diagnostic( + severity = __severity, + summary = __summary, + detail = __detail, + subject = __subject, + context = __context, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.codegen.hcl.Diagnostic] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.codegen.hcl.Diagnostic( + severity = pulumirpc.codegen.hcl.DiagnosticSeverity.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(pulumirpc.codegen.hcl.DiagnosticSeverity.DIAG_INVALID.scalaValueDescriptor).number), + summary = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + detail = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + subject = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[pulumirpc.codegen.hcl.Range]]), + context = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[pulumirpc.codegen.hcl.Range]]) + ) + 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 messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 4 => __out = pulumirpc.codegen.hcl.Range + case 5 => __out = pulumirpc.codegen.hcl.Range + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = Seq.empty + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => pulumirpc.codegen.hcl.DiagnosticSeverity + } + } + lazy val defaultInstance = pulumirpc.codegen.hcl.Diagnostic( + severity = pulumirpc.codegen.hcl.DiagnosticSeverity.DIAG_INVALID, + summary = "", + detail = "", + subject = _root_.scala.None, + context = _root_.scala.None + ) + implicit class DiagnosticLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.codegen.hcl.Diagnostic]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.codegen.hcl.Diagnostic](_l) { + def severity: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.codegen.hcl.DiagnosticSeverity] = field(_.severity)((c_, f_) => c_.copy(severity = f_)) + def summary: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.summary)((c_, f_) => c_.copy(summary = f_)) + def detail: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.detail)((c_, f_) => c_.copy(detail = f_)) + def subject: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.codegen.hcl.Range] = field(_.getSubject)((c_, f_) => c_.copy(subject = _root_.scala.Option(f_))) + def optionalSubject: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.codegen.hcl.Range]] = field(_.subject)((c_, f_) => c_.copy(subject = f_)) + def context: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.codegen.hcl.Range] = field(_.getContext)((c_, f_) => c_.copy(context = _root_.scala.Option(f_))) + def optionalContext: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.codegen.hcl.Range]] = field(_.context)((c_, f_) => c_.copy(context = f_)) + } + final val SEVERITY_FIELD_NUMBER = 1 + final val SUMMARY_FIELD_NUMBER = 2 + final val DETAIL_FIELD_NUMBER = 3 + final val SUBJECT_FIELD_NUMBER = 4 + final val CONTEXT_FIELD_NUMBER = 5 + def of( + severity: pulumirpc.codegen.hcl.DiagnosticSeverity, + summary: _root_.scala.Predef.String, + detail: _root_.scala.Predef.String, + subject: _root_.scala.Option[pulumirpc.codegen.hcl.Range], + context: _root_.scala.Option[pulumirpc.codegen.hcl.Range] + ): _root_.pulumirpc.codegen.hcl.Diagnostic = _root_.pulumirpc.codegen.hcl.Diagnostic( + severity, + summary, + detail, + subject, + context + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.codegen.Diagnostic]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/DiagnosticSeverity.scala b/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/DiagnosticSeverity.scala new file mode 100644 index 00000000..e993be77 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/DiagnosticSeverity.scala @@ -0,0 +1,65 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.codegen.hcl + +/** DiagnosticSeverity is the severity level of a diagnostic message. + */ +sealed abstract class DiagnosticSeverity(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum { + type EnumType = pulumirpc.codegen.hcl.DiagnosticSeverity + type RecognizedType = pulumirpc.codegen.hcl.DiagnosticSeverity.Recognized + def isDiagInvalid: _root_.scala.Boolean = false + def isDiagError: _root_.scala.Boolean = false + def isDiagWarning: _root_.scala.Boolean = false + def companion: _root_.scalapb.GeneratedEnumCompanion[DiagnosticSeverity] = pulumirpc.codegen.hcl.DiagnosticSeverity + final def asRecognized: _root_.scala.Option[pulumirpc.codegen.hcl.DiagnosticSeverity.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[pulumirpc.codegen.hcl.DiagnosticSeverity.Recognized]) +} + +object DiagnosticSeverity extends _root_.scalapb.GeneratedEnumCompanion[DiagnosticSeverity] { + sealed trait Recognized extends DiagnosticSeverity + implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[DiagnosticSeverity] = this + + /** DIAG_INVALID is the invalid zero value of DiagnosticSeverity + */ + @SerialVersionUID(0L) + case object DIAG_INVALID extends DiagnosticSeverity(0) with DiagnosticSeverity.Recognized { + val index = 0 + val name = "DIAG_INVALID" + override def isDiagInvalid: _root_.scala.Boolean = true + } + + /** DIAG_ERROR indicates that the problem reported by a diagnostic prevents + * further progress in parsing and/or evaluating the subject. + */ + @SerialVersionUID(0L) + case object DIAG_ERROR extends DiagnosticSeverity(1) with DiagnosticSeverity.Recognized { + val index = 1 + val name = "DIAG_ERROR" + override def isDiagError: _root_.scala.Boolean = true + } + + /** DIAG_WARNING indicates that the problem reported by a diagnostic warrants + * user attention but does not prevent further progress. It is most + * commonly used for showing deprecation notices. + */ + @SerialVersionUID(0L) + case object DIAG_WARNING extends DiagnosticSeverity(2) with DiagnosticSeverity.Recognized { + val index = 2 + val name = "DIAG_WARNING" + override def isDiagWarning: _root_.scala.Boolean = true + } + + @SerialVersionUID(0L) + final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends DiagnosticSeverity(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum + lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(DIAG_INVALID, DIAG_ERROR, DIAG_WARNING) + def fromValue(__value: _root_.scala.Int): DiagnosticSeverity = __value match { + case 0 => DIAG_INVALID + case 1 => DIAG_ERROR + 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) +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/HclProto.scala b/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/HclProto.scala new file mode 100644 index 00000000..8fc039a8 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/HclProto.scala @@ -0,0 +1,41 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.codegen.hcl + +object HclProto extends _root_.scalapb.GeneratedFileObject { + lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq.empty + lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + pulumirpc.codegen.hcl.Pos, + pulumirpc.codegen.hcl.Range, + pulumirpc.codegen.hcl.Diagnostic + ) + private lazy val ProtoBytes: _root_.scala.Array[Byte] = + scalapb.Encoding.fromBase64(scala.collection.immutable.Seq( + """ChhwdWx1bWkvY29kZWdlbi9oY2wucHJvdG8SEXB1bHVtaXJwYy5jb2RlZ2VuImgKA1BvcxIdCgRsaW5lGAEgASgDQgniPwYSB + GxpbmVSBGxpbmUSIwoGY29sdW1uGAIgASgDQgviPwgSBmNvbHVtblIGY29sdW1uEh0KBGJ5dGUYAyABKANCCeI/BhIEYnl0ZVIEY + nl0ZSKgAQoFUmFuZ2USKQoIZmlsZW5hbWUYASABKAlCDeI/ChIIZmlsZW5hbWVSCGZpbGVuYW1lEjgKBXN0YXJ0GAIgASgLMhYuc + HVsdW1pcnBjLmNvZGVnZW4uUG9zQgriPwcSBXN0YXJ0UgVzdGFydBIyCgNlbmQYAyABKAsyFi5wdWx1bWlycGMuY29kZWdlbi5Qb + 3NCCOI/BRIDZW5kUgNlbmQirwIKCkRpYWdub3N0aWMSUAoIc2V2ZXJpdHkYASABKA4yJS5wdWx1bWlycGMuY29kZWdlbi5EaWFnb + m9zdGljU2V2ZXJpdHlCDeI/ChIIc2V2ZXJpdHlSCHNldmVyaXR5EiYKB3N1bW1hcnkYAiABKAlCDOI/CRIHc3VtbWFyeVIHc3Vtb + WFyeRIjCgZkZXRhaWwYAyABKAlCC+I/CBIGZGV0YWlsUgZkZXRhaWwSQAoHc3ViamVjdBgEIAEoCzIYLnB1bHVtaXJwYy5jb2RlZ + 2VuLlJhbmdlQgziPwkSB3N1YmplY3RSB3N1YmplY3QSQAoHY29udGV4dBgFIAEoCzIYLnB1bHVtaXJwYy5jb2RlZ2VuLlJhbmdlQ + gziPwkSB2NvbnRleHRSB2NvbnRleHQqfwoSRGlhZ25vc3RpY1NldmVyaXR5EiMKDERJQUdfSU5WQUxJRBAAGhHiPw4SDERJQUdfS + U5WQUxJRBIfCgpESUFHX0VSUk9SEAEaD+I/DBIKRElBR19FUlJPUhIjCgxESUFHX1dBUk5JTkcQAhoR4j8OEgxESUFHX1dBUk5JT + kdCMlowZ2l0aHViLmNvbS9wdWx1bWkvcHVsdW1pL3Nkay92My9wcm90by9nby9jb2RlZ2VuYgZwcm90bzM=""" + ).mkString) + lazy val scalaDescriptor: _root_.scalapb.descriptors.FileDescriptor = { + val scalaProto = com.google.protobuf.descriptor.FileDescriptorProto.parseFrom(ProtoBytes) + _root_.scalapb.descriptors.FileDescriptor.buildFrom(scalaProto, dependencies.map(_.scalaDescriptor)) + } + lazy val javaDescriptor: com.google.protobuf.Descriptors.FileDescriptor = { + val javaProto = com.google.protobuf.DescriptorProtos.FileDescriptorProto.parseFrom(ProtoBytes) + com.google.protobuf.Descriptors.FileDescriptor.buildFrom(javaProto, _root_.scala.Array( + )) + } + @deprecated("Use javaDescriptor instead. In a future version this will refer to scalaDescriptor.", "ScalaPB 0.5.47") + def descriptor: com.google.protobuf.Descriptors.FileDescriptor = javaDescriptor +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/Pos.scala b/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/Pos.scala new file mode 100644 index 00000000..8ce6b91a --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/Pos.scala @@ -0,0 +1,196 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.codegen.hcl + +/** Pos represents a single position in a source file, by addressing the start byte of a unicode character + * encoded in UTF-8. + * + * @param line + * Line is the source code line where this position points. Lines are counted starting at 1 and + * incremented for each newline character encountered. + * @param column + * Column is the source code column where this position points, in unicode characters, with counting + * starting at 1. + * + * Column counts characters as they appear visually, so for example a latin letter with a combining + * diacritic mark counts as one character. This is intended for rendering visual markers against source + * code in contexts where these diacritics would be rendered in a single character cell. Technically + * speaking, Column is counting grapheme clusters as used in unicode normalization. + * @param byte + * Byte is the byte offset into the file where the indicated character begins. This is a zero-based offset + * to the first byte of the first UTF-8 codepoint sequence in the character, and thus gives a position + * that can be resolved _without_ awareness of Unicode characters. + */ +@SerialVersionUID(0L) +final case class Pos( + line: _root_.scala.Long = 0L, + column: _root_.scala.Long = 0L, + byte: _root_.scala.Long = 0L, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Pos] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = line + if (__value != 0L) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(1, __value) + } + }; + + { + val __value = column + if (__value != 0L) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(2, __value) + } + }; + + { + val __value = byte + if (__value != 0L) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(3, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = line + if (__v != 0L) { + _output__.writeInt64(1, __v) + } + }; + { + val __v = column + if (__v != 0L) { + _output__.writeInt64(2, __v) + } + }; + { + val __v = byte + if (__v != 0L) { + _output__.writeInt64(3, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withLine(__v: _root_.scala.Long): Pos = copy(line = __v) + def withColumn(__v: _root_.scala.Long): Pos = copy(column = __v) + def withByte(__v: _root_.scala.Long): Pos = copy(byte = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = line + if (__t != 0L) __t else null + } + case 2 => { + val __t = column + if (__t != 0L) __t else null + } + case 3 => { + val __t = byte + if (__t != 0L) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PLong(line) + case 2 => _root_.scalapb.descriptors.PLong(column) + case 3 => _root_.scalapb.descriptors.PLong(byte) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.codegen.hcl.Pos.type = pulumirpc.codegen.hcl.Pos + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.codegen.Pos]) +} + +object Pos extends scalapb.GeneratedMessageCompanion[pulumirpc.codegen.hcl.Pos] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.codegen.hcl.Pos] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.codegen.hcl.Pos = { + var __line: _root_.scala.Long = 0L + var __column: _root_.scala.Long = 0L + var __byte: _root_.scala.Long = 0L + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 8 => + __line = _input__.readInt64() + case 16 => + __column = _input__.readInt64() + case 24 => + __byte = _input__.readInt64() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.codegen.hcl.Pos( + line = __line, + column = __column, + byte = __byte, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.codegen.hcl.Pos] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.codegen.hcl.Pos( + line = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L), + column = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L), + byte = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Long]).getOrElse(0L) + ) + 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 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) + lazy val defaultInstance = pulumirpc.codegen.hcl.Pos( + line = 0L, + column = 0L, + byte = 0L + ) + implicit class PosLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.codegen.hcl.Pos]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.codegen.hcl.Pos](_l) { + def line: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.line)((c_, f_) => c_.copy(line = f_)) + def column: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.column)((c_, f_) => c_.copy(column = f_)) + def byte: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.byte)((c_, f_) => c_.copy(byte = f_)) + } + final val LINE_FIELD_NUMBER = 1 + final val COLUMN_FIELD_NUMBER = 2 + final val BYTE_FIELD_NUMBER = 3 + def of( + line: _root_.scala.Long, + column: _root_.scala.Long, + byte: _root_.scala.Long + ): _root_.pulumirpc.codegen.hcl.Pos = _root_.pulumirpc.codegen.hcl.Pos( + line, + column, + byte + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.codegen.Pos]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/Range.scala b/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/Range.scala new file mode 100644 index 00000000..c164ed81 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/codegen/hcl/Range.scala @@ -0,0 +1,185 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.codegen.hcl + +/** Range represents a span of characters between two positions in a source file. + * + * @param filename + * Filename is the name of the file into which this range's positions point. + * @param start + * Start and End represent the bounds of this range. Start is inclusive and End is exclusive. + */ +@SerialVersionUID(0L) +final case class Range( + filename: _root_.scala.Predef.String = "", + start: _root_.scala.Option[pulumirpc.codegen.hcl.Pos] = _root_.scala.None, + end: _root_.scala.Option[pulumirpc.codegen.hcl.Pos] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Range] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = filename + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (start.isDefined) { + val __value = start.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + if (end.isDefined) { + val __value = end.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = filename + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + start.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + end.foreach { __v => + val __m = __v + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withFilename(__v: _root_.scala.Predef.String): Range = copy(filename = __v) + def getStart: pulumirpc.codegen.hcl.Pos = start.getOrElse(pulumirpc.codegen.hcl.Pos.defaultInstance) + def clearStart: Range = copy(start = _root_.scala.None) + def withStart(__v: pulumirpc.codegen.hcl.Pos): Range = copy(start = Option(__v)) + def getEnd: pulumirpc.codegen.hcl.Pos = end.getOrElse(pulumirpc.codegen.hcl.Pos.defaultInstance) + def clearEnd: Range = copy(end = _root_.scala.None) + def withEnd(__v: pulumirpc.codegen.hcl.Pos): Range = copy(end = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = filename + if (__t != "") __t else null + } + case 2 => start.orNull + case 3 => end.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(filename) + case 2 => start.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 3 => end.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.codegen.hcl.Range.type = pulumirpc.codegen.hcl.Range + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.codegen.Range]) +} + +object Range extends scalapb.GeneratedMessageCompanion[pulumirpc.codegen.hcl.Range] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.codegen.hcl.Range] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.codegen.hcl.Range = { + var __filename: _root_.scala.Predef.String = "" + var __start: _root_.scala.Option[pulumirpc.codegen.hcl.Pos] = _root_.scala.None + var __end: _root_.scala.Option[pulumirpc.codegen.hcl.Pos] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __filename = _input__.readStringRequireUtf8() + case 18 => + __start = _root_.scala.Option(__start.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.codegen.hcl.Pos](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 26 => + __end = _root_.scala.Option(__end.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.codegen.hcl.Pos](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.codegen.hcl.Range( + filename = __filename, + start = __start, + end = __end, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.codegen.hcl.Range] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.codegen.hcl.Range( + filename = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + start = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[pulumirpc.codegen.hcl.Pos]]), + end = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[pulumirpc.codegen.hcl.Pos]]) + ) + 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 messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = pulumirpc.codegen.hcl.Pos + case 3 => __out = pulumirpc.codegen.hcl.Pos + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.codegen.hcl.Range( + filename = "", + start = _root_.scala.None, + end = _root_.scala.None + ) + implicit class RangeLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.codegen.hcl.Range]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.codegen.hcl.Range](_l) { + def filename: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.filename)((c_, f_) => c_.copy(filename = f_)) + def start: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.codegen.hcl.Pos] = field(_.getStart)((c_, f_) => c_.copy(start = _root_.scala.Option(f_))) + def optionalStart: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.codegen.hcl.Pos]] = field(_.start)((c_, f_) => c_.copy(start = f_)) + def end: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.codegen.hcl.Pos] = field(_.getEnd)((c_, f_) => c_.copy(end = _root_.scala.Option(f_))) + def optionalEnd: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.codegen.hcl.Pos]] = field(_.end)((c_, f_) => c_.copy(end = f_)) + } + final val FILENAME_FIELD_NUMBER = 1 + final val START_FIELD_NUMBER = 2 + final val END_FIELD_NUMBER = 3 + def of( + filename: _root_.scala.Predef.String, + start: _root_.scala.Option[pulumirpc.codegen.hcl.Pos], + end: _root_.scala.Option[pulumirpc.codegen.hcl.Pos] + ): _root_.pulumirpc.codegen.hcl.Range = _root_.pulumirpc.codegen.hcl.Range( + filename, + start, + end + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.codegen.Range]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/engine/EngineGrpc.scala b/besom-rpc/src/main/scala/pulumirpc/engine/EngineGrpc.scala new file mode 100644 index 00000000..e9e923e5 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/engine/EngineGrpc.scala @@ -0,0 +1,171 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.engine + + +object EngineGrpc { + val METHOD_LOG: _root_.io.grpc.MethodDescriptor[pulumirpc.engine.LogRequest, 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", "Log")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.engine.LogRequest]) + .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(0))) + .build() + + val METHOD_GET_ROOT_RESOURCE: _root_.io.grpc.MethodDescriptor[pulumirpc.engine.GetRootResourceRequest, pulumirpc.engine.GetRootResourceResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.Engine", "GetRootResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.engine.GetRootResourceRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.engine.GetRootResourceResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.engine.EngineProto.javaDescriptor.getServices().get(0).getMethods().get(1))) + .build() + + val METHOD_SET_ROOT_RESOURCE: _root_.io.grpc.MethodDescriptor[pulumirpc.engine.SetRootResourceRequest, pulumirpc.engine.SetRootResourceResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.Engine", "SetRootResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.engine.SetRootResourceRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.engine.SetRootResourceResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.engine.EngineProto.javaDescriptor.getServices().get(0).getMethods().get(2))) + .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) + .build() + + /** Engine is an auxiliary service offered to language and resource provider plugins. Its main purpose today is + * to serve as a common logging endpoint, but it also serves as a state storage mechanism for language hosts + * that can't store their own global state. + */ + trait Engine extends _root_.scalapb.grpc.AbstractService { + override def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[Engine] = Engine + /** Log logs a global message in the engine, including errors and warnings. + */ + def log(request: pulumirpc.engine.LogRequest): scala.concurrent.Future[com.google.protobuf.empty.Empty] + /** GetRootResource gets the URN of the root resource, the resource that should be the root of all + * otherwise-unparented resources. + */ + def getRootResource(request: pulumirpc.engine.GetRootResourceRequest): scala.concurrent.Future[pulumirpc.engine.GetRootResourceResponse] + /** SetRootResource sets the URN of the root resource. + */ + def setRootResource(request: pulumirpc.engine.SetRootResourceRequest): scala.concurrent.Future[pulumirpc.engine.SetRootResourceResponse] + } + + object Engine extends _root_.scalapb.grpc.ServiceCompanion[Engine] { + implicit def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[Engine] = this + def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = pulumirpc.engine.EngineProto.javaDescriptor.getServices().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.ServiceDescriptor = pulumirpc.engine.EngineProto.scalaDescriptor.services(0) + def bindService(serviceImpl: Engine, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = + _root_.io.grpc.ServerServiceDefinition.builder(SERVICE) + .addMethod( + METHOD_LOG, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.engine.LogRequest, observer: _root_.io.grpc.stub.StreamObserver[com.google.protobuf.empty.Empty]) => { + serviceImpl.log(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_GET_ROOT_RESOURCE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.engine.GetRootResourceRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.engine.GetRootResourceResponse]) => { + serviceImpl.getRootResource(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_SET_ROOT_RESOURCE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.engine.SetRootResourceRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.engine.SetRootResourceResponse]) => { + serviceImpl.setRootResource(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .build() + } + + /** Engine is an auxiliary service offered to language and resource provider plugins. Its main purpose today is + * to serve as a common logging endpoint, but it also serves as a state storage mechanism for language hosts + * that can't store their own global state. + */ + trait EngineBlockingClient { + def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[Engine] = Engine + /** Log logs a global message in the engine, including errors and warnings. + */ + def log(request: pulumirpc.engine.LogRequest): com.google.protobuf.empty.Empty + /** GetRootResource gets the URN of the root resource, the resource that should be the root of all + * otherwise-unparented resources. + */ + def getRootResource(request: pulumirpc.engine.GetRootResourceRequest): pulumirpc.engine.GetRootResourceResponse + /** SetRootResource sets the URN of the root resource. + */ + def setRootResource(request: pulumirpc.engine.SetRootResourceRequest): pulumirpc.engine.SetRootResourceResponse + } + + 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 { + /** Log logs a global message in the engine, including errors and warnings. + */ + override def log(request: pulumirpc.engine.LogRequest): com.google.protobuf.empty.Empty = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_LOG, options, request) + } + + /** GetRootResource gets the URN of the root resource, the resource that should be the root of all + * otherwise-unparented resources. + */ + override def getRootResource(request: pulumirpc.engine.GetRootResourceRequest): pulumirpc.engine.GetRootResourceResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GET_ROOT_RESOURCE, options, request) + } + + /** SetRootResource sets the URN of the root resource. + */ + override def setRootResource(request: pulumirpc.engine.SetRootResourceRequest): pulumirpc.engine.SetRootResourceResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_SET_ROOT_RESOURCE, options, request) + } + + override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): EngineBlockingStub = new EngineBlockingStub(channel, options) + } + + class EngineStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[EngineStub](channel, options) with Engine { + /** Log logs a global message in the engine, including errors and warnings. + */ + override def log(request: pulumirpc.engine.LogRequest): scala.concurrent.Future[com.google.protobuf.empty.Empty] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_LOG, options, request) + } + + /** GetRootResource gets the URN of the root resource, the resource that should be the root of all + * otherwise-unparented resources. + */ + override def getRootResource(request: pulumirpc.engine.GetRootResourceRequest): scala.concurrent.Future[pulumirpc.engine.GetRootResourceResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GET_ROOT_RESOURCE, options, request) + } + + /** SetRootResource sets the URN of the root resource. + */ + override def setRootResource(request: pulumirpc.engine.SetRootResourceRequest): scala.concurrent.Future[pulumirpc.engine.SetRootResourceResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_SET_ROOT_RESOURCE, options, request) + } + + override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): EngineStub = new EngineStub(channel, options) + } + + object EngineStub extends _root_.io.grpc.stub.AbstractStub.StubFactory[EngineStub] { + override def newStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): EngineStub = new EngineStub(channel, options) + + implicit val stubFactory: _root_.io.grpc.stub.AbstractStub.StubFactory[EngineStub] = this + } + + def bindService(serviceImpl: Engine, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = Engine.bindService(serviceImpl, executionContext) + + def blockingStub(channel: _root_.io.grpc.Channel): EngineBlockingStub = new EngineBlockingStub(channel) + + def stub(channel: _root_.io.grpc.Channel): EngineStub = new EngineStub(channel) + + def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = pulumirpc.engine.EngineProto.javaDescriptor.getServices().get(0) + +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/engine/EngineProto.scala b/besom-rpc/src/main/scala/pulumirpc/engine/EngineProto.scala new file mode 100644 index 00000000..50d33e3e --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/engine/EngineProto.scala @@ -0,0 +1,47 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.engine + +object EngineProto extends _root_.scalapb.GeneratedFileObject { + lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq( + com.google.protobuf.empty.EmptyProto + ) + lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + pulumirpc.engine.LogRequest, + pulumirpc.engine.GetRootResourceRequest, + pulumirpc.engine.GetRootResourceResponse, + pulumirpc.engine.SetRootResourceRequest, + pulumirpc.engine.SetRootResourceResponse + ) + private lazy val ProtoBytes: _root_.scala.Array[Byte] = + scalapb.Encoding.fromBase64(scala.collection.immutable.Seq( + """ChNwdWx1bWkvZW5naW5lLnByb3RvEglwdWx1bWlycGMaG2dvb2dsZS9wcm90b2J1Zi9lbXB0eS5wcm90byLsAQoKTG9nUmVxd + WVzdBJBCghzZXZlcml0eRgBIAEoDjIWLnB1bHVtaXJwYy5Mb2dTZXZlcml0eUIN4j8KEghzZXZlcml0eVIIc2V2ZXJpdHkSJgoHb + WVzc2FnZRgCIAEoCUIM4j8JEgdtZXNzYWdlUgdtZXNzYWdlEhoKA3VybhgDIAEoCUII4j8FEgN1cm5SA3VybhIpCghzdHJlYW1JZ + BgEIAEoBUIN4j8KEghzdHJlYW1JZFIIc3RyZWFtSWQSLAoJZXBoZW1lcmFsGAUgASgIQg7iPwsSCWVwaGVtZXJhbFIJZXBoZW1lc + mFsIhgKFkdldFJvb3RSZXNvdXJjZVJlcXVlc3QiNQoXR2V0Um9vdFJlc291cmNlUmVzcG9uc2USGgoDdXJuGAEgASgJQgjiPwUSA + 3VyblIDdXJuIjQKFlNldFJvb3RSZXNvdXJjZVJlcXVlc3QSGgoDdXJuGAEgASgJQgjiPwUSA3VyblIDdXJuIhkKF1NldFJvb3RSZ + XNvdXJjZVJlc3BvbnNlKmsKC0xvZ1NldmVyaXR5EhUKBURFQlVHEAAaCuI/BxIFREVCVUcSEwoESU5GTxABGgniPwYSBElORk8SG + QoHV0FSTklORxACGgziPwkSB1dBUk5JTkcSFQoFRVJST1IQAxoK4j8HEgVFUlJPUjL4AQoGRW5naW5lEjYKA0xvZxIVLnB1bHVta + XJwYy5Mb2dSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IgASWgoPR2V0Um9vdFJlc291cmNlEiEucHVsdW1pcnBjLkdld + FJvb3RSZXNvdXJjZVJlcXVlc3QaIi5wdWx1bWlycGMuR2V0Um9vdFJlc291cmNlUmVzcG9uc2UiABJaCg9TZXRSb290UmVzb3VyY + 2USIS5wdWx1bWlycGMuU2V0Um9vdFJlc291cmNlUmVxdWVzdBoiLnB1bHVtaXJwYy5TZXRSb290UmVzb3VyY2VSZXNwb25zZSIAQ + jRaMmdpdGh1Yi5jb20vcHVsdW1pL3B1bHVtaS9zZGsvdjMvcHJvdG8vZ287cHVsdW1pcnBjYgZwcm90bzM=""" + ).mkString) + lazy val scalaDescriptor: _root_.scalapb.descriptors.FileDescriptor = { + val scalaProto = com.google.protobuf.descriptor.FileDescriptorProto.parseFrom(ProtoBytes) + _root_.scalapb.descriptors.FileDescriptor.buildFrom(scalaProto, dependencies.map(_.scalaDescriptor)) + } + lazy val javaDescriptor: com.google.protobuf.Descriptors.FileDescriptor = { + val javaProto = com.google.protobuf.DescriptorProtos.FileDescriptorProto.parseFrom(ProtoBytes) + com.google.protobuf.Descriptors.FileDescriptor.buildFrom(javaProto, _root_.scala.Array( + com.google.protobuf.empty.EmptyProto.javaDescriptor + )) + } + @deprecated("Use javaDescriptor instead. In a future version this will refer to scalaDescriptor.", "ScalaPB 0.5.47") + def descriptor: com.google.protobuf.Descriptors.FileDescriptor = javaDescriptor +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/engine/GetRootResourceRequest.scala b/besom-rpc/src/main/scala/pulumirpc/engine/GetRootResourceRequest.scala new file mode 100644 index 00000000..395a2aec --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/engine/GetRootResourceRequest.scala @@ -0,0 +1,82 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.engine + +/** empty. + */ +@SerialVersionUID(0L) +final case class GetRootResourceRequest( + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GetRootResourceRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + unknownFields.writeTo(_output__) + } + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = throw new MatchError(__fieldNumber) + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = throw new MatchError(__field) + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.engine.GetRootResourceRequest.type = pulumirpc.engine.GetRootResourceRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GetRootResourceRequest]) +} + +object GetRootResourceRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.engine.GetRootResourceRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.engine.GetRootResourceRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.engine.GetRootResourceRequest = { + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.engine.GetRootResourceRequest( + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.engine.GetRootResourceRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.engine.GetRootResourceRequest( + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = EngineProto.javaDescriptor.getMessageTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = EngineProto.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) + lazy val defaultInstance = pulumirpc.engine.GetRootResourceRequest( + ) + implicit class GetRootResourceRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.engine.GetRootResourceRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.engine.GetRootResourceRequest](_l) { + } + def of( + ): _root_.pulumirpc.engine.GetRootResourceRequest = _root_.pulumirpc.engine.GetRootResourceRequest( + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GetRootResourceRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/engine/GetRootResourceResponse.scala b/besom-rpc/src/main/scala/pulumirpc/engine/GetRootResourceResponse.scala new file mode 100644 index 00000000..20ccf01d --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/engine/GetRootResourceResponse.scala @@ -0,0 +1,120 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.engine + +/** @param urn + * the URN of the root resource, or the empty string if one was not set. + */ +@SerialVersionUID(0L) +final case class GetRootResourceResponse( + urn: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GetRootResourceResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withUrn(__v: _root_.scala.Predef.String): GetRootResourceResponse = copy(urn = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = urn + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(urn) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.engine.GetRootResourceResponse.type = pulumirpc.engine.GetRootResourceResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GetRootResourceResponse]) +} + +object GetRootResourceResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.engine.GetRootResourceResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.engine.GetRootResourceResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.engine.GetRootResourceResponse = { + var __urn: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urn = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.engine.GetRootResourceResponse( + urn = __urn, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.engine.GetRootResourceResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.engine.GetRootResourceResponse( + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = EngineProto.javaDescriptor.getMessageTypes().get(2) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = EngineProto.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) + lazy val defaultInstance = pulumirpc.engine.GetRootResourceResponse( + urn = "" + ) + implicit class GetRootResourceResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.engine.GetRootResourceResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.engine.GetRootResourceResponse](_l) { + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + } + final val URN_FIELD_NUMBER = 1 + def of( + urn: _root_.scala.Predef.String + ): _root_.pulumirpc.engine.GetRootResourceResponse = _root_.pulumirpc.engine.GetRootResourceResponse( + urn + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GetRootResourceResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/engine/LogRequest.scala b/besom-rpc/src/main/scala/pulumirpc/engine/LogRequest.scala new file mode 100644 index 00000000..d8fca8a0 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/engine/LogRequest.scala @@ -0,0 +1,258 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.engine + +/** @param severity + * the logging level of this message. + * @param message + * the contents of the logged message. + * @param urn + * the (optional) resource urn this log is associated with. + * @param streamId + * the (optional) stream id that a stream of log messages can be associated with. This allows + * clients to not have to buffer a large set of log messages that they all want to be + * conceptually connected. Instead the messages can be sent as chunks (with the same stream id) + * and the end display can show the messages as they arrive, while still stitching them together + * into one total log message. + * + * 0/not-given means: do not associate with any stream. + * @param ephemeral + * Optional value indicating whether this is a status message. + */ +@SerialVersionUID(0L) +final case class LogRequest( + severity: pulumirpc.engine.LogSeverity = pulumirpc.engine.LogSeverity.DEBUG, + message: _root_.scala.Predef.String = "", + urn: _root_.scala.Predef.String = "", + streamId: _root_.scala.Int = 0, + ephemeral: _root_.scala.Boolean = false, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[LogRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = severity.value + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(1, __value) + } + }; + + { + val __value = message + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + + { + val __value = streamId + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(4, __value) + } + }; + + { + val __value = ephemeral + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(5, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = severity.value + if (__v != 0) { + _output__.writeEnum(1, __v) + } + }; + { + val __v = message + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + { + val __v = streamId + if (__v != 0) { + _output__.writeInt32(4, __v) + } + }; + { + val __v = ephemeral + if (__v != false) { + _output__.writeBool(5, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withSeverity(__v: pulumirpc.engine.LogSeverity): LogRequest = copy(severity = __v) + def withMessage(__v: _root_.scala.Predef.String): LogRequest = copy(message = __v) + def withUrn(__v: _root_.scala.Predef.String): LogRequest = copy(urn = __v) + def withStreamId(__v: _root_.scala.Int): LogRequest = copy(streamId = __v) + def withEphemeral(__v: _root_.scala.Boolean): LogRequest = copy(ephemeral = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = severity.javaValueDescriptor + if (__t.getNumber() != 0) __t else null + } + case 2 => { + val __t = message + if (__t != "") __t else null + } + case 3 => { + val __t = urn + if (__t != "") __t else null + } + case 4 => { + val __t = streamId + if (__t != 0) __t else null + } + case 5 => { + val __t = ephemeral + if (__t != false) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PEnum(severity.scalaValueDescriptor) + case 2 => _root_.scalapb.descriptors.PString(message) + case 3 => _root_.scalapb.descriptors.PString(urn) + case 4 => _root_.scalapb.descriptors.PInt(streamId) + case 5 => _root_.scalapb.descriptors.PBoolean(ephemeral) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.engine.LogRequest.type = pulumirpc.engine.LogRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.LogRequest]) +} + +object LogRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.engine.LogRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.engine.LogRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.engine.LogRequest = { + var __severity: pulumirpc.engine.LogSeverity = pulumirpc.engine.LogSeverity.DEBUG + var __message: _root_.scala.Predef.String = "" + var __urn: _root_.scala.Predef.String = "" + var __streamId: _root_.scala.Int = 0 + var __ephemeral: _root_.scala.Boolean = false + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 8 => + __severity = pulumirpc.engine.LogSeverity.fromValue(_input__.readEnum()) + case 18 => + __message = _input__.readStringRequireUtf8() + case 26 => + __urn = _input__.readStringRequireUtf8() + case 32 => + __streamId = _input__.readInt32() + case 40 => + __ephemeral = _input__.readBool() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.engine.LogRequest( + severity = __severity, + message = __message, + urn = __urn, + streamId = __streamId, + ephemeral = __ephemeral, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.engine.LogRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.engine.LogRequest( + severity = pulumirpc.engine.LogSeverity.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(pulumirpc.engine.LogSeverity.DEBUG.scalaValueDescriptor).number), + message = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + streamId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Int]).getOrElse(0), + ephemeral = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Boolean]).getOrElse(false) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = EngineProto.javaDescriptor.getMessageTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = EngineProto.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[?] = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => pulumirpc.engine.LogSeverity + } + } + lazy val defaultInstance = pulumirpc.engine.LogRequest( + severity = pulumirpc.engine.LogSeverity.DEBUG, + message = "", + urn = "", + streamId = 0, + ephemeral = false + ) + implicit class LogRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.engine.LogRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.engine.LogRequest](_l) { + def severity: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.engine.LogSeverity] = field(_.severity)((c_, f_) => c_.copy(severity = f_)) + def message: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.message)((c_, f_) => c_.copy(message = f_)) + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + def streamId: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.streamId)((c_, f_) => c_.copy(streamId = f_)) + def ephemeral: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.ephemeral)((c_, f_) => c_.copy(ephemeral = f_)) + } + final val SEVERITY_FIELD_NUMBER = 1 + final val MESSAGE_FIELD_NUMBER = 2 + final val URN_FIELD_NUMBER = 3 + final val STREAMID_FIELD_NUMBER = 4 + final val EPHEMERAL_FIELD_NUMBER = 5 + def of( + severity: pulumirpc.engine.LogSeverity, + message: _root_.scala.Predef.String, + urn: _root_.scala.Predef.String, + streamId: _root_.scala.Int, + ephemeral: _root_.scala.Boolean + ): _root_.pulumirpc.engine.LogRequest = _root_.pulumirpc.engine.LogRequest( + severity, + message, + urn, + streamId, + ephemeral + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.LogRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/engine/LogSeverity.scala b/besom-rpc/src/main/scala/pulumirpc/engine/LogSeverity.scala new file mode 100644 index 00000000..3cce8fcd --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/engine/LogSeverity.scala @@ -0,0 +1,73 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.engine + +/** LogSeverity is the severity level of a log message. Errors are fatal; all others are informational. + */ +sealed abstract class LogSeverity(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum { + type EnumType = pulumirpc.engine.LogSeverity + type RecognizedType = pulumirpc.engine.LogSeverity.Recognized + def isDebug: _root_.scala.Boolean = false + def isInfo: _root_.scala.Boolean = false + def isWarning: _root_.scala.Boolean = false + def isError: _root_.scala.Boolean = false + def companion: _root_.scalapb.GeneratedEnumCompanion[LogSeverity] = pulumirpc.engine.LogSeverity + final def asRecognized: _root_.scala.Option[pulumirpc.engine.LogSeverity.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[pulumirpc.engine.LogSeverity.Recognized]) +} + +object LogSeverity extends _root_.scalapb.GeneratedEnumCompanion[LogSeverity] { + sealed trait Recognized extends LogSeverity + implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[LogSeverity] = this + + /** a debug-level message not displayed to end-users (the default). + */ + @SerialVersionUID(0L) + case object DEBUG extends LogSeverity(0) with LogSeverity.Recognized { + val index = 0 + val name = "DEBUG" + override def isDebug: _root_.scala.Boolean = true + } + + /** an informational message printed to output during resource operations. + */ + @SerialVersionUID(0L) + case object INFO extends LogSeverity(1) with LogSeverity.Recognized { + val index = 1 + val name = "INFO" + override def isInfo: _root_.scala.Boolean = true + } + + /** a warning to indicate that something went wrong. + */ + @SerialVersionUID(0L) + case object WARNING extends LogSeverity(2) with LogSeverity.Recognized { + val index = 2 + val name = "WARNING" + override def isWarning: _root_.scala.Boolean = true + } + + /** a fatal error indicating that the tool should stop processing subsequent resource operations. + */ + @SerialVersionUID(0L) + case object ERROR extends LogSeverity(3) with LogSeverity.Recognized { + val index = 3 + val name = "ERROR" + override def isError: _root_.scala.Boolean = true + } + + @SerialVersionUID(0L) + final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends LogSeverity(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum + lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(DEBUG, INFO, WARNING, ERROR) + def fromValue(__value: _root_.scala.Int): LogSeverity = __value match { + case 0 => DEBUG + case 1 => INFO + case 2 => WARNING + case 3 => ERROR + case __other => Unrecognized(__other) + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = EngineProto.javaDescriptor.getEnumTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = EngineProto.scalaDescriptor.enums(0) +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/engine/SetRootResourceRequest.scala b/besom-rpc/src/main/scala/pulumirpc/engine/SetRootResourceRequest.scala new file mode 100644 index 00000000..e40ecca6 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/engine/SetRootResourceRequest.scala @@ -0,0 +1,120 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.engine + +/** @param urn + * the URN of the root resource, or the empty string. + */ +@SerialVersionUID(0L) +final case class SetRootResourceRequest( + urn: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[SetRootResourceRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withUrn(__v: _root_.scala.Predef.String): SetRootResourceRequest = copy(urn = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = urn + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(urn) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.engine.SetRootResourceRequest.type = pulumirpc.engine.SetRootResourceRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.SetRootResourceRequest]) +} + +object SetRootResourceRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.engine.SetRootResourceRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.engine.SetRootResourceRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.engine.SetRootResourceRequest = { + var __urn: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urn = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.engine.SetRootResourceRequest( + urn = __urn, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.engine.SetRootResourceRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.engine.SetRootResourceRequest( + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = EngineProto.javaDescriptor.getMessageTypes().get(3) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = EngineProto.scalaDescriptor.messages(3) + 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) + lazy val defaultInstance = pulumirpc.engine.SetRootResourceRequest( + urn = "" + ) + implicit class SetRootResourceRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.engine.SetRootResourceRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.engine.SetRootResourceRequest](_l) { + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + } + final val URN_FIELD_NUMBER = 1 + def of( + urn: _root_.scala.Predef.String + ): _root_.pulumirpc.engine.SetRootResourceRequest = _root_.pulumirpc.engine.SetRootResourceRequest( + urn + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.SetRootResourceRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/engine/SetRootResourceResponse.scala b/besom-rpc/src/main/scala/pulumirpc/engine/SetRootResourceResponse.scala new file mode 100644 index 00000000..2f74b695 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/engine/SetRootResourceResponse.scala @@ -0,0 +1,82 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.engine + +/** empty. + */ +@SerialVersionUID(0L) +final case class SetRootResourceResponse( + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[SetRootResourceResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + unknownFields.writeTo(_output__) + } + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = throw new MatchError(__fieldNumber) + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = throw new MatchError(__field) + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.engine.SetRootResourceResponse.type = pulumirpc.engine.SetRootResourceResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.SetRootResourceResponse]) +} + +object SetRootResourceResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.engine.SetRootResourceResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.engine.SetRootResourceResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.engine.SetRootResourceResponse = { + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.engine.SetRootResourceResponse( + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.engine.SetRootResourceResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.engine.SetRootResourceResponse( + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = EngineProto.javaDescriptor.getMessageTypes().get(4) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = EngineProto.scalaDescriptor.messages(4) + 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) + lazy val defaultInstance = pulumirpc.engine.SetRootResourceResponse( + ) + implicit class SetRootResourceResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.engine.SetRootResourceResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.engine.SetRootResourceResponse](_l) { + } + def of( + ): _root_.pulumirpc.engine.SetRootResourceResponse = _root_.pulumirpc.engine.SetRootResourceResponse( + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.SetRootResourceResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/AboutResponse.scala b/besom-rpc/src/main/scala/pulumirpc/language/AboutResponse.scala new file mode 100644 index 00000000..4cbac4c0 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/AboutResponse.scala @@ -0,0 +1,338 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** AboutResponse returns runtime information about the language. + * + * @param executable + * the primary executable for the runtime of this language. + * @param version + * the version of the runtime for this language. + * @param metadata + * other information about this language. + */ +@SerialVersionUID(0L) +final case class AboutResponse( + executable: _root_.scala.Predef.String = "", + version: _root_.scala.Predef.String = "", + metadata: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[AboutResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = executable + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = version + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + metadata.foreach { __item => + val __value = pulumirpc.language.AboutResponse._typemapper_metadata.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = executable + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = version + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + metadata.foreach { __v => + val __m = pulumirpc.language.AboutResponse._typemapper_metadata.toBase(__v) + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withExecutable(__v: _root_.scala.Predef.String): AboutResponse = copy(executable = __v) + def withVersion(__v: _root_.scala.Predef.String): AboutResponse = copy(version = __v) + def clearMetadata = copy(metadata = _root_.scala.collection.immutable.Map.empty) + def addMetadata(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): AboutResponse = addAllMetadata(__vs) + def addAllMetadata(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): AboutResponse = copy(metadata = metadata ++ __vs) + def withMetadata(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): AboutResponse = copy(metadata = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = executable + if (__t != "") __t else null + } + case 2 => { + val __t = version + if (__t != "") __t else null + } + case 3 => metadata.iterator.map(pulumirpc.language.AboutResponse._typemapper_metadata.toBase(_)).toSeq + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(executable) + case 2 => _root_.scalapb.descriptors.PString(version) + case 3 => _root_.scalapb.descriptors.PRepeated(metadata.iterator.map(pulumirpc.language.AboutResponse._typemapper_metadata.toBase(_).toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.AboutResponse.type = pulumirpc.language.AboutResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.AboutResponse]) +} + +object AboutResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.language.AboutResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.AboutResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.AboutResponse = { + var __executable: _root_.scala.Predef.String = "" + var __version: _root_.scala.Predef.String = "" + val __metadata: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.scala.Predef.String), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.scala.Predef.String] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __executable = _input__.readStringRequireUtf8() + case 18 => + __version = _input__.readStringRequireUtf8() + case 26 => + __metadata += pulumirpc.language.AboutResponse._typemapper_metadata.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.language.AboutResponse.MetadataEntry](_input__)) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.AboutResponse( + executable = __executable, + version = __version, + metadata = __metadata.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.AboutResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.AboutResponse( + executable = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + version = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + metadata = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[pulumirpc.language.AboutResponse.MetadataEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.language.AboutResponse._typemapper_metadata.toCustom(_)).toMap + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(1) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 3 => __out = pulumirpc.language.AboutResponse.MetadataEntry + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.language.AboutResponse.MetadataEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.language.AboutResponse( + executable = "", + version = "", + metadata = _root_.scala.collection.immutable.Map.empty + ) + @SerialVersionUID(0L) + final case class MetadataEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[MetadataEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): MetadataEntry = copy(key = __v) + def withValue(__v: _root_.scala.Predef.String): MetadataEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.AboutResponse.MetadataEntry.type = pulumirpc.language.AboutResponse.MetadataEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.AboutResponse.MetadataEntry]) + } + + object MetadataEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.language.AboutResponse.MetadataEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.AboutResponse.MetadataEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.AboutResponse.MetadataEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.AboutResponse.MetadataEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.AboutResponse.MetadataEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.AboutResponse.MetadataEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.language.AboutResponse.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.language.AboutResponse.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.language.AboutResponse.MetadataEntry( + key = "", + value = "" + ) + implicit class MetadataEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.AboutResponse.MetadataEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.AboutResponse.MetadataEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.language.AboutResponse.MetadataEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = + _root_.scalapb.TypeMapper[pulumirpc.language.AboutResponse.MetadataEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => pulumirpc.language.AboutResponse.MetadataEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Predef.String + ): _root_.pulumirpc.language.AboutResponse.MetadataEntry = _root_.pulumirpc.language.AboutResponse.MetadataEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.AboutResponse.MetadataEntry]) + } + + implicit class AboutResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.AboutResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.AboutResponse](_l) { + def executable: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.executable)((c_, f_) => c_.copy(executable = f_)) + def version: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.version)((c_, f_) => c_.copy(version = f_)) + def metadata: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.metadata)((c_, f_) => c_.copy(metadata = f_)) + } + final val EXECUTABLE_FIELD_NUMBER = 1 + final val VERSION_FIELD_NUMBER = 2 + final val METADATA_FIELD_NUMBER = 3 + @transient + private[language] val _typemapper_metadata: _root_.scalapb.TypeMapper[pulumirpc.language.AboutResponse.MetadataEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.language.AboutResponse.MetadataEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]] + def of( + executable: _root_.scala.Predef.String, + version: _root_.scala.Predef.String, + metadata: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] + ): _root_.pulumirpc.language.AboutResponse = _root_.pulumirpc.language.AboutResponse( + executable, + version, + metadata + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.AboutResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/DependencyInfo.scala b/besom-rpc/src/main/scala/pulumirpc/language/DependencyInfo.scala new file mode 100644 index 00000000..4f4e1381 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/DependencyInfo.scala @@ -0,0 +1,152 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param name + * The name of the dependency. + * @param version + * The version of the dependency. + */ +@SerialVersionUID(0L) +final case class DependencyInfo( + name: _root_.scala.Predef.String = "", + version: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[DependencyInfo] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = name + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = version + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = name + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = version + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withName(__v: _root_.scala.Predef.String): DependencyInfo = copy(name = __v) + def withVersion(__v: _root_.scala.Predef.String): DependencyInfo = copy(version = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = name + if (__t != "") __t else null + } + case 2 => { + val __t = version + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(name) + case 2 => _root_.scalapb.descriptors.PString(version) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.DependencyInfo.type = pulumirpc.language.DependencyInfo + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.DependencyInfo]) +} + +object DependencyInfo extends scalapb.GeneratedMessageCompanion[pulumirpc.language.DependencyInfo] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.DependencyInfo] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.DependencyInfo = { + var __name: _root_.scala.Predef.String = "" + var __version: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __name = _input__.readStringRequireUtf8() + case 18 => + __version = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.DependencyInfo( + name = __name, + version = __version, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.DependencyInfo] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.DependencyInfo( + name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + version = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(3) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(3) + 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) + lazy val defaultInstance = pulumirpc.language.DependencyInfo( + name = "", + version = "" + ) + implicit class DependencyInfoLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.DependencyInfo]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.DependencyInfo](_l) { + def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_)) + def version: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.version)((c_, f_) => c_.copy(version = f_)) + } + final val NAME_FIELD_NUMBER = 1 + final val VERSION_FIELD_NUMBER = 2 + def of( + name: _root_.scala.Predef.String, + version: _root_.scala.Predef.String + ): _root_.pulumirpc.language.DependencyInfo = _root_.pulumirpc.language.DependencyInfo( + name, + version + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.DependencyInfo]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/GeneratePackageRequest.scala b/besom-rpc/src/main/scala/pulumirpc/language/GeneratePackageRequest.scala new file mode 100644 index 00000000..aa0b3aa2 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/GeneratePackageRequest.scala @@ -0,0 +1,546 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param directory + * the directory to generate the package in. + * @param schema + * the JSON-encoded schema. + * @param extraFiles + * extra files to copy to the package output. + * @param loaderTarget + * The target of a codegen.LoaderServer to use for loading schemas. + * @param localDependencies + * local dependencies to use instead of using the package system. This is a map of package name to a local + * path of a language specific artifact to use for the SDK for that package. + */ +@SerialVersionUID(0L) +final case class GeneratePackageRequest( + directory: _root_.scala.Predef.String = "", + schema: _root_.scala.Predef.String = "", + extraFiles: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] = _root_.scala.collection.immutable.Map.empty, + loaderTarget: _root_.scala.Predef.String = "", + localDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GeneratePackageRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = directory + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = schema + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + extraFiles.foreach { __item => + val __value = pulumirpc.language.GeneratePackageRequest._typemapper_extraFiles.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = loaderTarget + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value) + } + }; + localDependencies.foreach { __item => + val __value = pulumirpc.language.GeneratePackageRequest._typemapper_localDependencies.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = directory + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = schema + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + extraFiles.foreach { __v => + val __m = pulumirpc.language.GeneratePackageRequest._typemapper_extraFiles.toBase(__v) + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = loaderTarget + if (!__v.isEmpty) { + _output__.writeString(4, __v) + } + }; + localDependencies.foreach { __v => + val __m = pulumirpc.language.GeneratePackageRequest._typemapper_localDependencies.toBase(__v) + _output__.writeTag(5, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withDirectory(__v: _root_.scala.Predef.String): GeneratePackageRequest = copy(directory = __v) + def withSchema(__v: _root_.scala.Predef.String): GeneratePackageRequest = copy(schema = __v) + def clearExtraFiles = copy(extraFiles = _root_.scala.collection.immutable.Map.empty) + def addExtraFiles(__vs: (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString) *): GeneratePackageRequest = addAllExtraFiles(__vs) + def addAllExtraFiles(__vs: Iterable[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]): GeneratePackageRequest = copy(extraFiles = extraFiles ++ __vs) + def withExtraFiles(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]): GeneratePackageRequest = copy(extraFiles = __v) + def withLoaderTarget(__v: _root_.scala.Predef.String): GeneratePackageRequest = copy(loaderTarget = __v) + def clearLocalDependencies = copy(localDependencies = _root_.scala.collection.immutable.Map.empty) + def addLocalDependencies(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): GeneratePackageRequest = addAllLocalDependencies(__vs) + def addAllLocalDependencies(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): GeneratePackageRequest = copy(localDependencies = localDependencies ++ __vs) + def withLocalDependencies(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): GeneratePackageRequest = copy(localDependencies = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = directory + if (__t != "") __t else null + } + case 2 => { + val __t = schema + if (__t != "") __t else null + } + case 3 => extraFiles.iterator.map(pulumirpc.language.GeneratePackageRequest._typemapper_extraFiles.toBase(_)).toSeq + case 4 => { + val __t = loaderTarget + if (__t != "") __t else null + } + case 5 => localDependencies.iterator.map(pulumirpc.language.GeneratePackageRequest._typemapper_localDependencies.toBase(_)).toSeq + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(directory) + case 2 => _root_.scalapb.descriptors.PString(schema) + case 3 => _root_.scalapb.descriptors.PRepeated(extraFiles.iterator.map(pulumirpc.language.GeneratePackageRequest._typemapper_extraFiles.toBase(_).toPMessage).toVector) + case 4 => _root_.scalapb.descriptors.PString(loaderTarget) + case 5 => _root_.scalapb.descriptors.PRepeated(localDependencies.iterator.map(pulumirpc.language.GeneratePackageRequest._typemapper_localDependencies.toBase(_).toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GeneratePackageRequest.type = pulumirpc.language.GeneratePackageRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GeneratePackageRequest]) +} + +object GeneratePackageRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GeneratePackageRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GeneratePackageRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GeneratePackageRequest = { + var __directory: _root_.scala.Predef.String = "" + var __schema: _root_.scala.Predef.String = "" + val __extraFiles: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] + var __loaderTarget: _root_.scala.Predef.String = "" + val __localDependencies: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.scala.Predef.String), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.scala.Predef.String] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __directory = _input__.readStringRequireUtf8() + case 18 => + __schema = _input__.readStringRequireUtf8() + case 26 => + __extraFiles += pulumirpc.language.GeneratePackageRequest._typemapper_extraFiles.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry](_input__)) + case 34 => + __loaderTarget = _input__.readStringRequireUtf8() + case 42 => + __localDependencies += pulumirpc.language.GeneratePackageRequest._typemapper_localDependencies.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry](_input__)) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GeneratePackageRequest( + directory = __directory, + schema = __schema, + extraFiles = __extraFiles.result(), + loaderTarget = __loaderTarget, + localDependencies = __localDependencies.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GeneratePackageRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GeneratePackageRequest( + directory = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + schema = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + extraFiles = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.language.GeneratePackageRequest._typemapper_extraFiles.toCustom(_)).toMap, + loaderTarget = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + localDependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Seq[pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.language.GeneratePackageRequest._typemapper_localDependencies.toCustom(_)).toMap + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(17) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(17) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 3 => __out = pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry + case 5 => __out = pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry, + _root_.pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.language.GeneratePackageRequest( + directory = "", + schema = "", + extraFiles = _root_.scala.collection.immutable.Map.empty, + loaderTarget = "", + localDependencies = _root_.scala.collection.immutable.Map.empty + ) + @SerialVersionUID(0L) + final case class ExtraFilesEntry( + key: _root_.scala.Predef.String = "", + value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ExtraFilesEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeBytes(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): ExtraFilesEntry = copy(key = __v) + def withValue(__v: _root_.com.google.protobuf.ByteString): ExtraFilesEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PByteString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry.type = pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GeneratePackageRequest.ExtraFilesEntry]) + } + + object ExtraFilesEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.language.GeneratePackageRequest.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.language.GeneratePackageRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry( + key = "", + value = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class ExtraFilesEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = + _root_.scalapb.TypeMapper[pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)](__m => (__m.key, __m.value))(__p => pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry = _root_.pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GeneratePackageRequest.ExtraFilesEntry]) + } + + @SerialVersionUID(0L) + final case class LocalDependenciesEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[LocalDependenciesEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): LocalDependenciesEntry = copy(key = __v) + def withValue(__v: _root_.scala.Predef.String): LocalDependenciesEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry.type = pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GeneratePackageRequest.LocalDependenciesEntry]) + } + + object LocalDependenciesEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.language.GeneratePackageRequest.javaDescriptor.getNestedTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.language.GeneratePackageRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry( + key = "", + value = "" + ) + implicit class LocalDependenciesEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = + _root_.scalapb.TypeMapper[pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Predef.String + ): _root_.pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry = _root_.pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GeneratePackageRequest.LocalDependenciesEntry]) + } + + implicit class GeneratePackageRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GeneratePackageRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GeneratePackageRequest](_l) { + def directory: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.directory)((c_, f_) => c_.copy(directory = f_)) + def schema: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.schema)((c_, f_) => c_.copy(schema = f_)) + def extraFiles: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = field(_.extraFiles)((c_, f_) => c_.copy(extraFiles = f_)) + def loaderTarget: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.loaderTarget)((c_, f_) => c_.copy(loaderTarget = f_)) + def localDependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.localDependencies)((c_, f_) => c_.copy(localDependencies = f_)) + } + final val DIRECTORY_FIELD_NUMBER = 1 + final val SCHEMA_FIELD_NUMBER = 2 + final val EXTRA_FILES_FIELD_NUMBER = 3 + final val LOADER_TARGET_FIELD_NUMBER = 4 + final val LOCAL_DEPENDENCIES_FIELD_NUMBER = 5 + @transient + private[language] val _typemapper_extraFiles: _root_.scalapb.TypeMapper[pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.language.GeneratePackageRequest.ExtraFilesEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]] + @transient + private[language] val _typemapper_localDependencies: _root_.scalapb.TypeMapper[pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.language.GeneratePackageRequest.LocalDependenciesEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]] + def of( + directory: _root_.scala.Predef.String, + schema: _root_.scala.Predef.String, + extraFiles: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString], + loaderTarget: _root_.scala.Predef.String, + localDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] + ): _root_.pulumirpc.language.GeneratePackageRequest = _root_.pulumirpc.language.GeneratePackageRequest( + directory, + schema, + extraFiles, + loaderTarget, + localDependencies + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GeneratePackageRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/GeneratePackageResponse.scala b/besom-rpc/src/main/scala/pulumirpc/language/GeneratePackageResponse.scala new file mode 100644 index 00000000..f98a795a --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/GeneratePackageResponse.scala @@ -0,0 +1,123 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param diagnostics + * any diagnostics from code generation. + */ +@SerialVersionUID(0L) +final case class GeneratePackageResponse( + diagnostics: _root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GeneratePackageResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + diagnostics.foreach { __item => + val __value = __item + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + diagnostics.foreach { __v => + val __m = __v + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def clearDiagnostics = copy(diagnostics = _root_.scala.Seq.empty) + def addDiagnostics(__vs: pulumirpc.codegen.hcl.Diagnostic *): GeneratePackageResponse = addAllDiagnostics(__vs) + def addAllDiagnostics(__vs: Iterable[pulumirpc.codegen.hcl.Diagnostic]): GeneratePackageResponse = copy(diagnostics = diagnostics ++ __vs) + def withDiagnostics(__v: _root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic]): GeneratePackageResponse = copy(diagnostics = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => diagnostics + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(diagnostics.iterator.map(_.toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GeneratePackageResponse.type = pulumirpc.language.GeneratePackageResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GeneratePackageResponse]) +} + +object GeneratePackageResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GeneratePackageResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GeneratePackageResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GeneratePackageResponse = { + val __diagnostics: _root_.scala.collection.immutable.VectorBuilder[pulumirpc.codegen.hcl.Diagnostic] = new _root_.scala.collection.immutable.VectorBuilder[pulumirpc.codegen.hcl.Diagnostic] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __diagnostics += _root_.scalapb.LiteParser.readMessage[pulumirpc.codegen.hcl.Diagnostic](_input__) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GeneratePackageResponse( + diagnostics = __diagnostics.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GeneratePackageResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GeneratePackageResponse( + diagnostics = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(18) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(18) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = pulumirpc.codegen.hcl.Diagnostic + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.language.GeneratePackageResponse( + diagnostics = _root_.scala.Seq.empty + ) + implicit class GeneratePackageResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GeneratePackageResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GeneratePackageResponse](_l) { + def diagnostics: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic]] = field(_.diagnostics)((c_, f_) => c_.copy(diagnostics = f_)) + } + final val DIAGNOSTICS_FIELD_NUMBER = 1 + def of( + diagnostics: _root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic] + ): _root_.pulumirpc.language.GeneratePackageResponse = _root_.pulumirpc.language.GeneratePackageResponse( + diagnostics + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GeneratePackageResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/GenerateProgramRequest.scala b/besom-rpc/src/main/scala/pulumirpc/language/GenerateProgramRequest.scala new file mode 100644 index 00000000..6286d646 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/GenerateProgramRequest.scala @@ -0,0 +1,304 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param source + * the PCL source of the project. + * @param loaderTarget + * The target of a codegen.LoaderServer to use for loading schemas. + */ +@SerialVersionUID(0L) +final case class GenerateProgramRequest( + source: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty, + loaderTarget: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GenerateProgramRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + source.foreach { __item => + val __value = pulumirpc.language.GenerateProgramRequest._typemapper_source.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = loaderTarget + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + source.foreach { __v => + val __m = pulumirpc.language.GenerateProgramRequest._typemapper_source.toBase(__v) + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = loaderTarget + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def clearSource = copy(source = _root_.scala.collection.immutable.Map.empty) + def addSource(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): GenerateProgramRequest = addAllSource(__vs) + def addAllSource(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): GenerateProgramRequest = copy(source = source ++ __vs) + def withSource(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): GenerateProgramRequest = copy(source = __v) + def withLoaderTarget(__v: _root_.scala.Predef.String): GenerateProgramRequest = copy(loaderTarget = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => source.iterator.map(pulumirpc.language.GenerateProgramRequest._typemapper_source.toBase(_)).toSeq + case 2 => { + val __t = loaderTarget + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(source.iterator.map(pulumirpc.language.GenerateProgramRequest._typemapper_source.toBase(_).toPMessage).toVector) + case 2 => _root_.scalapb.descriptors.PString(loaderTarget) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GenerateProgramRequest.type = pulumirpc.language.GenerateProgramRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GenerateProgramRequest]) +} + +object GenerateProgramRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProgramRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProgramRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GenerateProgramRequest = { + val __source: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.scala.Predef.String), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.scala.Predef.String] + var __loaderTarget: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __source += pulumirpc.language.GenerateProgramRequest._typemapper_source.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.language.GenerateProgramRequest.SourceEntry](_input__)) + case 18 => + __loaderTarget = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GenerateProgramRequest( + source = __source.result(), + loaderTarget = __loaderTarget, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GenerateProgramRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GenerateProgramRequest( + source = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[pulumirpc.language.GenerateProgramRequest.SourceEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.language.GenerateProgramRequest._typemapper_source.toCustom(_)).toMap, + loaderTarget = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(13) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(13) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = pulumirpc.language.GenerateProgramRequest.SourceEntry + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.language.GenerateProgramRequest.SourceEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.language.GenerateProgramRequest( + source = _root_.scala.collection.immutable.Map.empty, + loaderTarget = "" + ) + @SerialVersionUID(0L) + final case class SourceEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[SourceEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): SourceEntry = copy(key = __v) + def withValue(__v: _root_.scala.Predef.String): SourceEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GenerateProgramRequest.SourceEntry.type = pulumirpc.language.GenerateProgramRequest.SourceEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GenerateProgramRequest.SourceEntry]) + } + + object SourceEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProgramRequest.SourceEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProgramRequest.SourceEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GenerateProgramRequest.SourceEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GenerateProgramRequest.SourceEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GenerateProgramRequest.SourceEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GenerateProgramRequest.SourceEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.language.GenerateProgramRequest.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.language.GenerateProgramRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.language.GenerateProgramRequest.SourceEntry( + key = "", + value = "" + ) + implicit class SourceEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GenerateProgramRequest.SourceEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GenerateProgramRequest.SourceEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.language.GenerateProgramRequest.SourceEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = + _root_.scalapb.TypeMapper[pulumirpc.language.GenerateProgramRequest.SourceEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => pulumirpc.language.GenerateProgramRequest.SourceEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Predef.String + ): _root_.pulumirpc.language.GenerateProgramRequest.SourceEntry = _root_.pulumirpc.language.GenerateProgramRequest.SourceEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GenerateProgramRequest.SourceEntry]) + } + + implicit class GenerateProgramRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GenerateProgramRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GenerateProgramRequest](_l) { + def source: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.source)((c_, f_) => c_.copy(source = f_)) + def loaderTarget: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.loaderTarget)((c_, f_) => c_.copy(loaderTarget = f_)) + } + final val SOURCE_FIELD_NUMBER = 1 + final val LOADER_TARGET_FIELD_NUMBER = 2 + @transient + private[language] val _typemapper_source: _root_.scalapb.TypeMapper[pulumirpc.language.GenerateProgramRequest.SourceEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.language.GenerateProgramRequest.SourceEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]] + def of( + source: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String], + loaderTarget: _root_.scala.Predef.String + ): _root_.pulumirpc.language.GenerateProgramRequest = _root_.pulumirpc.language.GenerateProgramRequest( + source, + loaderTarget + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GenerateProgramRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/GenerateProgramResponse.scala b/besom-rpc/src/main/scala/pulumirpc/language/GenerateProgramResponse.scala new file mode 100644 index 00000000..624e4525 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/GenerateProgramResponse.scala @@ -0,0 +1,302 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param diagnostics + * any diagnostics from code generation. + * @param source + * the generated program source code. + */ +@SerialVersionUID(0L) +final case class GenerateProgramResponse( + diagnostics: _root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic] = _root_.scala.Seq.empty, + source: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] = _root_.scala.collection.immutable.Map.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GenerateProgramResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + diagnostics.foreach { __item => + val __value = __item + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + source.foreach { __item => + val __value = pulumirpc.language.GenerateProgramResponse._typemapper_source.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + diagnostics.foreach { __v => + val __m = __v + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + source.foreach { __v => + val __m = pulumirpc.language.GenerateProgramResponse._typemapper_source.toBase(__v) + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def clearDiagnostics = copy(diagnostics = _root_.scala.Seq.empty) + def addDiagnostics(__vs: pulumirpc.codegen.hcl.Diagnostic *): GenerateProgramResponse = addAllDiagnostics(__vs) + def addAllDiagnostics(__vs: Iterable[pulumirpc.codegen.hcl.Diagnostic]): GenerateProgramResponse = copy(diagnostics = diagnostics ++ __vs) + def withDiagnostics(__v: _root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic]): GenerateProgramResponse = copy(diagnostics = __v) + def clearSource = copy(source = _root_.scala.collection.immutable.Map.empty) + def addSource(__vs: (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString) *): GenerateProgramResponse = addAllSource(__vs) + def addAllSource(__vs: Iterable[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]): GenerateProgramResponse = copy(source = source ++ __vs) + def withSource(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]): GenerateProgramResponse = copy(source = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => diagnostics + case 2 => source.iterator.map(pulumirpc.language.GenerateProgramResponse._typemapper_source.toBase(_)).toSeq + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(diagnostics.iterator.map(_.toPMessage).toVector) + case 2 => _root_.scalapb.descriptors.PRepeated(source.iterator.map(pulumirpc.language.GenerateProgramResponse._typemapper_source.toBase(_).toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GenerateProgramResponse.type = pulumirpc.language.GenerateProgramResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GenerateProgramResponse]) +} + +object GenerateProgramResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProgramResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProgramResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GenerateProgramResponse = { + val __diagnostics: _root_.scala.collection.immutable.VectorBuilder[pulumirpc.codegen.hcl.Diagnostic] = new _root_.scala.collection.immutable.VectorBuilder[pulumirpc.codegen.hcl.Diagnostic] + val __source: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __diagnostics += _root_.scalapb.LiteParser.readMessage[pulumirpc.codegen.hcl.Diagnostic](_input__) + case 18 => + __source += pulumirpc.language.GenerateProgramResponse._typemapper_source.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.language.GenerateProgramResponse.SourceEntry](_input__)) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GenerateProgramResponse( + diagnostics = __diagnostics.result(), + source = __source.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GenerateProgramResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GenerateProgramResponse( + diagnostics = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic]]).getOrElse(_root_.scala.Seq.empty), + source = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Seq[pulumirpc.language.GenerateProgramResponse.SourceEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.language.GenerateProgramResponse._typemapper_source.toCustom(_)).toMap + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(14) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(14) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = pulumirpc.codegen.hcl.Diagnostic + case 2 => __out = pulumirpc.language.GenerateProgramResponse.SourceEntry + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.language.GenerateProgramResponse.SourceEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.language.GenerateProgramResponse( + diagnostics = _root_.scala.Seq.empty, + source = _root_.scala.collection.immutable.Map.empty + ) + @SerialVersionUID(0L) + final case class SourceEntry( + key: _root_.scala.Predef.String = "", + value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[SourceEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeBytes(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): SourceEntry = copy(key = __v) + def withValue(__v: _root_.com.google.protobuf.ByteString): SourceEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PByteString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GenerateProgramResponse.SourceEntry.type = pulumirpc.language.GenerateProgramResponse.SourceEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GenerateProgramResponse.SourceEntry]) + } + + object SourceEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProgramResponse.SourceEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProgramResponse.SourceEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GenerateProgramResponse.SourceEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GenerateProgramResponse.SourceEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GenerateProgramResponse.SourceEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GenerateProgramResponse.SourceEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.language.GenerateProgramResponse.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.language.GenerateProgramResponse.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.language.GenerateProgramResponse.SourceEntry( + key = "", + value = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class SourceEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GenerateProgramResponse.SourceEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GenerateProgramResponse.SourceEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.language.GenerateProgramResponse.SourceEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = + _root_.scalapb.TypeMapper[pulumirpc.language.GenerateProgramResponse.SourceEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)](__m => (__m.key, __m.value))(__p => pulumirpc.language.GenerateProgramResponse.SourceEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.language.GenerateProgramResponse.SourceEntry = _root_.pulumirpc.language.GenerateProgramResponse.SourceEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GenerateProgramResponse.SourceEntry]) + } + + implicit class GenerateProgramResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GenerateProgramResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GenerateProgramResponse](_l) { + def diagnostics: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic]] = field(_.diagnostics)((c_, f_) => c_.copy(diagnostics = f_)) + def source: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = field(_.source)((c_, f_) => c_.copy(source = f_)) + } + final val DIAGNOSTICS_FIELD_NUMBER = 1 + final val SOURCE_FIELD_NUMBER = 2 + @transient + private[language] val _typemapper_source: _root_.scalapb.TypeMapper[pulumirpc.language.GenerateProgramResponse.SourceEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.language.GenerateProgramResponse.SourceEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]] + def of( + diagnostics: _root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic], + source: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] + ): _root_.pulumirpc.language.GenerateProgramResponse = _root_.pulumirpc.language.GenerateProgramResponse( + diagnostics, + source + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GenerateProgramResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/GenerateProjectRequest.scala b/besom-rpc/src/main/scala/pulumirpc/language/GenerateProjectRequest.scala new file mode 100644 index 00000000..40751427 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/GenerateProjectRequest.scala @@ -0,0 +1,433 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param sourceDirectory + * the directory to generate the project from. + * @param targetDirectory + * the directory to generate the project in. + * @param project + * the JSON-encoded pulumi project file. + * @param strict + * if PCL binding should be strict or not. + * @param loaderTarget + * The target of a codegen.LoaderServer to use for loading schemas. + * @param localDependencies + * local dependencies to use instead of using the package system. This is a map of package name to a local + * path of a language specific artifact to use for the SDK for that package. + */ +@SerialVersionUID(0L) +final case class GenerateProjectRequest( + sourceDirectory: _root_.scala.Predef.String = "", + targetDirectory: _root_.scala.Predef.String = "", + project: _root_.scala.Predef.String = "", + strict: _root_.scala.Boolean = false, + loaderTarget: _root_.scala.Predef.String = "", + localDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GenerateProjectRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = sourceDirectory + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = targetDirectory + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = project + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + + { + val __value = strict + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(4, __value) + } + }; + + { + val __value = loaderTarget + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(5, __value) + } + }; + localDependencies.foreach { __item => + val __value = pulumirpc.language.GenerateProjectRequest._typemapper_localDependencies.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = sourceDirectory + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = targetDirectory + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = project + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + { + val __v = strict + if (__v != false) { + _output__.writeBool(4, __v) + } + }; + { + val __v = loaderTarget + if (!__v.isEmpty) { + _output__.writeString(5, __v) + } + }; + localDependencies.foreach { __v => + val __m = pulumirpc.language.GenerateProjectRequest._typemapper_localDependencies.toBase(__v) + _output__.writeTag(6, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withSourceDirectory(__v: _root_.scala.Predef.String): GenerateProjectRequest = copy(sourceDirectory = __v) + def withTargetDirectory(__v: _root_.scala.Predef.String): GenerateProjectRequest = copy(targetDirectory = __v) + def withProject(__v: _root_.scala.Predef.String): GenerateProjectRequest = copy(project = __v) + def withStrict(__v: _root_.scala.Boolean): GenerateProjectRequest = copy(strict = __v) + def withLoaderTarget(__v: _root_.scala.Predef.String): GenerateProjectRequest = copy(loaderTarget = __v) + def clearLocalDependencies = copy(localDependencies = _root_.scala.collection.immutable.Map.empty) + def addLocalDependencies(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): GenerateProjectRequest = addAllLocalDependencies(__vs) + def addAllLocalDependencies(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): GenerateProjectRequest = copy(localDependencies = localDependencies ++ __vs) + def withLocalDependencies(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): GenerateProjectRequest = copy(localDependencies = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = sourceDirectory + if (__t != "") __t else null + } + case 2 => { + val __t = targetDirectory + if (__t != "") __t else null + } + case 3 => { + val __t = project + if (__t != "") __t else null + } + case 4 => { + val __t = strict + if (__t != false) __t else null + } + case 5 => { + val __t = loaderTarget + if (__t != "") __t else null + } + case 6 => localDependencies.iterator.map(pulumirpc.language.GenerateProjectRequest._typemapper_localDependencies.toBase(_)).toSeq + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(sourceDirectory) + case 2 => _root_.scalapb.descriptors.PString(targetDirectory) + case 3 => _root_.scalapb.descriptors.PString(project) + case 4 => _root_.scalapb.descriptors.PBoolean(strict) + case 5 => _root_.scalapb.descriptors.PString(loaderTarget) + case 6 => _root_.scalapb.descriptors.PRepeated(localDependencies.iterator.map(pulumirpc.language.GenerateProjectRequest._typemapper_localDependencies.toBase(_).toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GenerateProjectRequest.type = pulumirpc.language.GenerateProjectRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GenerateProjectRequest]) +} + +object GenerateProjectRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProjectRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProjectRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GenerateProjectRequest = { + var __sourceDirectory: _root_.scala.Predef.String = "" + var __targetDirectory: _root_.scala.Predef.String = "" + var __project: _root_.scala.Predef.String = "" + var __strict: _root_.scala.Boolean = false + var __loaderTarget: _root_.scala.Predef.String = "" + val __localDependencies: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.scala.Predef.String), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.scala.Predef.String] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __sourceDirectory = _input__.readStringRequireUtf8() + case 18 => + __targetDirectory = _input__.readStringRequireUtf8() + case 26 => + __project = _input__.readStringRequireUtf8() + case 32 => + __strict = _input__.readBool() + case 42 => + __loaderTarget = _input__.readStringRequireUtf8() + case 50 => + __localDependencies += pulumirpc.language.GenerateProjectRequest._typemapper_localDependencies.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry](_input__)) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GenerateProjectRequest( + sourceDirectory = __sourceDirectory, + targetDirectory = __targetDirectory, + project = __project, + strict = __strict, + loaderTarget = __loaderTarget, + localDependencies = __localDependencies.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GenerateProjectRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GenerateProjectRequest( + sourceDirectory = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + targetDirectory = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + project = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + strict = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + loaderTarget = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + localDependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Seq[pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.language.GenerateProjectRequest._typemapper_localDependencies.toCustom(_)).toMap + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(15) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(15) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 6 => __out = pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.language.GenerateProjectRequest( + sourceDirectory = "", + targetDirectory = "", + project = "", + strict = false, + loaderTarget = "", + localDependencies = _root_.scala.collection.immutable.Map.empty + ) + @SerialVersionUID(0L) + final case class LocalDependenciesEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[LocalDependenciesEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): LocalDependenciesEntry = copy(key = __v) + def withValue(__v: _root_.scala.Predef.String): LocalDependenciesEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry.type = pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GenerateProjectRequest.LocalDependenciesEntry]) + } + + object LocalDependenciesEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.language.GenerateProjectRequest.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.language.GenerateProjectRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry( + key = "", + value = "" + ) + implicit class LocalDependenciesEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = + _root_.scalapb.TypeMapper[pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Predef.String + ): _root_.pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry = _root_.pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GenerateProjectRequest.LocalDependenciesEntry]) + } + + implicit class GenerateProjectRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GenerateProjectRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GenerateProjectRequest](_l) { + def sourceDirectory: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.sourceDirectory)((c_, f_) => c_.copy(sourceDirectory = f_)) + def targetDirectory: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.targetDirectory)((c_, f_) => c_.copy(targetDirectory = f_)) + def project: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.project)((c_, f_) => c_.copy(project = f_)) + def strict: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.strict)((c_, f_) => c_.copy(strict = f_)) + def loaderTarget: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.loaderTarget)((c_, f_) => c_.copy(loaderTarget = f_)) + def localDependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.localDependencies)((c_, f_) => c_.copy(localDependencies = f_)) + } + final val SOURCE_DIRECTORY_FIELD_NUMBER = 1 + final val TARGET_DIRECTORY_FIELD_NUMBER = 2 + final val PROJECT_FIELD_NUMBER = 3 + final val STRICT_FIELD_NUMBER = 4 + final val LOADER_TARGET_FIELD_NUMBER = 5 + final val LOCAL_DEPENDENCIES_FIELD_NUMBER = 6 + @transient + private[language] val _typemapper_localDependencies: _root_.scalapb.TypeMapper[pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.language.GenerateProjectRequest.LocalDependenciesEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]] + def of( + sourceDirectory: _root_.scala.Predef.String, + targetDirectory: _root_.scala.Predef.String, + project: _root_.scala.Predef.String, + strict: _root_.scala.Boolean, + loaderTarget: _root_.scala.Predef.String, + localDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] + ): _root_.pulumirpc.language.GenerateProjectRequest = _root_.pulumirpc.language.GenerateProjectRequest( + sourceDirectory, + targetDirectory, + project, + strict, + loaderTarget, + localDependencies + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GenerateProjectRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/GenerateProjectResponse.scala b/besom-rpc/src/main/scala/pulumirpc/language/GenerateProjectResponse.scala new file mode 100644 index 00000000..d4da174b --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/GenerateProjectResponse.scala @@ -0,0 +1,123 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param diagnostics + * any diagnostics from code generation. + */ +@SerialVersionUID(0L) +final case class GenerateProjectResponse( + diagnostics: _root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GenerateProjectResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + diagnostics.foreach { __item => + val __value = __item + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + diagnostics.foreach { __v => + val __m = __v + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def clearDiagnostics = copy(diagnostics = _root_.scala.Seq.empty) + def addDiagnostics(__vs: pulumirpc.codegen.hcl.Diagnostic *): GenerateProjectResponse = addAllDiagnostics(__vs) + def addAllDiagnostics(__vs: Iterable[pulumirpc.codegen.hcl.Diagnostic]): GenerateProjectResponse = copy(diagnostics = diagnostics ++ __vs) + def withDiagnostics(__v: _root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic]): GenerateProjectResponse = copy(diagnostics = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => diagnostics + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(diagnostics.iterator.map(_.toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GenerateProjectResponse.type = pulumirpc.language.GenerateProjectResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GenerateProjectResponse]) +} + +object GenerateProjectResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProjectResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GenerateProjectResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GenerateProjectResponse = { + val __diagnostics: _root_.scala.collection.immutable.VectorBuilder[pulumirpc.codegen.hcl.Diagnostic] = new _root_.scala.collection.immutable.VectorBuilder[pulumirpc.codegen.hcl.Diagnostic] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __diagnostics += _root_.scalapb.LiteParser.readMessage[pulumirpc.codegen.hcl.Diagnostic](_input__) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GenerateProjectResponse( + diagnostics = __diagnostics.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GenerateProjectResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GenerateProjectResponse( + diagnostics = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(16) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(16) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = pulumirpc.codegen.hcl.Diagnostic + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.language.GenerateProjectResponse( + diagnostics = _root_.scala.Seq.empty + ) + implicit class GenerateProjectResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GenerateProjectResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GenerateProjectResponse](_l) { + def diagnostics: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic]] = field(_.diagnostics)((c_, f_) => c_.copy(diagnostics = f_)) + } + final val DIAGNOSTICS_FIELD_NUMBER = 1 + def of( + diagnostics: _root_.scala.Seq[pulumirpc.codegen.hcl.Diagnostic] + ): _root_.pulumirpc.language.GenerateProjectResponse = _root_.pulumirpc.language.GenerateProjectResponse( + diagnostics + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GenerateProjectResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/GetProgramDependenciesRequest.scala b/besom-rpc/src/main/scala/pulumirpc/language/GetProgramDependenciesRequest.scala new file mode 100644 index 00000000..8af3cf43 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/GetProgramDependenciesRequest.scala @@ -0,0 +1,251 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param project + * the project name, the engine always sets this to "deprecated" now. + * @param pwd + * the program's working directory. + * @param program + * the path to the program. + * @param transitiveDependencies + * if transitive dependencies should be included in the result. + * @param info + * the program info to use to calculate dependencies. + */ +@SerialVersionUID(0L) +final case class GetProgramDependenciesRequest( + @scala.deprecated(message="Marked as deprecated in proto file", "") project: _root_.scala.Predef.String = "", + @scala.deprecated(message="Marked as deprecated in proto file", "") pwd: _root_.scala.Predef.String = "", + @scala.deprecated(message="Marked as deprecated in proto file", "") program: _root_.scala.Predef.String = "", + transitiveDependencies: _root_.scala.Boolean = false, + info: _root_.scala.Option[pulumirpc.language.ProgramInfo] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GetProgramDependenciesRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = project + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = pwd + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = program + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + + { + val __value = transitiveDependencies + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(4, __value) + } + }; + if (info.isDefined) { + val __value = info.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = project + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = pwd + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = program + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + { + val __v = transitiveDependencies + if (__v != false) { + _output__.writeBool(4, __v) + } + }; + info.foreach { __v => + val __m = __v + _output__.writeTag(5, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withProject(__v: _root_.scala.Predef.String): GetProgramDependenciesRequest = copy(project = __v) + def withPwd(__v: _root_.scala.Predef.String): GetProgramDependenciesRequest = copy(pwd = __v) + def withProgram(__v: _root_.scala.Predef.String): GetProgramDependenciesRequest = copy(program = __v) + def withTransitiveDependencies(__v: _root_.scala.Boolean): GetProgramDependenciesRequest = copy(transitiveDependencies = __v) + def getInfo: pulumirpc.language.ProgramInfo = info.getOrElse(pulumirpc.language.ProgramInfo.defaultInstance) + def clearInfo: GetProgramDependenciesRequest = copy(info = _root_.scala.None) + def withInfo(__v: pulumirpc.language.ProgramInfo): GetProgramDependenciesRequest = copy(info = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = project + if (__t != "") __t else null + } + case 2 => { + val __t = pwd + if (__t != "") __t else null + } + case 3 => { + val __t = program + if (__t != "") __t else null + } + case 4 => { + val __t = transitiveDependencies + if (__t != false) __t else null + } + case 5 => info.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(project) + case 2 => _root_.scalapb.descriptors.PString(pwd) + case 3 => _root_.scalapb.descriptors.PString(program) + case 4 => _root_.scalapb.descriptors.PBoolean(transitiveDependencies) + case 5 => info.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GetProgramDependenciesRequest.type = pulumirpc.language.GetProgramDependenciesRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GetProgramDependenciesRequest]) +} + +object GetProgramDependenciesRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GetProgramDependenciesRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GetProgramDependenciesRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GetProgramDependenciesRequest = { + var __project: _root_.scala.Predef.String = "" + var __pwd: _root_.scala.Predef.String = "" + var __program: _root_.scala.Predef.String = "" + var __transitiveDependencies: _root_.scala.Boolean = false + var __info: _root_.scala.Option[pulumirpc.language.ProgramInfo] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __project = _input__.readStringRequireUtf8() + case 18 => + __pwd = _input__.readStringRequireUtf8() + case 26 => + __program = _input__.readStringRequireUtf8() + case 32 => + __transitiveDependencies = _input__.readBool() + case 42 => + __info = _root_.scala.Option(__info.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.language.ProgramInfo](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GetProgramDependenciesRequest( + project = __project, + pwd = __pwd, + program = __program, + transitiveDependencies = __transitiveDependencies, + info = __info, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GetProgramDependenciesRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GetProgramDependenciesRequest( + project = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + pwd = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + program = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + transitiveDependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + info = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[pulumirpc.language.ProgramInfo]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(2) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(2) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 5 => __out = pulumirpc.language.ProgramInfo + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.language.GetProgramDependenciesRequest( + project = "", + pwd = "", + program = "", + transitiveDependencies = false, + info = _root_.scala.None + ) + implicit class GetProgramDependenciesRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GetProgramDependenciesRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GetProgramDependenciesRequest](_l) { + def project: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.project)((c_, f_) => c_.copy(project = f_)) + def pwd: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.pwd)((c_, f_) => c_.copy(pwd = f_)) + def program: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.program)((c_, f_) => c_.copy(program = f_)) + def transitiveDependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.transitiveDependencies)((c_, f_) => c_.copy(transitiveDependencies = f_)) + def info: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.ProgramInfo] = field(_.getInfo)((c_, f_) => c_.copy(info = _root_.scala.Option(f_))) + def optionalInfo: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.language.ProgramInfo]] = field(_.info)((c_, f_) => c_.copy(info = f_)) + } + final val PROJECT_FIELD_NUMBER = 1 + final val PWD_FIELD_NUMBER = 2 + final val PROGRAM_FIELD_NUMBER = 3 + final val TRANSITIVEDEPENDENCIES_FIELD_NUMBER = 4 + final val INFO_FIELD_NUMBER = 5 + def of( + project: _root_.scala.Predef.String, + pwd: _root_.scala.Predef.String, + program: _root_.scala.Predef.String, + transitiveDependencies: _root_.scala.Boolean, + info: _root_.scala.Option[pulumirpc.language.ProgramInfo] + ): _root_.pulumirpc.language.GetProgramDependenciesRequest = _root_.pulumirpc.language.GetProgramDependenciesRequest( + project, + pwd, + program, + transitiveDependencies, + info + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GetProgramDependenciesRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/GetProgramDependenciesResponse.scala b/besom-rpc/src/main/scala/pulumirpc/language/GetProgramDependenciesResponse.scala new file mode 100644 index 00000000..fc0a7617 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/GetProgramDependenciesResponse.scala @@ -0,0 +1,123 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param dependencies + * the dependencies of this program + */ +@SerialVersionUID(0L) +final case class GetProgramDependenciesResponse( + dependencies: _root_.scala.Seq[pulumirpc.language.DependencyInfo] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GetProgramDependenciesResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + dependencies.foreach { __item => + val __value = __item + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + dependencies.foreach { __v => + val __m = __v + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def clearDependencies = copy(dependencies = _root_.scala.Seq.empty) + def addDependencies(__vs: pulumirpc.language.DependencyInfo *): GetProgramDependenciesResponse = addAllDependencies(__vs) + def addAllDependencies(__vs: Iterable[pulumirpc.language.DependencyInfo]): GetProgramDependenciesResponse = copy(dependencies = dependencies ++ __vs) + def withDependencies(__v: _root_.scala.Seq[pulumirpc.language.DependencyInfo]): GetProgramDependenciesResponse = copy(dependencies = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => dependencies + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(dependencies.iterator.map(_.toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GetProgramDependenciesResponse.type = pulumirpc.language.GetProgramDependenciesResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GetProgramDependenciesResponse]) +} + +object GetProgramDependenciesResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GetProgramDependenciesResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GetProgramDependenciesResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GetProgramDependenciesResponse = { + val __dependencies: _root_.scala.collection.immutable.VectorBuilder[pulumirpc.language.DependencyInfo] = new _root_.scala.collection.immutable.VectorBuilder[pulumirpc.language.DependencyInfo] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __dependencies += _root_.scalapb.LiteParser.readMessage[pulumirpc.language.DependencyInfo](_input__) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GetProgramDependenciesResponse( + dependencies = __dependencies.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GetProgramDependenciesResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GetProgramDependenciesResponse( + dependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[pulumirpc.language.DependencyInfo]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(4) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(4) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = pulumirpc.language.DependencyInfo + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.language.GetProgramDependenciesResponse( + dependencies = _root_.scala.Seq.empty + ) + implicit class GetProgramDependenciesResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GetProgramDependenciesResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GetProgramDependenciesResponse](_l) { + def dependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[pulumirpc.language.DependencyInfo]] = field(_.dependencies)((c_, f_) => c_.copy(dependencies = f_)) + } + final val DEPENDENCIES_FIELD_NUMBER = 1 + def of( + dependencies: _root_.scala.Seq[pulumirpc.language.DependencyInfo] + ): _root_.pulumirpc.language.GetProgramDependenciesResponse = _root_.pulumirpc.language.GetProgramDependenciesResponse( + dependencies + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GetProgramDependenciesResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/GetRequiredPluginsRequest.scala b/besom-rpc/src/main/scala/pulumirpc/language/GetRequiredPluginsRequest.scala new file mode 100644 index 00000000..6012498e --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/GetRequiredPluginsRequest.scala @@ -0,0 +1,219 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param project + * the project name, the engine always sets this to "deprecated" now. + * @param pwd + * the program's working directory. + * @param program + * the path to the program. + * @param info + * the program info to use to calculate plugins. + */ +@SerialVersionUID(0L) +final case class GetRequiredPluginsRequest( + @scala.deprecated(message="Marked as deprecated in proto file", "") project: _root_.scala.Predef.String = "", + @scala.deprecated(message="Marked as deprecated in proto file", "") pwd: _root_.scala.Predef.String = "", + @scala.deprecated(message="Marked as deprecated in proto file", "") program: _root_.scala.Predef.String = "", + info: _root_.scala.Option[pulumirpc.language.ProgramInfo] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GetRequiredPluginsRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = project + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = pwd + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = program + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + if (info.isDefined) { + val __value = info.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = project + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = pwd + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = program + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + info.foreach { __v => + val __m = __v + _output__.writeTag(4, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withProject(__v: _root_.scala.Predef.String): GetRequiredPluginsRequest = copy(project = __v) + def withPwd(__v: _root_.scala.Predef.String): GetRequiredPluginsRequest = copy(pwd = __v) + def withProgram(__v: _root_.scala.Predef.String): GetRequiredPluginsRequest = copy(program = __v) + def getInfo: pulumirpc.language.ProgramInfo = info.getOrElse(pulumirpc.language.ProgramInfo.defaultInstance) + def clearInfo: GetRequiredPluginsRequest = copy(info = _root_.scala.None) + def withInfo(__v: pulumirpc.language.ProgramInfo): GetRequiredPluginsRequest = copy(info = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = project + if (__t != "") __t else null + } + case 2 => { + val __t = pwd + if (__t != "") __t else null + } + case 3 => { + val __t = program + if (__t != "") __t else null + } + case 4 => info.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(project) + case 2 => _root_.scalapb.descriptors.PString(pwd) + case 3 => _root_.scalapb.descriptors.PString(program) + case 4 => info.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GetRequiredPluginsRequest.type = pulumirpc.language.GetRequiredPluginsRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GetRequiredPluginsRequest]) +} + +object GetRequiredPluginsRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GetRequiredPluginsRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GetRequiredPluginsRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GetRequiredPluginsRequest = { + var __project: _root_.scala.Predef.String = "" + var __pwd: _root_.scala.Predef.String = "" + var __program: _root_.scala.Predef.String = "" + var __info: _root_.scala.Option[pulumirpc.language.ProgramInfo] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __project = _input__.readStringRequireUtf8() + case 18 => + __pwd = _input__.readStringRequireUtf8() + case 26 => + __program = _input__.readStringRequireUtf8() + case 34 => + __info = _root_.scala.Option(__info.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.language.ProgramInfo](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GetRequiredPluginsRequest( + project = __project, + pwd = __pwd, + program = __program, + info = __info, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GetRequiredPluginsRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GetRequiredPluginsRequest( + project = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + pwd = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + program = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + info = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[pulumirpc.language.ProgramInfo]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(5) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(5) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 4 => __out = pulumirpc.language.ProgramInfo + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.language.GetRequiredPluginsRequest( + project = "", + pwd = "", + program = "", + info = _root_.scala.None + ) + implicit class GetRequiredPluginsRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GetRequiredPluginsRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GetRequiredPluginsRequest](_l) { + def project: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.project)((c_, f_) => c_.copy(project = f_)) + def pwd: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.pwd)((c_, f_) => c_.copy(pwd = f_)) + def program: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.program)((c_, f_) => c_.copy(program = f_)) + def info: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.ProgramInfo] = field(_.getInfo)((c_, f_) => c_.copy(info = _root_.scala.Option(f_))) + def optionalInfo: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.language.ProgramInfo]] = field(_.info)((c_, f_) => c_.copy(info = f_)) + } + final val PROJECT_FIELD_NUMBER = 1 + final val PWD_FIELD_NUMBER = 2 + final val PROGRAM_FIELD_NUMBER = 3 + final val INFO_FIELD_NUMBER = 4 + def of( + project: _root_.scala.Predef.String, + pwd: _root_.scala.Predef.String, + program: _root_.scala.Predef.String, + info: _root_.scala.Option[pulumirpc.language.ProgramInfo] + ): _root_.pulumirpc.language.GetRequiredPluginsRequest = _root_.pulumirpc.language.GetRequiredPluginsRequest( + project, + pwd, + program, + info + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GetRequiredPluginsRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/GetRequiredPluginsResponse.scala b/besom-rpc/src/main/scala/pulumirpc/language/GetRequiredPluginsResponse.scala new file mode 100644 index 00000000..03ef3397 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/GetRequiredPluginsResponse.scala @@ -0,0 +1,123 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param plugins + * a list of plugins required by this program. + */ +@SerialVersionUID(0L) +final case class GetRequiredPluginsResponse( + plugins: _root_.scala.Seq[pulumirpc.plugin.PluginDependency] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GetRequiredPluginsResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + plugins.foreach { __item => + val __value = __item + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + plugins.foreach { __v => + val __m = __v + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def clearPlugins = copy(plugins = _root_.scala.Seq.empty) + def addPlugins(__vs: pulumirpc.plugin.PluginDependency *): GetRequiredPluginsResponse = addAllPlugins(__vs) + def addAllPlugins(__vs: Iterable[pulumirpc.plugin.PluginDependency]): GetRequiredPluginsResponse = copy(plugins = plugins ++ __vs) + def withPlugins(__v: _root_.scala.Seq[pulumirpc.plugin.PluginDependency]): GetRequiredPluginsResponse = copy(plugins = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => plugins + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(plugins.iterator.map(_.toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.GetRequiredPluginsResponse.type = pulumirpc.language.GetRequiredPluginsResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GetRequiredPluginsResponse]) +} + +object GetRequiredPluginsResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.language.GetRequiredPluginsResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.GetRequiredPluginsResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.GetRequiredPluginsResponse = { + val __plugins: _root_.scala.collection.immutable.VectorBuilder[pulumirpc.plugin.PluginDependency] = new _root_.scala.collection.immutable.VectorBuilder[pulumirpc.plugin.PluginDependency] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __plugins += _root_.scalapb.LiteParser.readMessage[pulumirpc.plugin.PluginDependency](_input__) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.GetRequiredPluginsResponse( + plugins = __plugins.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.GetRequiredPluginsResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.GetRequiredPluginsResponse( + plugins = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[pulumirpc.plugin.PluginDependency]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(6) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(6) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = pulumirpc.plugin.PluginDependency + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.language.GetRequiredPluginsResponse( + plugins = _root_.scala.Seq.empty + ) + implicit class GetRequiredPluginsResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.GetRequiredPluginsResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.GetRequiredPluginsResponse](_l) { + def plugins: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[pulumirpc.plugin.PluginDependency]] = field(_.plugins)((c_, f_) => c_.copy(plugins = f_)) + } + final val PLUGINS_FIELD_NUMBER = 1 + def of( + plugins: _root_.scala.Seq[pulumirpc.plugin.PluginDependency] + ): _root_.pulumirpc.language.GetRequiredPluginsResponse = _root_.pulumirpc.language.GetRequiredPluginsResponse( + plugins + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GetRequiredPluginsResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/InstallDependenciesRequest.scala b/besom-rpc/src/main/scala/pulumirpc/language/InstallDependenciesRequest.scala new file mode 100644 index 00000000..d5b95473 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/InstallDependenciesRequest.scala @@ -0,0 +1,187 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param directory + * the program's working directory. + * @param isTerminal + * if we are running in a terminal and should use ANSI codes + * @param info + * the program info to use to execute the plugin. + */ +@SerialVersionUID(0L) +final case class InstallDependenciesRequest( + @scala.deprecated(message="Marked as deprecated in proto file", "") directory: _root_.scala.Predef.String = "", + isTerminal: _root_.scala.Boolean = false, + info: _root_.scala.Option[pulumirpc.language.ProgramInfo] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[InstallDependenciesRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = directory + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = isTerminal + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(2, __value) + } + }; + if (info.isDefined) { + val __value = info.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = directory + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = isTerminal + if (__v != false) { + _output__.writeBool(2, __v) + } + }; + info.foreach { __v => + val __m = __v + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withDirectory(__v: _root_.scala.Predef.String): InstallDependenciesRequest = copy(directory = __v) + def withIsTerminal(__v: _root_.scala.Boolean): InstallDependenciesRequest = copy(isTerminal = __v) + def getInfo: pulumirpc.language.ProgramInfo = info.getOrElse(pulumirpc.language.ProgramInfo.defaultInstance) + def clearInfo: InstallDependenciesRequest = copy(info = _root_.scala.None) + def withInfo(__v: pulumirpc.language.ProgramInfo): InstallDependenciesRequest = copy(info = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = directory + if (__t != "") __t else null + } + case 2 => { + val __t = isTerminal + if (__t != false) __t else null + } + case 3 => info.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(directory) + case 2 => _root_.scalapb.descriptors.PBoolean(isTerminal) + case 3 => info.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.InstallDependenciesRequest.type = pulumirpc.language.InstallDependenciesRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.InstallDependenciesRequest]) +} + +object InstallDependenciesRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.language.InstallDependenciesRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.InstallDependenciesRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.InstallDependenciesRequest = { + var __directory: _root_.scala.Predef.String = "" + var __isTerminal: _root_.scala.Boolean = false + var __info: _root_.scala.Option[pulumirpc.language.ProgramInfo] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __directory = _input__.readStringRequireUtf8() + case 16 => + __isTerminal = _input__.readBool() + case 26 => + __info = _root_.scala.Option(__info.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.language.ProgramInfo](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.InstallDependenciesRequest( + directory = __directory, + isTerminal = __isTerminal, + info = __info, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.InstallDependenciesRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.InstallDependenciesRequest( + directory = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + isTerminal = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + info = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[pulumirpc.language.ProgramInfo]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(9) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(9) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 3 => __out = pulumirpc.language.ProgramInfo + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.language.InstallDependenciesRequest( + directory = "", + isTerminal = false, + info = _root_.scala.None + ) + implicit class InstallDependenciesRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.InstallDependenciesRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.InstallDependenciesRequest](_l) { + def directory: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.directory)((c_, f_) => c_.copy(directory = f_)) + def isTerminal: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.isTerminal)((c_, f_) => c_.copy(isTerminal = f_)) + def info: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.ProgramInfo] = field(_.getInfo)((c_, f_) => c_.copy(info = _root_.scala.Option(f_))) + def optionalInfo: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.language.ProgramInfo]] = field(_.info)((c_, f_) => c_.copy(info = f_)) + } + final val DIRECTORY_FIELD_NUMBER = 1 + final val IS_TERMINAL_FIELD_NUMBER = 2 + final val INFO_FIELD_NUMBER = 3 + def of( + directory: _root_.scala.Predef.String, + isTerminal: _root_.scala.Boolean, + info: _root_.scala.Option[pulumirpc.language.ProgramInfo] + ): _root_.pulumirpc.language.InstallDependenciesRequest = _root_.pulumirpc.language.InstallDependenciesRequest( + directory, + isTerminal, + info + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.InstallDependenciesRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/InstallDependenciesResponse.scala b/besom-rpc/src/main/scala/pulumirpc/language/InstallDependenciesResponse.scala new file mode 100644 index 00000000..911b072b --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/InstallDependenciesResponse.scala @@ -0,0 +1,152 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param stdout + * a line of stdout text. + * @param stderr + * a line of stderr text. + */ +@SerialVersionUID(0L) +final case class InstallDependenciesResponse( + stdout: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + stderr: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[InstallDependenciesResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = stdout + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(1, __value) + } + }; + + { + val __value = stderr + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = stdout + if (!__v.isEmpty) { + _output__.writeBytes(1, __v) + } + }; + { + val __v = stderr + if (!__v.isEmpty) { + _output__.writeBytes(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withStdout(__v: _root_.com.google.protobuf.ByteString): InstallDependenciesResponse = copy(stdout = __v) + def withStderr(__v: _root_.com.google.protobuf.ByteString): InstallDependenciesResponse = copy(stderr = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = stdout + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + case 2 => { + val __t = stderr + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PByteString(stdout) + case 2 => _root_.scalapb.descriptors.PByteString(stderr) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.InstallDependenciesResponse.type = pulumirpc.language.InstallDependenciesResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.InstallDependenciesResponse]) +} + +object InstallDependenciesResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.language.InstallDependenciesResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.InstallDependenciesResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.InstallDependenciesResponse = { + var __stdout: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var __stderr: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __stdout = _input__.readBytes() + case 18 => + __stderr = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.InstallDependenciesResponse( + stdout = __stdout, + stderr = __stderr, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.InstallDependenciesResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.InstallDependenciesResponse( + stdout = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY), + stderr = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(10) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(10) + 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) + lazy val defaultInstance = pulumirpc.language.InstallDependenciesResponse( + stdout = _root_.com.google.protobuf.ByteString.EMPTY, + stderr = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class InstallDependenciesResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.InstallDependenciesResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.InstallDependenciesResponse](_l) { + def stdout: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.stdout)((c_, f_) => c_.copy(stdout = f_)) + def stderr: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.stderr)((c_, f_) => c_.copy(stderr = f_)) + } + final val STDOUT_FIELD_NUMBER = 1 + final val STDERR_FIELD_NUMBER = 2 + def of( + stdout: _root_.com.google.protobuf.ByteString, + stderr: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.language.InstallDependenciesResponse = _root_.pulumirpc.language.InstallDependenciesResponse( + stdout, + stderr + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.InstallDependenciesResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/LanguageProto.scala b/besom-rpc/src/main/scala/pulumirpc/language/LanguageProto.scala new file mode 100644 index 00000000..8424b358 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/LanguageProto.scala @@ -0,0 +1,138 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +object LanguageProto extends _root_.scalapb.GeneratedFileObject { + lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq( + pulumirpc.codegen.hcl.HclProto, + pulumirpc.plugin.PluginProto, + com.google.protobuf.empty.EmptyProto, + com.google.protobuf.struct.StructProto + ) + lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + pulumirpc.language.ProgramInfo, + pulumirpc.language.AboutResponse, + pulumirpc.language.GetProgramDependenciesRequest, + pulumirpc.language.DependencyInfo, + pulumirpc.language.GetProgramDependenciesResponse, + pulumirpc.language.GetRequiredPluginsRequest, + pulumirpc.language.GetRequiredPluginsResponse, + pulumirpc.language.RunRequest, + pulumirpc.language.RunResponse, + pulumirpc.language.InstallDependenciesRequest, + pulumirpc.language.InstallDependenciesResponse, + pulumirpc.language.RunPluginRequest, + pulumirpc.language.RunPluginResponse, + pulumirpc.language.GenerateProgramRequest, + pulumirpc.language.GenerateProgramResponse, + pulumirpc.language.GenerateProjectRequest, + pulumirpc.language.GenerateProjectResponse, + pulumirpc.language.GeneratePackageRequest, + pulumirpc.language.GeneratePackageResponse, + pulumirpc.language.PackRequest, + pulumirpc.language.PackResponse + ) + private lazy val ProtoBytes: _root_.scala.Array[Byte] = + scalapb.Encoding.fromBase64(scala.collection.immutable.Seq( + """ChVwdWx1bWkvbGFuZ3VhZ2UucHJvdG8SCXB1bHVtaXJwYxoYcHVsdW1pL2NvZGVnZW4vaGNsLnByb3RvGhNwdWx1bWkvcGx1Z + 2luLnByb3RvGhtnb29nbGUvcHJvdG9idWYvZW1wdHkucHJvdG8aHGdvb2dsZS9wcm90b2J1Zi9zdHJ1Y3QucHJvdG8i/wEKC1Byb + 2dyYW1JbmZvEjkKDnJvb3RfZGlyZWN0b3J5GAEgASgJQhLiPw8SDXJvb3REaXJlY3RvcnlSDXJvb3REaXJlY3RvcnkSQgoRcHJvZ + 3JhbV9kaXJlY3RvcnkYAiABKAlCFeI/EhIQcHJvZ3JhbURpcmVjdG9yeVIQcHJvZ3JhbURpcmVjdG9yeRIwCgtlbnRyeV9wb2lud + BgDIAEoCUIP4j8MEgplbnRyeVBvaW50UgplbnRyeVBvaW50Ej8KB29wdGlvbnMYBCABKAsyFy5nb29nbGUucHJvdG9idWYuU3Ryd + WN0QgziPwkSB29wdGlvbnNSB29wdGlvbnMijgIKDUFib3V0UmVzcG9uc2USLwoKZXhlY3V0YWJsZRgBIAEoCUIP4j8MEgpleGVjd + XRhYmxlUgpleGVjdXRhYmxlEiYKB3ZlcnNpb24YAiABKAlCDOI/CRIHdmVyc2lvblIHdmVyc2lvbhJRCghtZXRhZGF0YRgDIAMoC + zImLnB1bHVtaXJwYy5BYm91dFJlc3BvbnNlLk1ldGFkYXRhRW50cnlCDeI/ChIIbWV0YWRhdGFSCG1ldGFkYXRhGlEKDU1ldGFkY + XRhRW50cnkSGgoDa2V5GAEgASgJQgjiPwUSA2tleVIDa2V5EiAKBXZhbHVlGAIgASgJQgriPwcSBXZhbHVlUgV2YWx1ZToCOAEin + QIKHUdldFByb2dyYW1EZXBlbmRlbmNpZXNSZXF1ZXN0EigKB3Byb2plY3QYASABKAlCDhgB4j8JEgdwcm9qZWN0Ugdwcm9qZWN0E + hwKA3B3ZBgCIAEoCUIKGAHiPwUSA3B3ZFIDcHdkEigKB3Byb2dyYW0YAyABKAlCDhgB4j8JEgdwcm9ncmFtUgdwcm9ncmFtElMKF + nRyYW5zaXRpdmVEZXBlbmRlbmNpZXMYBCABKAhCG+I/GBIWdHJhbnNpdGl2ZURlcGVuZGVuY2llc1IWdHJhbnNpdGl2ZURlcGVuZ + GVuY2llcxI1CgRpbmZvGAUgASgLMhYucHVsdW1pcnBjLlByb2dyYW1JbmZvQgniPwYSBGluZm9SBGluZm8iVwoORGVwZW5kZW5je + UluZm8SHQoEbmFtZRgBIAEoCUIJ4j8GEgRuYW1lUgRuYW1lEiYKB3ZlcnNpb24YAiABKAlCDOI/CRIHdmVyc2lvblIHdmVyc2lvb + iJyCh5HZXRQcm9ncmFtRGVwZW5kZW5jaWVzUmVzcG9uc2USUAoMZGVwZW5kZW5jaWVzGAEgAygLMhkucHVsdW1pcnBjLkRlcGVuZ + GVuY3lJbmZvQhHiPw4SDGRlcGVuZGVuY2llc1IMZGVwZW5kZW5jaWVzIsQBChlHZXRSZXF1aXJlZFBsdWdpbnNSZXF1ZXN0EigKB + 3Byb2plY3QYASABKAlCDhgB4j8JEgdwcm9qZWN0Ugdwcm9qZWN0EhwKA3B3ZBgCIAEoCUIKGAHiPwUSA3B3ZFIDcHdkEigKB3Byb + 2dyYW0YAyABKAlCDhgB4j8JEgdwcm9ncmFtUgdwcm9ncmFtEjUKBGluZm8YBCABKAsyFi5wdWx1bWlycGMuUHJvZ3JhbUluZm9CC + eI/BhIEaW5mb1IEaW5mbyJhChpHZXRSZXF1aXJlZFBsdWdpbnNSZXNwb25zZRJDCgdwbHVnaW5zGAEgAygLMhsucHVsdW1pcnBjL + lBsdWdpbkRlcGVuZGVuY3lCDOI/CRIHcGx1Z2luc1IHcGx1Z2lucyKgBgoKUnVuUmVxdWVzdBImCgdwcm9qZWN0GAEgASgJQgziP + wkSB3Byb2plY3RSB3Byb2plY3QSIAoFc3RhY2sYAiABKAlCCuI/BxIFc3RhY2tSBXN0YWNrEhoKA3B3ZBgDIAEoCUII4j8FEgNwd + 2RSA3B3ZBIoCgdwcm9ncmFtGAQgASgJQg4YAeI/CRIHcHJvZ3JhbVIHcHJvZ3JhbRIdCgRhcmdzGAUgAygJQgniPwYSBGFyZ3NSB + GFyZ3MSRgoGY29uZmlnGAYgAygLMiEucHVsdW1pcnBjLlJ1blJlcXVlc3QuQ29uZmlnRW50cnlCC+I/CBIGY29uZmlnUgZjb25ma + WcSIwoGZHJ5UnVuGAcgASgIQgviPwgSBmRyeVJ1blIGZHJ5UnVuEikKCHBhcmFsbGVsGAggASgFQg3iPwoSCHBhcmFsbGVsUghwY + XJhbGxlbBI8Cg9tb25pdG9yX2FkZHJlc3MYCSABKAlCE+I/EBIObW9uaXRvckFkZHJlc3NSDm1vbml0b3JBZGRyZXNzEiwKCXF1Z + XJ5TW9kZRgKIAEoCEIO4j8LEglxdWVyeU1vZGVSCXF1ZXJ5TW9kZRJBChBjb25maWdTZWNyZXRLZXlzGAsgAygJQhXiPxISEGNvb + mZpZ1NlY3JldEtleXNSEGNvbmZpZ1NlY3JldEtleXMSNQoMb3JnYW5pemF0aW9uGAwgASgJQhHiPw4SDG9yZ2FuaXphdGlvblIMb + 3JnYW5pemF0aW9uEl0KEWNvbmZpZ1Byb3BlcnR5TWFwGA0gASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdEIW4j8TEhFjb25ma + WdQcm9wZXJ0eU1hcFIRY29uZmlnUHJvcGVydHlNYXASNQoEaW5mbxgOIAEoCzIWLnB1bHVtaXJwYy5Qcm9ncmFtSW5mb0IJ4j8GE + gRpbmZvUgRpbmZvGk8KC0NvbmZpZ0VudHJ5EhoKA2tleRgBIAEoCUII4j8FEgNrZXlSA2tleRIgCgV2YWx1ZRgCIAEoCUIK4j8HE + gV2YWx1ZVIFdmFsdWU6AjgBIk4KC1J1blJlc3BvbnNlEiAKBWVycm9yGAEgASgJQgriPwcSBWVycm9yUgVlcnJvchIdCgRiYWlsG + AIgASgIQgniPwYSBGJhaWxSBGJhaWwitQEKGkluc3RhbGxEZXBlbmRlbmNpZXNSZXF1ZXN0Ei4KCWRpcmVjdG9yeRgBIAEoCUIQG + AHiPwsSCWRpcmVjdG9yeVIJZGlyZWN0b3J5EjAKC2lzX3Rlcm1pbmFsGAIgASgIQg/iPwwSCmlzVGVybWluYWxSCmlzVGVybWluY + WwSNQoEaW5mbxgDIAEoCzIWLnB1bHVtaXJwYy5Qcm9ncmFtSW5mb0IJ4j8GEgRpbmZvUgRpbmZvImcKG0luc3RhbGxEZXBlbmRlb + mNpZXNSZXNwb25zZRIjCgZzdGRvdXQYASABKAxCC+I/CBIGc3Rkb3V0UgZzdGRvdXQSIwoGc3RkZXJyGAIgASgMQgviPwgSBnN0Z + GVyclIGc3RkZXJyIsoBChBSdW5QbHVnaW5SZXF1ZXN0EhoKA3B3ZBgBIAEoCUII4j8FEgNwd2RSA3B3ZBIoCgdwcm9ncmFtGAIgA + SgJQg4YAeI/CRIHcHJvZ3JhbVIHcHJvZ3JhbRIdCgRhcmdzGAMgAygJQgniPwYSBGFyZ3NSBGFyZ3MSGgoDZW52GAQgAygJQgjiP + wUSA2VudlIDZW52EjUKBGluZm8YBSABKAsyFi5wdWx1bWlycGMuUHJvZ3JhbUluZm9CCeI/BhIEaW5mb1IEaW5mbyKYAQoRUnVuU + Gx1Z2luUmVzcG9uc2USJQoGc3Rkb3V0GAEgASgMQgviPwgSBnN0ZG91dEgAUgZzdGRvdXQSJQoGc3RkZXJyGAIgASgMQgviPwgSB + nN0ZGVyckgAUgZzdGRlcnISKwoIZXhpdGNvZGUYAyABKAVCDeI/ChIIZXhpdGNvZGVIAFIIZXhpdGNvZGVCCAoGb3V0cHV0IvUBC + hZHZW5lcmF0ZVByb2dyYW1SZXF1ZXN0ElIKBnNvdXJjZRgBIAMoCzItLnB1bHVtaXJwYy5HZW5lcmF0ZVByb2dyYW1SZXF1ZXN0L + lNvdXJjZUVudHJ5QgviPwgSBnNvdXJjZVIGc291cmNlEjYKDWxvYWRlcl90YXJnZXQYAiABKAlCEeI/DhIMbG9hZGVyVGFyZ2V0U + gxsb2FkZXJUYXJnZXQaTwoLU291cmNlRW50cnkSGgoDa2V5GAEgASgJQgjiPwUSA2tleVIDa2V5EiAKBXZhbHVlGAIgASgJQgriP + wcSBXZhbHVlUgV2YWx1ZToCOAEikgIKF0dlbmVyYXRlUHJvZ3JhbVJlc3BvbnNlElEKC2RpYWdub3N0aWNzGAEgAygLMh0ucHVsd + W1pcnBjLmNvZGVnZW4uRGlhZ25vc3RpY0IQ4j8NEgtkaWFnbm9zdGljc1ILZGlhZ25vc3RpY3MSUwoGc291cmNlGAIgAygLMi4uc + HVsdW1pcnBjLkdlbmVyYXRlUHJvZ3JhbVJlc3BvbnNlLlNvdXJjZUVudHJ5QgviPwgSBnNvdXJjZVIGc291cmNlGk8KC1NvdXJjZ + UVudHJ5EhoKA2tleRgBIAEoCUII4j8FEgNrZXlSA2tleRIgCgV2YWx1ZRgCIAEoDEIK4j8HEgV2YWx1ZVIFdmFsdWU6AjgBIvwDC + hZHZW5lcmF0ZVByb2plY3RSZXF1ZXN0Ej8KEHNvdXJjZV9kaXJlY3RvcnkYASABKAlCFOI/ERIPc291cmNlRGlyZWN0b3J5Ug9zb + 3VyY2VEaXJlY3RvcnkSPwoQdGFyZ2V0X2RpcmVjdG9yeRgCIAEoCUIU4j8REg90YXJnZXREaXJlY3RvcnlSD3RhcmdldERpcmVjd + G9yeRImCgdwcm9qZWN0GAMgASgJQgziPwkSB3Byb2plY3RSB3Byb2plY3QSIwoGc3RyaWN0GAQgASgIQgviPwgSBnN0cmljdFIGc + 3RyaWN0EjYKDWxvYWRlcl90YXJnZXQYBSABKAlCEeI/DhIMbG9hZGVyVGFyZ2V0Ugxsb2FkZXJUYXJnZXQSfwoSbG9jYWxfZGVwZ + W5kZW5jaWVzGAYgAygLMjgucHVsdW1pcnBjLkdlbmVyYXRlUHJvamVjdFJlcXVlc3QuTG9jYWxEZXBlbmRlbmNpZXNFbnRyeUIW4 + j8TEhFsb2NhbERlcGVuZGVuY2llc1IRbG9jYWxEZXBlbmRlbmNpZXMaWgoWTG9jYWxEZXBlbmRlbmNpZXNFbnRyeRIaCgNrZXkYA + SABKAlCCOI/BRIDa2V5UgNrZXkSIAoFdmFsdWUYAiABKAlCCuI/BxIFdmFsdWVSBXZhbHVlOgI4ASJsChdHZW5lcmF0ZVByb2plY + 3RSZXNwb25zZRJRCgtkaWFnbm9zdGljcxgBIAMoCzIdLnB1bHVtaXJwYy5jb2RlZ2VuLkRpYWdub3N0aWNCEOI/DRILZGlhZ25vc + 3RpY3NSC2RpYWdub3N0aWNzIroEChZHZW5lcmF0ZVBhY2thZ2VSZXF1ZXN0EiwKCWRpcmVjdG9yeRgBIAEoCUIO4j8LEglkaXJlY + 3RvcnlSCWRpcmVjdG9yeRIjCgZzY2hlbWEYAiABKAlCC+I/CBIGc2NoZW1hUgZzY2hlbWESYwoLZXh0cmFfZmlsZXMYAyADKAsyM + S5wdWx1bWlycGMuR2VuZXJhdGVQYWNrYWdlUmVxdWVzdC5FeHRyYUZpbGVzRW50cnlCD+I/DBIKZXh0cmFGaWxlc1IKZXh0cmFGa + WxlcxI2Cg1sb2FkZXJfdGFyZ2V0GAQgASgJQhHiPw4SDGxvYWRlclRhcmdldFIMbG9hZGVyVGFyZ2V0En8KEmxvY2FsX2RlcGVuZ + GVuY2llcxgFIAMoCzI4LnB1bHVtaXJwYy5HZW5lcmF0ZVBhY2thZ2VSZXF1ZXN0LkxvY2FsRGVwZW5kZW5jaWVzRW50cnlCFuI/E + xIRbG9jYWxEZXBlbmRlbmNpZXNSEWxvY2FsRGVwZW5kZW5jaWVzGlMKD0V4dHJhRmlsZXNFbnRyeRIaCgNrZXkYASABKAlCCOI/B + RIDa2V5UgNrZXkSIAoFdmFsdWUYAiABKAxCCuI/BxIFdmFsdWVSBXZhbHVlOgI4ARpaChZMb2NhbERlcGVuZGVuY2llc0VudHJ5E + hoKA2tleRgBIAEoCUII4j8FEgNrZXlSA2tleRIgCgV2YWx1ZRgCIAEoCUIK4j8HEgV2YWx1ZVIFdmFsdWU6AjgBImwKF0dlbmVyY + XRlUGFja2FnZVJlc3BvbnNlElEKC2RpYWdub3N0aWNzGAEgAygLMh0ucHVsdW1pcnBjLmNvZGVnZW4uRGlhZ25vc3RpY0IQ4j8NE + gtkaWFnbm9zdGljc1ILZGlhZ25vc3RpY3MioQEKC1BhY2tSZXF1ZXN0EkIKEXBhY2thZ2VfZGlyZWN0b3J5GAEgASgJQhXiPxISE + HBhY2thZ2VEaXJlY3RvcnlSEHBhY2thZ2VEaXJlY3RvcnkSTgoVZGVzdGluYXRpb25fZGlyZWN0b3J5GAIgASgJQhniPxYSFGRlc + 3RpbmF0aW9uRGlyZWN0b3J5UhRkZXN0aW5hdGlvbkRpcmVjdG9yeSJGCgxQYWNrUmVzcG9uc2USNgoNYXJ0aWZhY3RfcGF0aBgBI + AEoCUIR4j8OEgxhcnRpZmFjdFBhdGhSDGFydGlmYWN0UGF0aDKjBwoPTGFuZ3VhZ2VSdW50aW1lEmMKEkdldFJlcXVpcmVkUGx1Z + 2lucxIkLnB1bHVtaXJwYy5HZXRSZXF1aXJlZFBsdWdpbnNSZXF1ZXN0GiUucHVsdW1pcnBjLkdldFJlcXVpcmVkUGx1Z2luc1Jlc + 3BvbnNlIgASNgoDUnVuEhUucHVsdW1pcnBjLlJ1blJlcXVlc3QaFi5wdWx1bWlycGMuUnVuUmVzcG9uc2UiABJACg1HZXRQbHVna + W5JbmZvEhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5GhUucHVsdW1pcnBjLlBsdWdpbkluZm8iABJoChNJbnN0YWxsRGVwZW5kZW5ja + WVzEiUucHVsdW1pcnBjLkluc3RhbGxEZXBlbmRlbmNpZXNSZXF1ZXN0GiYucHVsdW1pcnBjLkluc3RhbGxEZXBlbmRlbmNpZXNSZ + XNwb25zZSIAMAESOwoFQWJvdXQSFi5nb29nbGUucHJvdG9idWYuRW1wdHkaGC5wdWx1bWlycGMuQWJvdXRSZXNwb25zZSIAEm8KF + kdldFByb2dyYW1EZXBlbmRlbmNpZXMSKC5wdWx1bWlycGMuR2V0UHJvZ3JhbURlcGVuZGVuY2llc1JlcXVlc3QaKS5wdWx1bWlyc + GMuR2V0UHJvZ3JhbURlcGVuZGVuY2llc1Jlc3BvbnNlIgASSgoJUnVuUGx1Z2luEhsucHVsdW1pcnBjLlJ1blBsdWdpblJlcXVlc + 3QaHC5wdWx1bWlycGMuUnVuUGx1Z2luUmVzcG9uc2UiADABEloKD0dlbmVyYXRlUHJvZ3JhbRIhLnB1bHVtaXJwYy5HZW5lcmF0Z + VByb2dyYW1SZXF1ZXN0GiIucHVsdW1pcnBjLkdlbmVyYXRlUHJvZ3JhbVJlc3BvbnNlIgASWgoPR2VuZXJhdGVQcm9qZWN0EiEuc + HVsdW1pcnBjLkdlbmVyYXRlUHJvamVjdFJlcXVlc3QaIi5wdWx1bWlycGMuR2VuZXJhdGVQcm9qZWN0UmVzcG9uc2UiABJaCg9HZ + W5lcmF0ZVBhY2thZ2USIS5wdWx1bWlycGMuR2VuZXJhdGVQYWNrYWdlUmVxdWVzdBoiLnB1bHVtaXJwYy5HZW5lcmF0ZVBhY2thZ + 2VSZXNwb25zZSIAEjkKBFBhY2sSFi5wdWx1bWlycGMuUGFja1JlcXVlc3QaFy5wdWx1bWlycGMuUGFja1Jlc3BvbnNlIgBCNFoyZ + 2l0aHViLmNvbS9wdWx1bWkvcHVsdW1pL3Nkay92My9wcm90by9nbztwdWx1bWlycGNiBnByb3RvMw==""" + ).mkString) + lazy val scalaDescriptor: _root_.scalapb.descriptors.FileDescriptor = { + val scalaProto = com.google.protobuf.descriptor.FileDescriptorProto.parseFrom(ProtoBytes) + _root_.scalapb.descriptors.FileDescriptor.buildFrom(scalaProto, dependencies.map(_.scalaDescriptor)) + } + lazy val javaDescriptor: com.google.protobuf.Descriptors.FileDescriptor = { + val javaProto = com.google.protobuf.DescriptorProtos.FileDescriptorProto.parseFrom(ProtoBytes) + com.google.protobuf.Descriptors.FileDescriptor.buildFrom(javaProto, _root_.scala.Array( + pulumirpc.codegen.hcl.HclProto.javaDescriptor, + pulumirpc.plugin.PluginProto.javaDescriptor, + com.google.protobuf.empty.EmptyProto.javaDescriptor, + com.google.protobuf.struct.StructProto.javaDescriptor + )) + } + @deprecated("Use javaDescriptor instead. In a future version this will refer to scalaDescriptor.", "ScalaPB 0.5.47") + def descriptor: com.google.protobuf.Descriptors.FileDescriptor = javaDescriptor +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/language/LanguageRuntimeGrpc.scala b/besom-rpc/src/main/scala/pulumirpc/language/LanguageRuntimeGrpc.scala new file mode 100644 index 00000000..680a14a0 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/LanguageRuntimeGrpc.scala @@ -0,0 +1,443 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + + +object LanguageRuntimeGrpc { + val METHOD_GET_REQUIRED_PLUGINS: _root_.io.grpc.MethodDescriptor[pulumirpc.language.GetRequiredPluginsRequest, pulumirpc.language.GetRequiredPluginsResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.LanguageRuntime", "GetRequiredPlugins")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.GetRequiredPluginsRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.GetRequiredPluginsResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0).getMethods().get(0))) + .build() + + val METHOD_RUN: _root_.io.grpc.MethodDescriptor[pulumirpc.language.RunRequest, pulumirpc.language.RunResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.LanguageRuntime", "Run")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.RunRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.RunResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0).getMethods().get(1))) + .build() + + val METHOD_GET_PLUGIN_INFO: _root_.io.grpc.MethodDescriptor[com.google.protobuf.empty.Empty, pulumirpc.plugin.PluginInfo] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.LanguageRuntime", "GetPluginInfo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[com.google.protobuf.empty.Empty]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.plugin.PluginInfo]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0).getMethods().get(2))) + .build() + + val METHOD_INSTALL_DEPENDENCIES: _root_.io.grpc.MethodDescriptor[pulumirpc.language.InstallDependenciesRequest, pulumirpc.language.InstallDependenciesResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.LanguageRuntime", "InstallDependencies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.InstallDependenciesRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.InstallDependenciesResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0).getMethods().get(3))) + .build() + + val METHOD_ABOUT: _root_.io.grpc.MethodDescriptor[com.google.protobuf.empty.Empty, pulumirpc.language.AboutResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.LanguageRuntime", "About")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[com.google.protobuf.empty.Empty]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.AboutResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0).getMethods().get(4))) + .build() + + val METHOD_GET_PROGRAM_DEPENDENCIES: _root_.io.grpc.MethodDescriptor[pulumirpc.language.GetProgramDependenciesRequest, pulumirpc.language.GetProgramDependenciesResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.LanguageRuntime", "GetProgramDependencies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.GetProgramDependenciesRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.GetProgramDependenciesResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0).getMethods().get(5))) + .build() + + val METHOD_RUN_PLUGIN: _root_.io.grpc.MethodDescriptor[pulumirpc.language.RunPluginRequest, pulumirpc.language.RunPluginResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.LanguageRuntime", "RunPlugin")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.RunPluginRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.RunPluginResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0).getMethods().get(6))) + .build() + + val METHOD_GENERATE_PROGRAM: _root_.io.grpc.MethodDescriptor[pulumirpc.language.GenerateProgramRequest, pulumirpc.language.GenerateProgramResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.LanguageRuntime", "GenerateProgram")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.GenerateProgramRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.GenerateProgramResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0).getMethods().get(7))) + .build() + + val METHOD_GENERATE_PROJECT: _root_.io.grpc.MethodDescriptor[pulumirpc.language.GenerateProjectRequest, pulumirpc.language.GenerateProjectResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.LanguageRuntime", "GenerateProject")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.GenerateProjectRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.GenerateProjectResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0).getMethods().get(8))) + .build() + + val METHOD_GENERATE_PACKAGE: _root_.io.grpc.MethodDescriptor[pulumirpc.language.GeneratePackageRequest, pulumirpc.language.GeneratePackageResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.LanguageRuntime", "GeneratePackage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.GeneratePackageRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.GeneratePackageResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0).getMethods().get(9))) + .build() + + val METHOD_PACK: _root_.io.grpc.MethodDescriptor[pulumirpc.language.PackRequest, pulumirpc.language.PackResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.LanguageRuntime", "Pack")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.PackRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.language.PackResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0).getMethods().get(10))) + .build() + + val SERVICE: _root_.io.grpc.ServiceDescriptor = + _root_.io.grpc.ServiceDescriptor.newBuilder("pulumirpc.LanguageRuntime") + .setSchemaDescriptor(new _root_.scalapb.grpc.ConcreteProtoFileDescriptorSupplier(pulumirpc.language.LanguageProto.javaDescriptor)) + .addMethod(METHOD_GET_REQUIRED_PLUGINS) + .addMethod(METHOD_RUN) + .addMethod(METHOD_GET_PLUGIN_INFO) + .addMethod(METHOD_INSTALL_DEPENDENCIES) + .addMethod(METHOD_ABOUT) + .addMethod(METHOD_GET_PROGRAM_DEPENDENCIES) + .addMethod(METHOD_RUN_PLUGIN) + .addMethod(METHOD_GENERATE_PROGRAM) + .addMethod(METHOD_GENERATE_PROJECT) + .addMethod(METHOD_GENERATE_PACKAGE) + .addMethod(METHOD_PACK) + .build() + + /** LanguageRuntime is the interface that the planning monitor uses to drive execution of an interpreter responsible + * for confguring and creating resource objects. + */ + trait LanguageRuntime extends _root_.scalapb.grpc.AbstractService { + override def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[LanguageRuntime] = LanguageRuntime + /** GetRequiredPlugins computes the complete set of anticipated plugins required by a program. + */ + def getRequiredPlugins(request: pulumirpc.language.GetRequiredPluginsRequest): scala.concurrent.Future[pulumirpc.language.GetRequiredPluginsResponse] + /** Run executes a program and returns its result. + */ + def run(request: pulumirpc.language.RunRequest): scala.concurrent.Future[pulumirpc.language.RunResponse] + /** GetPluginInfo returns generic information about this plugin, like its version. + */ + def getPluginInfo(request: com.google.protobuf.empty.Empty): scala.concurrent.Future[pulumirpc.plugin.PluginInfo] + /** InstallDependencies will install dependencies for the project, e.g. by running `npm install` for nodejs projects. + */ + def installDependencies(request: pulumirpc.language.InstallDependenciesRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.InstallDependenciesResponse]): _root_.scala.Unit + /** About returns information about the runtime for this language. + */ + def about(request: com.google.protobuf.empty.Empty): scala.concurrent.Future[pulumirpc.language.AboutResponse] + /** GetProgramDependencies returns the set of dependencies required by the program. + */ + def getProgramDependencies(request: pulumirpc.language.GetProgramDependenciesRequest): scala.concurrent.Future[pulumirpc.language.GetProgramDependenciesResponse] + /** RunPlugin executes a plugin program and returns its result asynchronously. + */ + def runPlugin(request: pulumirpc.language.RunPluginRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.RunPluginResponse]): _root_.scala.Unit + /** GenerateProgram generates a given PCL program into a program for this language. + */ + def generateProgram(request: pulumirpc.language.GenerateProgramRequest): scala.concurrent.Future[pulumirpc.language.GenerateProgramResponse] + /** GenerateProject generates a given PCL program into a project for this language. + */ + def generateProject(request: pulumirpc.language.GenerateProjectRequest): scala.concurrent.Future[pulumirpc.language.GenerateProjectResponse] + /** GeneratePackage generates a given pulumi package into a package for this language. + */ + def generatePackage(request: pulumirpc.language.GeneratePackageRequest): scala.concurrent.Future[pulumirpc.language.GeneratePackageResponse] + /** Pack packs a package into a language specific artifact. + */ + def pack(request: pulumirpc.language.PackRequest): scala.concurrent.Future[pulumirpc.language.PackResponse] + } + + object LanguageRuntime extends _root_.scalapb.grpc.ServiceCompanion[LanguageRuntime] { + implicit def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[LanguageRuntime] = this + def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.ServiceDescriptor = pulumirpc.language.LanguageProto.scalaDescriptor.services(0) + def bindService(serviceImpl: LanguageRuntime, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = + _root_.io.grpc.ServerServiceDefinition.builder(SERVICE) + .addMethod( + METHOD_GET_REQUIRED_PLUGINS, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.language.GetRequiredPluginsRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.GetRequiredPluginsResponse]) => { + serviceImpl.getRequiredPlugins(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_RUN, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.language.RunRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.RunResponse]) => { + serviceImpl.run(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_GET_PLUGIN_INFO, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: com.google.protobuf.empty.Empty, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.plugin.PluginInfo]) => { + serviceImpl.getPluginInfo(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_INSTALL_DEPENDENCIES, + _root_.io.grpc.stub.ServerCalls.asyncServerStreamingCall((request: pulumirpc.language.InstallDependenciesRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.InstallDependenciesResponse]) => { + serviceImpl.installDependencies(request, observer) + })) + .addMethod( + METHOD_ABOUT, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: com.google.protobuf.empty.Empty, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.AboutResponse]) => { + serviceImpl.about(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_GET_PROGRAM_DEPENDENCIES, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.language.GetProgramDependenciesRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.GetProgramDependenciesResponse]) => { + serviceImpl.getProgramDependencies(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_RUN_PLUGIN, + _root_.io.grpc.stub.ServerCalls.asyncServerStreamingCall((request: pulumirpc.language.RunPluginRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.RunPluginResponse]) => { + serviceImpl.runPlugin(request, observer) + })) + .addMethod( + METHOD_GENERATE_PROGRAM, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.language.GenerateProgramRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.GenerateProgramResponse]) => { + serviceImpl.generateProgram(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_GENERATE_PROJECT, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.language.GenerateProjectRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.GenerateProjectResponse]) => { + serviceImpl.generateProject(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_GENERATE_PACKAGE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.language.GeneratePackageRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.GeneratePackageResponse]) => { + serviceImpl.generatePackage(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_PACK, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.language.PackRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.PackResponse]) => { + serviceImpl.pack(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .build() + } + + /** LanguageRuntime is the interface that the planning monitor uses to drive execution of an interpreter responsible + * for confguring and creating resource objects. + */ + trait LanguageRuntimeBlockingClient { + def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[LanguageRuntime] = LanguageRuntime + /** GetRequiredPlugins computes the complete set of anticipated plugins required by a program. + */ + def getRequiredPlugins(request: pulumirpc.language.GetRequiredPluginsRequest): pulumirpc.language.GetRequiredPluginsResponse + /** Run executes a program and returns its result. + */ + def run(request: pulumirpc.language.RunRequest): pulumirpc.language.RunResponse + /** GetPluginInfo returns generic information about this plugin, like its version. + */ + def getPluginInfo(request: com.google.protobuf.empty.Empty): pulumirpc.plugin.PluginInfo + /** InstallDependencies will install dependencies for the project, e.g. by running `npm install` for nodejs projects. + */ + def installDependencies(request: pulumirpc.language.InstallDependenciesRequest): scala.collection.Iterator[pulumirpc.language.InstallDependenciesResponse] + /** About returns information about the runtime for this language. + */ + def about(request: com.google.protobuf.empty.Empty): pulumirpc.language.AboutResponse + /** GetProgramDependencies returns the set of dependencies required by the program. + */ + def getProgramDependencies(request: pulumirpc.language.GetProgramDependenciesRequest): pulumirpc.language.GetProgramDependenciesResponse + /** RunPlugin executes a plugin program and returns its result asynchronously. + */ + def runPlugin(request: pulumirpc.language.RunPluginRequest): scala.collection.Iterator[pulumirpc.language.RunPluginResponse] + /** GenerateProgram generates a given PCL program into a program for this language. + */ + def generateProgram(request: pulumirpc.language.GenerateProgramRequest): pulumirpc.language.GenerateProgramResponse + /** GenerateProject generates a given PCL program into a project for this language. + */ + def generateProject(request: pulumirpc.language.GenerateProjectRequest): pulumirpc.language.GenerateProjectResponse + /** GeneratePackage generates a given pulumi package into a package for this language. + */ + def generatePackage(request: pulumirpc.language.GeneratePackageRequest): pulumirpc.language.GeneratePackageResponse + /** Pack packs a package into a language specific artifact. + */ + def pack(request: pulumirpc.language.PackRequest): pulumirpc.language.PackResponse + } + + class LanguageRuntimeBlockingStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[LanguageRuntimeBlockingStub](channel, options) with LanguageRuntimeBlockingClient { + /** GetRequiredPlugins computes the complete set of anticipated plugins required by a program. + */ + override def getRequiredPlugins(request: pulumirpc.language.GetRequiredPluginsRequest): pulumirpc.language.GetRequiredPluginsResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GET_REQUIRED_PLUGINS, options, request) + } + + /** Run executes a program and returns its result. + */ + override def run(request: pulumirpc.language.RunRequest): pulumirpc.language.RunResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_RUN, options, request) + } + + /** GetPluginInfo returns generic information about this plugin, like its version. + */ + override def getPluginInfo(request: com.google.protobuf.empty.Empty): pulumirpc.plugin.PluginInfo = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GET_PLUGIN_INFO, options, request) + } + + /** InstallDependencies will install dependencies for the project, e.g. by running `npm install` for nodejs projects. + */ + override def installDependencies(request: pulumirpc.language.InstallDependenciesRequest): scala.collection.Iterator[pulumirpc.language.InstallDependenciesResponse] = { + _root_.scalapb.grpc.ClientCalls.blockingServerStreamingCall(channel, METHOD_INSTALL_DEPENDENCIES, options, request) + } + + /** About returns information about the runtime for this language. + */ + override def about(request: com.google.protobuf.empty.Empty): pulumirpc.language.AboutResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_ABOUT, options, request) + } + + /** GetProgramDependencies returns the set of dependencies required by the program. + */ + override def getProgramDependencies(request: pulumirpc.language.GetProgramDependenciesRequest): pulumirpc.language.GetProgramDependenciesResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GET_PROGRAM_DEPENDENCIES, options, request) + } + + /** RunPlugin executes a plugin program and returns its result asynchronously. + */ + override def runPlugin(request: pulumirpc.language.RunPluginRequest): scala.collection.Iterator[pulumirpc.language.RunPluginResponse] = { + _root_.scalapb.grpc.ClientCalls.blockingServerStreamingCall(channel, METHOD_RUN_PLUGIN, options, request) + } + + /** GenerateProgram generates a given PCL program into a program for this language. + */ + override def generateProgram(request: pulumirpc.language.GenerateProgramRequest): pulumirpc.language.GenerateProgramResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GENERATE_PROGRAM, options, request) + } + + /** GenerateProject generates a given PCL program into a project for this language. + */ + override def generateProject(request: pulumirpc.language.GenerateProjectRequest): pulumirpc.language.GenerateProjectResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GENERATE_PROJECT, options, request) + } + + /** GeneratePackage generates a given pulumi package into a package for this language. + */ + override def generatePackage(request: pulumirpc.language.GeneratePackageRequest): pulumirpc.language.GeneratePackageResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GENERATE_PACKAGE, options, request) + } + + /** Pack packs a package into a language specific artifact. + */ + override def pack(request: pulumirpc.language.PackRequest): pulumirpc.language.PackResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_PACK, options, request) + } + + override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): LanguageRuntimeBlockingStub = new LanguageRuntimeBlockingStub(channel, options) + } + + class LanguageRuntimeStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[LanguageRuntimeStub](channel, options) with LanguageRuntime { + /** GetRequiredPlugins computes the complete set of anticipated plugins required by a program. + */ + override def getRequiredPlugins(request: pulumirpc.language.GetRequiredPluginsRequest): scala.concurrent.Future[pulumirpc.language.GetRequiredPluginsResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GET_REQUIRED_PLUGINS, options, request) + } + + /** Run executes a program and returns its result. + */ + override def run(request: pulumirpc.language.RunRequest): scala.concurrent.Future[pulumirpc.language.RunResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_RUN, options, request) + } + + /** GetPluginInfo returns generic information about this plugin, like its version. + */ + override def getPluginInfo(request: com.google.protobuf.empty.Empty): scala.concurrent.Future[pulumirpc.plugin.PluginInfo] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GET_PLUGIN_INFO, options, request) + } + + /** InstallDependencies will install dependencies for the project, e.g. by running `npm install` for nodejs projects. + */ + override def installDependencies(request: pulumirpc.language.InstallDependenciesRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.InstallDependenciesResponse]): _root_.scala.Unit = { + _root_.scalapb.grpc.ClientCalls.asyncServerStreamingCall(channel, METHOD_INSTALL_DEPENDENCIES, options, request, responseObserver) + } + + /** About returns information about the runtime for this language. + */ + override def about(request: com.google.protobuf.empty.Empty): scala.concurrent.Future[pulumirpc.language.AboutResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_ABOUT, options, request) + } + + /** GetProgramDependencies returns the set of dependencies required by the program. + */ + override def getProgramDependencies(request: pulumirpc.language.GetProgramDependenciesRequest): scala.concurrent.Future[pulumirpc.language.GetProgramDependenciesResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GET_PROGRAM_DEPENDENCIES, options, request) + } + + /** RunPlugin executes a plugin program and returns its result asynchronously. + */ + override def runPlugin(request: pulumirpc.language.RunPluginRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[pulumirpc.language.RunPluginResponse]): _root_.scala.Unit = { + _root_.scalapb.grpc.ClientCalls.asyncServerStreamingCall(channel, METHOD_RUN_PLUGIN, options, request, responseObserver) + } + + /** GenerateProgram generates a given PCL program into a program for this language. + */ + override def generateProgram(request: pulumirpc.language.GenerateProgramRequest): scala.concurrent.Future[pulumirpc.language.GenerateProgramResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GENERATE_PROGRAM, options, request) + } + + /** GenerateProject generates a given PCL program into a project for this language. + */ + override def generateProject(request: pulumirpc.language.GenerateProjectRequest): scala.concurrent.Future[pulumirpc.language.GenerateProjectResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GENERATE_PROJECT, options, request) + } + + /** GeneratePackage generates a given pulumi package into a package for this language. + */ + override def generatePackage(request: pulumirpc.language.GeneratePackageRequest): scala.concurrent.Future[pulumirpc.language.GeneratePackageResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GENERATE_PACKAGE, options, request) + } + + /** Pack packs a package into a language specific artifact. + */ + override def pack(request: pulumirpc.language.PackRequest): scala.concurrent.Future[pulumirpc.language.PackResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_PACK, options, request) + } + + override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): LanguageRuntimeStub = new LanguageRuntimeStub(channel, options) + } + + object LanguageRuntimeStub extends _root_.io.grpc.stub.AbstractStub.StubFactory[LanguageRuntimeStub] { + override def newStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): LanguageRuntimeStub = new LanguageRuntimeStub(channel, options) + + implicit val stubFactory: _root_.io.grpc.stub.AbstractStub.StubFactory[LanguageRuntimeStub] = this + } + + def bindService(serviceImpl: LanguageRuntime, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = LanguageRuntime.bindService(serviceImpl, executionContext) + + def blockingStub(channel: _root_.io.grpc.Channel): LanguageRuntimeBlockingStub = new LanguageRuntimeBlockingStub(channel) + + def stub(channel: _root_.io.grpc.Channel): LanguageRuntimeStub = new LanguageRuntimeStub(channel) + + def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = pulumirpc.language.LanguageProto.javaDescriptor.getServices().get(0) + +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/language/PackRequest.scala b/besom-rpc/src/main/scala/pulumirpc/language/PackRequest.scala new file mode 100644 index 00000000..f45622d4 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/PackRequest.scala @@ -0,0 +1,152 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param packageDirectory + * the directory of a package to pack. + * @param destinationDirectory + * the directory to write the packed artifact to. + */ +@SerialVersionUID(0L) +final case class PackRequest( + packageDirectory: _root_.scala.Predef.String = "", + destinationDirectory: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PackRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = packageDirectory + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = destinationDirectory + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = packageDirectory + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = destinationDirectory + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withPackageDirectory(__v: _root_.scala.Predef.String): PackRequest = copy(packageDirectory = __v) + def withDestinationDirectory(__v: _root_.scala.Predef.String): PackRequest = copy(destinationDirectory = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = packageDirectory + if (__t != "") __t else null + } + case 2 => { + val __t = destinationDirectory + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(packageDirectory) + case 2 => _root_.scalapb.descriptors.PString(destinationDirectory) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.PackRequest.type = pulumirpc.language.PackRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.PackRequest]) +} + +object PackRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.language.PackRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.PackRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.PackRequest = { + var __packageDirectory: _root_.scala.Predef.String = "" + var __destinationDirectory: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __packageDirectory = _input__.readStringRequireUtf8() + case 18 => + __destinationDirectory = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.PackRequest( + packageDirectory = __packageDirectory, + destinationDirectory = __destinationDirectory, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.PackRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.PackRequest( + packageDirectory = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + destinationDirectory = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(19) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(19) + 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) + lazy val defaultInstance = pulumirpc.language.PackRequest( + packageDirectory = "", + destinationDirectory = "" + ) + implicit class PackRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.PackRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.PackRequest](_l) { + def packageDirectory: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.packageDirectory)((c_, f_) => c_.copy(packageDirectory = f_)) + def destinationDirectory: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.destinationDirectory)((c_, f_) => c_.copy(destinationDirectory = f_)) + } + final val PACKAGE_DIRECTORY_FIELD_NUMBER = 1 + final val DESTINATION_DIRECTORY_FIELD_NUMBER = 2 + def of( + packageDirectory: _root_.scala.Predef.String, + destinationDirectory: _root_.scala.Predef.String + ): _root_.pulumirpc.language.PackRequest = _root_.pulumirpc.language.PackRequest( + packageDirectory, + destinationDirectory + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.PackRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/PackResponse.scala b/besom-rpc/src/main/scala/pulumirpc/language/PackResponse.scala new file mode 100644 index 00000000..eb3738af --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/PackResponse.scala @@ -0,0 +1,120 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param artifactPath + * the full path of the packed artifact. + */ +@SerialVersionUID(0L) +final case class PackResponse( + artifactPath: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PackResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = artifactPath + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = artifactPath + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withArtifactPath(__v: _root_.scala.Predef.String): PackResponse = copy(artifactPath = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = artifactPath + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(artifactPath) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.PackResponse.type = pulumirpc.language.PackResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.PackResponse]) +} + +object PackResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.language.PackResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.PackResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.PackResponse = { + var __artifactPath: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __artifactPath = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.PackResponse( + artifactPath = __artifactPath, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.PackResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.PackResponse( + artifactPath = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(20) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(20) + 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) + lazy val defaultInstance = pulumirpc.language.PackResponse( + artifactPath = "" + ) + implicit class PackResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.PackResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.PackResponse](_l) { + def artifactPath: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.artifactPath)((c_, f_) => c_.copy(artifactPath = f_)) + } + final val ARTIFACT_PATH_FIELD_NUMBER = 1 + def of( + artifactPath: _root_.scala.Predef.String + ): _root_.pulumirpc.language.PackResponse = _root_.pulumirpc.language.PackResponse( + artifactPath + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.PackResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/ProgramInfo.scala b/besom-rpc/src/main/scala/pulumirpc/language/ProgramInfo.scala new file mode 100644 index 00000000..e9d580a0 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/ProgramInfo.scala @@ -0,0 +1,226 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** ProgramInfo are the common set of options that a language runtime needs to execute or query a program. This + * is filled in by the engine based on where the `Pulumi.yaml` file was, the `runtime.options` property, and + * the `main` property. + * + * @param rootDirectory + * the root of the project, where the `Pulumi.yaml` file is located. + * @param programDirectory + * the absolute path to the directory of the program to execute. Generally, but not required to be, + * underneath the root directory. + * @param entryPoint + * the entry point of the program, normally '.' meaning to just use the program directory, but can also be + * a filename inside the program directory. How that filename is interpreted, if at all, is language + * specific. + * @param options + * JSON style options from the `Pulumi.yaml` runtime options section. + */ +@SerialVersionUID(0L) +final case class ProgramInfo( + rootDirectory: _root_.scala.Predef.String = "", + programDirectory: _root_.scala.Predef.String = "", + entryPoint: _root_.scala.Predef.String = "", + options: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ProgramInfo] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = rootDirectory + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = programDirectory + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = entryPoint + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + if (options.isDefined) { + val __value = options.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = rootDirectory + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = programDirectory + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = entryPoint + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + options.foreach { __v => + val __m = __v + _output__.writeTag(4, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withRootDirectory(__v: _root_.scala.Predef.String): ProgramInfo = copy(rootDirectory = __v) + def withProgramDirectory(__v: _root_.scala.Predef.String): ProgramInfo = copy(programDirectory = __v) + def withEntryPoint(__v: _root_.scala.Predef.String): ProgramInfo = copy(entryPoint = __v) + def getOptions: com.google.protobuf.struct.Struct = options.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearOptions: ProgramInfo = copy(options = _root_.scala.None) + def withOptions(__v: com.google.protobuf.struct.Struct): ProgramInfo = copy(options = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = rootDirectory + if (__t != "") __t else null + } + case 2 => { + val __t = programDirectory + if (__t != "") __t else null + } + case 3 => { + val __t = entryPoint + if (__t != "") __t else null + } + case 4 => options.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(rootDirectory) + case 2 => _root_.scalapb.descriptors.PString(programDirectory) + case 3 => _root_.scalapb.descriptors.PString(entryPoint) + case 4 => options.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.ProgramInfo.type = pulumirpc.language.ProgramInfo + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ProgramInfo]) +} + +object ProgramInfo extends scalapb.GeneratedMessageCompanion[pulumirpc.language.ProgramInfo] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.ProgramInfo] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.ProgramInfo = { + var __rootDirectory: _root_.scala.Predef.String = "" + var __programDirectory: _root_.scala.Predef.String = "" + var __entryPoint: _root_.scala.Predef.String = "" + var __options: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __rootDirectory = _input__.readStringRequireUtf8() + case 18 => + __programDirectory = _input__.readStringRequireUtf8() + case 26 => + __entryPoint = _input__.readStringRequireUtf8() + case 34 => + __options = _root_.scala.Option(__options.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.ProgramInfo( + rootDirectory = __rootDirectory, + programDirectory = __programDirectory, + entryPoint = __entryPoint, + options = __options, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.ProgramInfo] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.ProgramInfo( + rootDirectory = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + programDirectory = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + entryPoint = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + options = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(0) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 4 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.language.ProgramInfo( + rootDirectory = "", + programDirectory = "", + entryPoint = "", + options = _root_.scala.None + ) + implicit class ProgramInfoLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.ProgramInfo]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.ProgramInfo](_l) { + def rootDirectory: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.rootDirectory)((c_, f_) => c_.copy(rootDirectory = f_)) + def programDirectory: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.programDirectory)((c_, f_) => c_.copy(programDirectory = f_)) + def entryPoint: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.entryPoint)((c_, f_) => c_.copy(entryPoint = f_)) + def options: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getOptions)((c_, f_) => c_.copy(options = _root_.scala.Option(f_))) + def optionalOptions: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.options)((c_, f_) => c_.copy(options = f_)) + } + final val ROOT_DIRECTORY_FIELD_NUMBER = 1 + final val PROGRAM_DIRECTORY_FIELD_NUMBER = 2 + final val ENTRY_POINT_FIELD_NUMBER = 3 + final val OPTIONS_FIELD_NUMBER = 4 + def of( + rootDirectory: _root_.scala.Predef.String, + programDirectory: _root_.scala.Predef.String, + entryPoint: _root_.scala.Predef.String, + options: _root_.scala.Option[com.google.protobuf.struct.Struct] + ): _root_.pulumirpc.language.ProgramInfo = _root_.pulumirpc.language.ProgramInfo( + rootDirectory, + programDirectory, + entryPoint, + options + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ProgramInfo]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/RunPluginRequest.scala b/besom-rpc/src/main/scala/pulumirpc/language/RunPluginRequest.scala new file mode 100644 index 00000000..666187cb --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/RunPluginRequest.scala @@ -0,0 +1,241 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** @param pwd + * the program's working directory. + * @param program + * the path to the program to execute. + * @param args + * any arguments to pass to the program. + * @param env + * any environment variables to set as part of the program. + * @param info + * the program info to use to execute the plugin. + */ +@SerialVersionUID(0L) +final case class RunPluginRequest( + pwd: _root_.scala.Predef.String = "", + @scala.deprecated(message="Marked as deprecated in proto file", "") program: _root_.scala.Predef.String = "", + args: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + env: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + info: _root_.scala.Option[pulumirpc.language.ProgramInfo] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RunPluginRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = pwd + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = program + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + args.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + env.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value) + } + if (info.isDefined) { + val __value = info.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = pwd + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = program + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + args.foreach { __v => + val __m = __v + _output__.writeString(3, __m) + }; + env.foreach { __v => + val __m = __v + _output__.writeString(4, __m) + }; + info.foreach { __v => + val __m = __v + _output__.writeTag(5, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withPwd(__v: _root_.scala.Predef.String): RunPluginRequest = copy(pwd = __v) + def withProgram(__v: _root_.scala.Predef.String): RunPluginRequest = copy(program = __v) + def clearArgs = copy(args = _root_.scala.Seq.empty) + def addArgs(__vs: _root_.scala.Predef.String *): RunPluginRequest = addAllArgs(__vs) + def addAllArgs(__vs: Iterable[_root_.scala.Predef.String]): RunPluginRequest = copy(args = args ++ __vs) + def withArgs(__v: _root_.scala.Seq[_root_.scala.Predef.String]): RunPluginRequest = copy(args = __v) + def clearEnv = copy(env = _root_.scala.Seq.empty) + def addEnv(__vs: _root_.scala.Predef.String *): RunPluginRequest = addAllEnv(__vs) + def addAllEnv(__vs: Iterable[_root_.scala.Predef.String]): RunPluginRequest = copy(env = env ++ __vs) + def withEnv(__v: _root_.scala.Seq[_root_.scala.Predef.String]): RunPluginRequest = copy(env = __v) + def getInfo: pulumirpc.language.ProgramInfo = info.getOrElse(pulumirpc.language.ProgramInfo.defaultInstance) + def clearInfo: RunPluginRequest = copy(info = _root_.scala.None) + def withInfo(__v: pulumirpc.language.ProgramInfo): RunPluginRequest = copy(info = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = pwd + if (__t != "") __t else null + } + case 2 => { + val __t = program + if (__t != "") __t else null + } + case 3 => args + case 4 => env + case 5 => info.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(pwd) + case 2 => _root_.scalapb.descriptors.PString(program) + case 3 => _root_.scalapb.descriptors.PRepeated(args.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 4 => _root_.scalapb.descriptors.PRepeated(env.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 5 => info.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.RunPluginRequest.type = pulumirpc.language.RunPluginRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RunPluginRequest]) +} + +object RunPluginRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.language.RunPluginRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.RunPluginRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.RunPluginRequest = { + var __pwd: _root_.scala.Predef.String = "" + var __program: _root_.scala.Predef.String = "" + val __args: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + val __env: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __info: _root_.scala.Option[pulumirpc.language.ProgramInfo] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __pwd = _input__.readStringRequireUtf8() + case 18 => + __program = _input__.readStringRequireUtf8() + case 26 => + __args += _input__.readStringRequireUtf8() + case 34 => + __env += _input__.readStringRequireUtf8() + case 42 => + __info = _root_.scala.Option(__info.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.language.ProgramInfo](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.RunPluginRequest( + pwd = __pwd, + program = __program, + args = __args.result(), + env = __env.result(), + info = __info, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.RunPluginRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.RunPluginRequest( + pwd = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + program = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + args = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + env = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + info = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[pulumirpc.language.ProgramInfo]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(11) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(11) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 5 => __out = pulumirpc.language.ProgramInfo + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.language.RunPluginRequest( + pwd = "", + program = "", + args = _root_.scala.Seq.empty, + env = _root_.scala.Seq.empty, + info = _root_.scala.None + ) + implicit class RunPluginRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.RunPluginRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.RunPluginRequest](_l) { + def pwd: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.pwd)((c_, f_) => c_.copy(pwd = f_)) + def program: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.program)((c_, f_) => c_.copy(program = f_)) + def args: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.args)((c_, f_) => c_.copy(args = f_)) + def env: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.env)((c_, f_) => c_.copy(env = f_)) + def info: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.ProgramInfo] = field(_.getInfo)((c_, f_) => c_.copy(info = _root_.scala.Option(f_))) + def optionalInfo: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.language.ProgramInfo]] = field(_.info)((c_, f_) => c_.copy(info = f_)) + } + final val PWD_FIELD_NUMBER = 1 + final val PROGRAM_FIELD_NUMBER = 2 + final val ARGS_FIELD_NUMBER = 3 + final val ENV_FIELD_NUMBER = 4 + final val INFO_FIELD_NUMBER = 5 + def of( + pwd: _root_.scala.Predef.String, + program: _root_.scala.Predef.String, + args: _root_.scala.Seq[_root_.scala.Predef.String], + env: _root_.scala.Seq[_root_.scala.Predef.String], + info: _root_.scala.Option[pulumirpc.language.ProgramInfo] + ): _root_.pulumirpc.language.RunPluginRequest = _root_.pulumirpc.language.RunPluginRequest( + pwd, + program, + args, + env, + info + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RunPluginRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/RunPluginResponse.scala b/besom-rpc/src/main/scala/pulumirpc/language/RunPluginResponse.scala new file mode 100644 index 00000000..0f4abda6 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/RunPluginResponse.scala @@ -0,0 +1,190 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +@SerialVersionUID(0L) +final case class RunPluginResponse( + output: pulumirpc.language.RunPluginResponse.Output = pulumirpc.language.RunPluginResponse.Output.Empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RunPluginResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + if (output.stdout.isDefined) { + val __value = output.stdout.get + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(1, __value) + }; + if (output.stderr.isDefined) { + val __value = output.stderr.get + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value) + }; + if (output.exitcode.isDefined) { + val __value = output.exitcode.get + __size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(3, __value) + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + output.stdout.foreach { __v => + val __m = __v + _output__.writeBytes(1, __m) + }; + output.stderr.foreach { __v => + val __m = __v + _output__.writeBytes(2, __m) + }; + output.exitcode.foreach { __v => + val __m = __v + _output__.writeInt32(3, __m) + }; + unknownFields.writeTo(_output__) + } + def getStdout: _root_.com.google.protobuf.ByteString = output.stdout.getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + def withStdout(__v: _root_.com.google.protobuf.ByteString): RunPluginResponse = copy(output = pulumirpc.language.RunPluginResponse.Output.Stdout(__v)) + def getStderr: _root_.com.google.protobuf.ByteString = output.stderr.getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + def withStderr(__v: _root_.com.google.protobuf.ByteString): RunPluginResponse = copy(output = pulumirpc.language.RunPluginResponse.Output.Stderr(__v)) + def getExitcode: _root_.scala.Int = output.exitcode.getOrElse(0) + def withExitcode(__v: _root_.scala.Int): RunPluginResponse = copy(output = pulumirpc.language.RunPluginResponse.Output.Exitcode(__v)) + def clearOutput: RunPluginResponse = copy(output = pulumirpc.language.RunPluginResponse.Output.Empty) + def withOutput(__v: pulumirpc.language.RunPluginResponse.Output): RunPluginResponse = copy(output = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => output.stdout.orNull + case 2 => output.stderr.orNull + case 3 => output.exitcode.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => output.stdout.map(_root_.scalapb.descriptors.PByteString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 2 => output.stderr.map(_root_.scalapb.descriptors.PByteString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 3 => output.exitcode.map(_root_.scalapb.descriptors.PInt(_)).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.RunPluginResponse.type = pulumirpc.language.RunPluginResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RunPluginResponse]) +} + +object RunPluginResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.language.RunPluginResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.RunPluginResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.RunPluginResponse = { + var __output: pulumirpc.language.RunPluginResponse.Output = pulumirpc.language.RunPluginResponse.Output.Empty + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __output = pulumirpc.language.RunPluginResponse.Output.Stdout(_input__.readBytes()) + case 18 => + __output = pulumirpc.language.RunPluginResponse.Output.Stderr(_input__.readBytes()) + case 24 => + __output = pulumirpc.language.RunPluginResponse.Output.Exitcode(_input__.readInt32()) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.RunPluginResponse( + output = __output, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.RunPluginResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.RunPluginResponse( + output = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[_root_.com.google.protobuf.ByteString]]).map(pulumirpc.language.RunPluginResponse.Output.Stdout(_)) + .orElse[pulumirpc.language.RunPluginResponse.Output](__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[_root_.com.google.protobuf.ByteString]]).map(pulumirpc.language.RunPluginResponse.Output.Stderr(_))) + .orElse[pulumirpc.language.RunPluginResponse.Output](__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Int]]).map(pulumirpc.language.RunPluginResponse.Output.Exitcode(_))) + .getOrElse(pulumirpc.language.RunPluginResponse.Output.Empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(12) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(12) + 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) + lazy val defaultInstance = pulumirpc.language.RunPluginResponse( + output = pulumirpc.language.RunPluginResponse.Output.Empty + ) + sealed trait Output extends _root_.scalapb.GeneratedOneof { + def isEmpty: _root_.scala.Boolean = false + def isDefined: _root_.scala.Boolean = true + def isStdout: _root_.scala.Boolean = false + def isStderr: _root_.scala.Boolean = false + def isExitcode: _root_.scala.Boolean = false + def stdout: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = _root_.scala.None + def stderr: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = _root_.scala.None + def exitcode: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None + } + object Output { + @SerialVersionUID(0L) + case object Empty extends pulumirpc.language.RunPluginResponse.Output { + type ValueType = _root_.scala.Nothing + override def isEmpty: _root_.scala.Boolean = true + override def isDefined: _root_.scala.Boolean = false + override def number: _root_.scala.Int = 0 + override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value") + } + + @SerialVersionUID(0L) + final case class Stdout(value: _root_.com.google.protobuf.ByteString) extends pulumirpc.language.RunPluginResponse.Output { + type ValueType = _root_.com.google.protobuf.ByteString + override def isStdout: _root_.scala.Boolean = true + override def stdout: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = Some(value) + override def number: _root_.scala.Int = 1 + } + @SerialVersionUID(0L) + final case class Stderr(value: _root_.com.google.protobuf.ByteString) extends pulumirpc.language.RunPluginResponse.Output { + type ValueType = _root_.com.google.protobuf.ByteString + override def isStderr: _root_.scala.Boolean = true + override def stderr: _root_.scala.Option[_root_.com.google.protobuf.ByteString] = Some(value) + override def number: _root_.scala.Int = 2 + } + @SerialVersionUID(0L) + final case class Exitcode(value: _root_.scala.Int) extends pulumirpc.language.RunPluginResponse.Output { + type ValueType = _root_.scala.Int + override def isExitcode: _root_.scala.Boolean = true + override def exitcode: _root_.scala.Option[_root_.scala.Int] = Some(value) + override def number: _root_.scala.Int = 3 + } + } + implicit class RunPluginResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.RunPluginResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.RunPluginResponse](_l) { + def stdout: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.getStdout)((c_, f_) => c_.copy(output = pulumirpc.language.RunPluginResponse.Output.Stdout(f_))) + def stderr: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.getStderr)((c_, f_) => c_.copy(output = pulumirpc.language.RunPluginResponse.Output.Stderr(f_))) + def exitcode: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.getExitcode)((c_, f_) => c_.copy(output = pulumirpc.language.RunPluginResponse.Output.Exitcode(f_))) + def output: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.RunPluginResponse.Output] = field(_.output)((c_, f_) => c_.copy(output = f_)) + } + final val STDOUT_FIELD_NUMBER = 1 + final val STDERR_FIELD_NUMBER = 2 + final val EXITCODE_FIELD_NUMBER = 3 + def of( + output: pulumirpc.language.RunPluginResponse.Output + ): _root_.pulumirpc.language.RunPluginResponse = _root_.pulumirpc.language.RunPluginResponse( + output + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RunPluginResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/RunRequest.scala b/besom-rpc/src/main/scala/pulumirpc/language/RunRequest.scala new file mode 100644 index 00000000..e86dad57 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/RunRequest.scala @@ -0,0 +1,676 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** RunRequest asks the interpreter to execute a program. + * + * @param project + * the project name. + * @param stack + * the name of the stack being deployed into. + * @param pwd + * the program's working directory. + * @param program + * the path to the program to execute. + * @param args + * any arguments to pass to the program. + * @param config + * the configuration variables to apply before running. + * @param dryRun + * true if we're only doing a dryrun (preview). + * @param parallel + * the degree of parallelism for resource operations (<=1 for serial). + * @param monitorAddress + * the address for communicating back to the resource monitor. + * @param queryMode + * true if we're only doing a query. + * @param configSecretKeys + * the configuration keys that have secret values. + * @param organization + * the organization of the stack being deployed into. + * @param configPropertyMap + * the configuration variables to apply before running. + * @param info + * the program info to use to execute the program. + */ +@SerialVersionUID(0L) +final case class RunRequest( + project: _root_.scala.Predef.String = "", + stack: _root_.scala.Predef.String = "", + pwd: _root_.scala.Predef.String = "", + @scala.deprecated(message="Marked as deprecated in proto file", "") program: _root_.scala.Predef.String = "", + args: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + config: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty, + dryRun: _root_.scala.Boolean = false, + parallel: _root_.scala.Int = 0, + monitorAddress: _root_.scala.Predef.String = "", + queryMode: _root_.scala.Boolean = false, + configSecretKeys: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + organization: _root_.scala.Predef.String = "", + configPropertyMap: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + info: _root_.scala.Option[pulumirpc.language.ProgramInfo] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RunRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = project + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = stack + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = pwd + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + + { + val __value = program + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value) + } + }; + args.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(5, __value) + } + config.foreach { __item => + val __value = pulumirpc.language.RunRequest._typemapper_config.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = dryRun + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(7, __value) + } + }; + + { + val __value = parallel + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(8, __value) + } + }; + + { + val __value = monitorAddress + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(9, __value) + } + }; + + { + val __value = queryMode + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(10, __value) + } + }; + configSecretKeys.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(11, __value) + } + + { + val __value = organization + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(12, __value) + } + }; + if (configPropertyMap.isDefined) { + val __value = configPropertyMap.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + if (info.isDefined) { + val __value = info.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = project + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = stack + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = pwd + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + { + val __v = program + if (!__v.isEmpty) { + _output__.writeString(4, __v) + } + }; + args.foreach { __v => + val __m = __v + _output__.writeString(5, __m) + }; + config.foreach { __v => + val __m = pulumirpc.language.RunRequest._typemapper_config.toBase(__v) + _output__.writeTag(6, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = dryRun + if (__v != false) { + _output__.writeBool(7, __v) + } + }; + { + val __v = parallel + if (__v != 0) { + _output__.writeInt32(8, __v) + } + }; + { + val __v = monitorAddress + if (!__v.isEmpty) { + _output__.writeString(9, __v) + } + }; + { + val __v = queryMode + if (__v != false) { + _output__.writeBool(10, __v) + } + }; + configSecretKeys.foreach { __v => + val __m = __v + _output__.writeString(11, __m) + }; + { + val __v = organization + if (!__v.isEmpty) { + _output__.writeString(12, __v) + } + }; + configPropertyMap.foreach { __v => + val __m = __v + _output__.writeTag(13, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + info.foreach { __v => + val __m = __v + _output__.writeTag(14, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withProject(__v: _root_.scala.Predef.String): RunRequest = copy(project = __v) + def withStack(__v: _root_.scala.Predef.String): RunRequest = copy(stack = __v) + def withPwd(__v: _root_.scala.Predef.String): RunRequest = copy(pwd = __v) + def withProgram(__v: _root_.scala.Predef.String): RunRequest = copy(program = __v) + def clearArgs = copy(args = _root_.scala.Seq.empty) + def addArgs(__vs: _root_.scala.Predef.String *): RunRequest = addAllArgs(__vs) + def addAllArgs(__vs: Iterable[_root_.scala.Predef.String]): RunRequest = copy(args = args ++ __vs) + def withArgs(__v: _root_.scala.Seq[_root_.scala.Predef.String]): RunRequest = copy(args = __v) + def clearConfig = copy(config = _root_.scala.collection.immutable.Map.empty) + def addConfig(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): RunRequest = addAllConfig(__vs) + def addAllConfig(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): RunRequest = copy(config = config ++ __vs) + def withConfig(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): RunRequest = copy(config = __v) + def withDryRun(__v: _root_.scala.Boolean): RunRequest = copy(dryRun = __v) + def withParallel(__v: _root_.scala.Int): RunRequest = copy(parallel = __v) + def withMonitorAddress(__v: _root_.scala.Predef.String): RunRequest = copy(monitorAddress = __v) + def withQueryMode(__v: _root_.scala.Boolean): RunRequest = copy(queryMode = __v) + def clearConfigSecretKeys = copy(configSecretKeys = _root_.scala.Seq.empty) + def addConfigSecretKeys(__vs: _root_.scala.Predef.String *): RunRequest = addAllConfigSecretKeys(__vs) + def addAllConfigSecretKeys(__vs: Iterable[_root_.scala.Predef.String]): RunRequest = copy(configSecretKeys = configSecretKeys ++ __vs) + def withConfigSecretKeys(__v: _root_.scala.Seq[_root_.scala.Predef.String]): RunRequest = copy(configSecretKeys = __v) + def withOrganization(__v: _root_.scala.Predef.String): RunRequest = copy(organization = __v) + def getConfigPropertyMap: com.google.protobuf.struct.Struct = configPropertyMap.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearConfigPropertyMap: RunRequest = copy(configPropertyMap = _root_.scala.None) + def withConfigPropertyMap(__v: com.google.protobuf.struct.Struct): RunRequest = copy(configPropertyMap = Option(__v)) + def getInfo: pulumirpc.language.ProgramInfo = info.getOrElse(pulumirpc.language.ProgramInfo.defaultInstance) + def clearInfo: RunRequest = copy(info = _root_.scala.None) + def withInfo(__v: pulumirpc.language.ProgramInfo): RunRequest = copy(info = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = project + if (__t != "") __t else null + } + case 2 => { + val __t = stack + if (__t != "") __t else null + } + case 3 => { + val __t = pwd + if (__t != "") __t else null + } + case 4 => { + val __t = program + if (__t != "") __t else null + } + case 5 => args + case 6 => config.iterator.map(pulumirpc.language.RunRequest._typemapper_config.toBase(_)).toSeq + case 7 => { + val __t = dryRun + if (__t != false) __t else null + } + case 8 => { + val __t = parallel + if (__t != 0) __t else null + } + case 9 => { + val __t = monitorAddress + if (__t != "") __t else null + } + case 10 => { + val __t = queryMode + if (__t != false) __t else null + } + case 11 => configSecretKeys + case 12 => { + val __t = organization + if (__t != "") __t else null + } + case 13 => configPropertyMap.orNull + case 14 => info.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(project) + case 2 => _root_.scalapb.descriptors.PString(stack) + case 3 => _root_.scalapb.descriptors.PString(pwd) + case 4 => _root_.scalapb.descriptors.PString(program) + case 5 => _root_.scalapb.descriptors.PRepeated(args.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 6 => _root_.scalapb.descriptors.PRepeated(config.iterator.map(pulumirpc.language.RunRequest._typemapper_config.toBase(_).toPMessage).toVector) + case 7 => _root_.scalapb.descriptors.PBoolean(dryRun) + case 8 => _root_.scalapb.descriptors.PInt(parallel) + case 9 => _root_.scalapb.descriptors.PString(monitorAddress) + case 10 => _root_.scalapb.descriptors.PBoolean(queryMode) + case 11 => _root_.scalapb.descriptors.PRepeated(configSecretKeys.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 12 => _root_.scalapb.descriptors.PString(organization) + case 13 => configPropertyMap.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 14 => info.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.RunRequest.type = pulumirpc.language.RunRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RunRequest]) +} + +object RunRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.language.RunRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.RunRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.RunRequest = { + var __project: _root_.scala.Predef.String = "" + var __stack: _root_.scala.Predef.String = "" + var __pwd: _root_.scala.Predef.String = "" + var __program: _root_.scala.Predef.String = "" + val __args: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + val __config: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.scala.Predef.String), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.scala.Predef.String] + var __dryRun: _root_.scala.Boolean = false + var __parallel: _root_.scala.Int = 0 + var __monitorAddress: _root_.scala.Predef.String = "" + var __queryMode: _root_.scala.Boolean = false + val __configSecretKeys: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __organization: _root_.scala.Predef.String = "" + var __configPropertyMap: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __info: _root_.scala.Option[pulumirpc.language.ProgramInfo] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __project = _input__.readStringRequireUtf8() + case 18 => + __stack = _input__.readStringRequireUtf8() + case 26 => + __pwd = _input__.readStringRequireUtf8() + case 34 => + __program = _input__.readStringRequireUtf8() + case 42 => + __args += _input__.readStringRequireUtf8() + case 50 => + __config += pulumirpc.language.RunRequest._typemapper_config.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.language.RunRequest.ConfigEntry](_input__)) + case 56 => + __dryRun = _input__.readBool() + case 64 => + __parallel = _input__.readInt32() + case 74 => + __monitorAddress = _input__.readStringRequireUtf8() + case 80 => + __queryMode = _input__.readBool() + case 90 => + __configSecretKeys += _input__.readStringRequireUtf8() + case 98 => + __organization = _input__.readStringRequireUtf8() + case 106 => + __configPropertyMap = _root_.scala.Option(__configPropertyMap.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 114 => + __info = _root_.scala.Option(__info.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.language.ProgramInfo](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.RunRequest( + project = __project, + stack = __stack, + pwd = __pwd, + program = __program, + args = __args.result(), + config = __config.result(), + dryRun = __dryRun, + parallel = __parallel, + monitorAddress = __monitorAddress, + queryMode = __queryMode, + configSecretKeys = __configSecretKeys.result(), + organization = __organization, + configPropertyMap = __configPropertyMap, + info = __info, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.RunRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.RunRequest( + project = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + stack = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + pwd = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + program = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + args = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + config = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Seq[pulumirpc.language.RunRequest.ConfigEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.language.RunRequest._typemapper_config.toCustom(_)).toMap, + dryRun = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + parallel = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Int]).getOrElse(0), + monitorAddress = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + queryMode = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + configSecretKeys = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + organization = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + configPropertyMap = __fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + info = __fieldsMap.get(scalaDescriptor.findFieldByNumber(14).get).flatMap(_.as[_root_.scala.Option[pulumirpc.language.ProgramInfo]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(7) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(7) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 6 => __out = pulumirpc.language.RunRequest.ConfigEntry + case 13 => __out = com.google.protobuf.struct.Struct + case 14 => __out = pulumirpc.language.ProgramInfo + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.language.RunRequest.ConfigEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.language.RunRequest( + project = "", + stack = "", + pwd = "", + program = "", + args = _root_.scala.Seq.empty, + config = _root_.scala.collection.immutable.Map.empty, + dryRun = false, + parallel = 0, + monitorAddress = "", + queryMode = false, + configSecretKeys = _root_.scala.Seq.empty, + organization = "", + configPropertyMap = _root_.scala.None, + info = _root_.scala.None + ) + @SerialVersionUID(0L) + final case class ConfigEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ConfigEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): ConfigEntry = copy(key = __v) + def withValue(__v: _root_.scala.Predef.String): ConfigEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.RunRequest.ConfigEntry.type = pulumirpc.language.RunRequest.ConfigEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RunRequest.ConfigEntry]) + } + + object ConfigEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.language.RunRequest.ConfigEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.RunRequest.ConfigEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.RunRequest.ConfigEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.RunRequest.ConfigEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.RunRequest.ConfigEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.RunRequest.ConfigEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.language.RunRequest.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.language.RunRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.language.RunRequest.ConfigEntry( + key = "", + value = "" + ) + implicit class ConfigEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.RunRequest.ConfigEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.RunRequest.ConfigEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.language.RunRequest.ConfigEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = + _root_.scalapb.TypeMapper[pulumirpc.language.RunRequest.ConfigEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => pulumirpc.language.RunRequest.ConfigEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Predef.String + ): _root_.pulumirpc.language.RunRequest.ConfigEntry = _root_.pulumirpc.language.RunRequest.ConfigEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RunRequest.ConfigEntry]) + } + + implicit class RunRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.RunRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.RunRequest](_l) { + def project: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.project)((c_, f_) => c_.copy(project = f_)) + def stack: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.stack)((c_, f_) => c_.copy(stack = f_)) + def pwd: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.pwd)((c_, f_) => c_.copy(pwd = f_)) + def program: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.program)((c_, f_) => c_.copy(program = f_)) + def args: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.args)((c_, f_) => c_.copy(args = f_)) + def config: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.config)((c_, f_) => c_.copy(config = f_)) + def dryRun: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.dryRun)((c_, f_) => c_.copy(dryRun = f_)) + def parallel: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.parallel)((c_, f_) => c_.copy(parallel = f_)) + def monitorAddress: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.monitorAddress)((c_, f_) => c_.copy(monitorAddress = f_)) + def queryMode: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.queryMode)((c_, f_) => c_.copy(queryMode = f_)) + def configSecretKeys: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.configSecretKeys)((c_, f_) => c_.copy(configSecretKeys = f_)) + def organization: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.organization)((c_, f_) => c_.copy(organization = f_)) + def configPropertyMap: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getConfigPropertyMap)((c_, f_) => c_.copy(configPropertyMap = _root_.scala.Option(f_))) + def optionalConfigPropertyMap: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.configPropertyMap)((c_, f_) => c_.copy(configPropertyMap = f_)) + def info: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.ProgramInfo] = field(_.getInfo)((c_, f_) => c_.copy(info = _root_.scala.Option(f_))) + def optionalInfo: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.language.ProgramInfo]] = field(_.info)((c_, f_) => c_.copy(info = f_)) + } + final val PROJECT_FIELD_NUMBER = 1 + final val STACK_FIELD_NUMBER = 2 + final val PWD_FIELD_NUMBER = 3 + final val PROGRAM_FIELD_NUMBER = 4 + final val ARGS_FIELD_NUMBER = 5 + final val CONFIG_FIELD_NUMBER = 6 + final val DRYRUN_FIELD_NUMBER = 7 + final val PARALLEL_FIELD_NUMBER = 8 + final val MONITOR_ADDRESS_FIELD_NUMBER = 9 + final val QUERYMODE_FIELD_NUMBER = 10 + final val CONFIGSECRETKEYS_FIELD_NUMBER = 11 + final val ORGANIZATION_FIELD_NUMBER = 12 + final val CONFIGPROPERTYMAP_FIELD_NUMBER = 13 + final val INFO_FIELD_NUMBER = 14 + @transient + private[language] val _typemapper_config: _root_.scalapb.TypeMapper[pulumirpc.language.RunRequest.ConfigEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.language.RunRequest.ConfigEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]] + def of( + project: _root_.scala.Predef.String, + stack: _root_.scala.Predef.String, + pwd: _root_.scala.Predef.String, + program: _root_.scala.Predef.String, + args: _root_.scala.Seq[_root_.scala.Predef.String], + config: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String], + dryRun: _root_.scala.Boolean, + parallel: _root_.scala.Int, + monitorAddress: _root_.scala.Predef.String, + queryMode: _root_.scala.Boolean, + configSecretKeys: _root_.scala.Seq[_root_.scala.Predef.String], + organization: _root_.scala.Predef.String, + configPropertyMap: _root_.scala.Option[com.google.protobuf.struct.Struct], + info: _root_.scala.Option[pulumirpc.language.ProgramInfo] + ): _root_.pulumirpc.language.RunRequest = _root_.pulumirpc.language.RunRequest( + project, + stack, + pwd, + program, + args, + config, + dryRun, + parallel, + monitorAddress, + queryMode, + configSecretKeys, + organization, + configPropertyMap, + info + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RunRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/language/RunResponse.scala b/besom-rpc/src/main/scala/pulumirpc/language/RunResponse.scala new file mode 100644 index 00000000..76689411 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/language/RunResponse.scala @@ -0,0 +1,156 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.language + +/** RunResponse is the response back from the interpreter/source back to the monitor. + * + * @param error + * An unhandled error if any occurred. + * @param bail + * An error happened. And it was reported to the user. Work should stop immediately + * with nothing further to print to the user. This corresponds to a "result.Bail()" + * value in the 'go' layer. + */ +@SerialVersionUID(0L) +final case class RunResponse( + error: _root_.scala.Predef.String = "", + bail: _root_.scala.Boolean = false, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RunResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = error + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = bail + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = error + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = bail + if (__v != false) { + _output__.writeBool(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withError(__v: _root_.scala.Predef.String): RunResponse = copy(error = __v) + def withBail(__v: _root_.scala.Boolean): RunResponse = copy(bail = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = error + if (__t != "") __t else null + } + case 2 => { + val __t = bail + if (__t != false) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(error) + case 2 => _root_.scalapb.descriptors.PBoolean(bail) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.language.RunResponse.type = pulumirpc.language.RunResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RunResponse]) +} + +object RunResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.language.RunResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.language.RunResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.language.RunResponse = { + var __error: _root_.scala.Predef.String = "" + var __bail: _root_.scala.Boolean = false + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __error = _input__.readStringRequireUtf8() + case 16 => + __bail = _input__.readBool() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.language.RunResponse( + error = __error, + bail = __bail, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.language.RunResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.language.RunResponse( + error = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + bail = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Boolean]).getOrElse(false) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LanguageProto.javaDescriptor.getMessageTypes().get(8) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LanguageProto.scalaDescriptor.messages(8) + 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) + lazy val defaultInstance = pulumirpc.language.RunResponse( + error = "", + bail = false + ) + implicit class RunResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.language.RunResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.language.RunResponse](_l) { + def error: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.error)((c_, f_) => c_.copy(error = f_)) + def bail: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.bail)((c_, f_) => c_.copy(bail = f_)) + } + final val ERROR_FIELD_NUMBER = 1 + final val BAIL_FIELD_NUMBER = 2 + def of( + error: _root_.scala.Predef.String, + bail: _root_.scala.Boolean + ): _root_.pulumirpc.language.RunResponse = _root_.pulumirpc.language.RunResponse( + error, + bail + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RunResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/plugin/PluginAttach.scala b/besom-rpc/src/main/scala/pulumirpc/plugin/PluginAttach.scala new file mode 100644 index 00000000..75d55f84 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/plugin/PluginAttach.scala @@ -0,0 +1,126 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.plugin + +/** PluginAttach is used to attach an already running plugin to the engine. + * + * Normally the engine starts the plugin process itself and passes the engine address as the first argumnent. + * But when debugging it can be useful to have an already running provider that the engine instead attaches + * to, this message is used so the provider can still be passed the engine address to communicate with. + * + * @param address + * the grpc address for the engine + */ +@SerialVersionUID(0L) +final case class PluginAttach( + address: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PluginAttach] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = address + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = address + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withAddress(__v: _root_.scala.Predef.String): PluginAttach = copy(address = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = address + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(address) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.plugin.PluginAttach.type = pulumirpc.plugin.PluginAttach + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.PluginAttach]) +} + +object PluginAttach extends scalapb.GeneratedMessageCompanion[pulumirpc.plugin.PluginAttach] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.plugin.PluginAttach] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.plugin.PluginAttach = { + var __address: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __address = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.plugin.PluginAttach( + address = __address, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.plugin.PluginAttach] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.plugin.PluginAttach( + address = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = PluginProto.javaDescriptor.getMessageTypes().get(2) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = PluginProto.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) + lazy val defaultInstance = pulumirpc.plugin.PluginAttach( + address = "" + ) + implicit class PluginAttachLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.plugin.PluginAttach]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.plugin.PluginAttach](_l) { + def address: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.address)((c_, f_) => c_.copy(address = f_)) + } + final val ADDRESS_FIELD_NUMBER = 1 + def of( + address: _root_.scala.Predef.String + ): _root_.pulumirpc.plugin.PluginAttach = _root_.pulumirpc.plugin.PluginAttach( + address + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.PluginAttach]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/plugin/PluginDependency.scala b/besom-rpc/src/main/scala/pulumirpc/plugin/PluginDependency.scala new file mode 100644 index 00000000..f23b91b9 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/plugin/PluginDependency.scala @@ -0,0 +1,403 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.plugin + +/** PluginDependency is information about a plugin that a program may depend upon. + * + * @param name + * the name of the plugin. + * @param kind + * the kind of plugin (e.g., language, etc). + * @param version + * the semver for this plugin. + * @param server + * the URL of a server that can be used to download this plugin, if needed. + * @param checksums + * a map of the checksums for the plugin, will be empty from old language runtimes. The keys should match + * the os and architecture names used in pulumi releases, e.g. "darwin-amd64", "windows-arm64". + */ +@SerialVersionUID(0L) +final case class PluginDependency( + name: _root_.scala.Predef.String = "", + kind: _root_.scala.Predef.String = "", + version: _root_.scala.Predef.String = "", + server: _root_.scala.Predef.String = "", + checksums: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] = _root_.scala.collection.immutable.Map.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PluginDependency] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = name + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = kind + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = version + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + + { + val __value = server + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value) + } + }; + checksums.foreach { __item => + val __value = pulumirpc.plugin.PluginDependency._typemapper_checksums.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = name + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = kind + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = version + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + { + val __v = server + if (!__v.isEmpty) { + _output__.writeString(4, __v) + } + }; + checksums.foreach { __v => + val __m = pulumirpc.plugin.PluginDependency._typemapper_checksums.toBase(__v) + _output__.writeTag(5, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withName(__v: _root_.scala.Predef.String): PluginDependency = copy(name = __v) + def withKind(__v: _root_.scala.Predef.String): PluginDependency = copy(kind = __v) + def withVersion(__v: _root_.scala.Predef.String): PluginDependency = copy(version = __v) + def withServer(__v: _root_.scala.Predef.String): PluginDependency = copy(server = __v) + def clearChecksums = copy(checksums = _root_.scala.collection.immutable.Map.empty) + def addChecksums(__vs: (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString) *): PluginDependency = addAllChecksums(__vs) + def addAllChecksums(__vs: Iterable[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]): PluginDependency = copy(checksums = checksums ++ __vs) + def withChecksums(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]): PluginDependency = copy(checksums = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = name + if (__t != "") __t else null + } + case 2 => { + val __t = kind + if (__t != "") __t else null + } + case 3 => { + val __t = version + if (__t != "") __t else null + } + case 4 => { + val __t = server + if (__t != "") __t else null + } + case 5 => checksums.iterator.map(pulumirpc.plugin.PluginDependency._typemapper_checksums.toBase(_)).toSeq + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(name) + case 2 => _root_.scalapb.descriptors.PString(kind) + case 3 => _root_.scalapb.descriptors.PString(version) + case 4 => _root_.scalapb.descriptors.PString(server) + case 5 => _root_.scalapb.descriptors.PRepeated(checksums.iterator.map(pulumirpc.plugin.PluginDependency._typemapper_checksums.toBase(_).toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.plugin.PluginDependency.type = pulumirpc.plugin.PluginDependency + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.PluginDependency]) +} + +object PluginDependency extends scalapb.GeneratedMessageCompanion[pulumirpc.plugin.PluginDependency] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.plugin.PluginDependency] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.plugin.PluginDependency = { + var __name: _root_.scala.Predef.String = "" + var __kind: _root_.scala.Predef.String = "" + var __version: _root_.scala.Predef.String = "" + var __server: _root_.scala.Predef.String = "" + val __checksums: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __name = _input__.readStringRequireUtf8() + case 18 => + __kind = _input__.readStringRequireUtf8() + case 26 => + __version = _input__.readStringRequireUtf8() + case 34 => + __server = _input__.readStringRequireUtf8() + case 42 => + __checksums += pulumirpc.plugin.PluginDependency._typemapper_checksums.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.plugin.PluginDependency.ChecksumsEntry](_input__)) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.plugin.PluginDependency( + name = __name, + kind = __kind, + version = __version, + server = __server, + checksums = __checksums.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.plugin.PluginDependency] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.plugin.PluginDependency( + name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + kind = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + version = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + server = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + checksums = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Seq[pulumirpc.plugin.PluginDependency.ChecksumsEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.plugin.PluginDependency._typemapper_checksums.toCustom(_)).toMap + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = PluginProto.javaDescriptor.getMessageTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = PluginProto.scalaDescriptor.messages(1) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 5 => __out = pulumirpc.plugin.PluginDependency.ChecksumsEntry + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.plugin.PluginDependency.ChecksumsEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.plugin.PluginDependency( + name = "", + kind = "", + version = "", + server = "", + checksums = _root_.scala.collection.immutable.Map.empty + ) + @SerialVersionUID(0L) + final case class ChecksumsEntry( + key: _root_.scala.Predef.String = "", + value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ChecksumsEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeBytes(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): ChecksumsEntry = copy(key = __v) + def withValue(__v: _root_.com.google.protobuf.ByteString): ChecksumsEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PByteString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.plugin.PluginDependency.ChecksumsEntry.type = pulumirpc.plugin.PluginDependency.ChecksumsEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.PluginDependency.ChecksumsEntry]) + } + + object ChecksumsEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.plugin.PluginDependency.ChecksumsEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.plugin.PluginDependency.ChecksumsEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.plugin.PluginDependency.ChecksumsEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.plugin.PluginDependency.ChecksumsEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.plugin.PluginDependency.ChecksumsEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.plugin.PluginDependency.ChecksumsEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.plugin.PluginDependency.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.plugin.PluginDependency.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.plugin.PluginDependency.ChecksumsEntry( + key = "", + value = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class ChecksumsEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.plugin.PluginDependency.ChecksumsEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.plugin.PluginDependency.ChecksumsEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.plugin.PluginDependency.ChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = + _root_.scalapb.TypeMapper[pulumirpc.plugin.PluginDependency.ChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)](__m => (__m.key, __m.value))(__p => pulumirpc.plugin.PluginDependency.ChecksumsEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.plugin.PluginDependency.ChecksumsEntry = _root_.pulumirpc.plugin.PluginDependency.ChecksumsEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.PluginDependency.ChecksumsEntry]) + } + + implicit class PluginDependencyLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.plugin.PluginDependency]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.plugin.PluginDependency](_l) { + def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_)) + def kind: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.kind)((c_, f_) => c_.copy(kind = f_)) + def version: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.version)((c_, f_) => c_.copy(version = f_)) + def server: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.server)((c_, f_) => c_.copy(server = f_)) + def checksums: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = field(_.checksums)((c_, f_) => c_.copy(checksums = f_)) + } + final val NAME_FIELD_NUMBER = 1 + final val KIND_FIELD_NUMBER = 2 + final val VERSION_FIELD_NUMBER = 3 + final val SERVER_FIELD_NUMBER = 4 + final val CHECKSUMS_FIELD_NUMBER = 5 + @transient + private[plugin] val _typemapper_checksums: _root_.scalapb.TypeMapper[pulumirpc.plugin.PluginDependency.ChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.plugin.PluginDependency.ChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]] + def of( + name: _root_.scala.Predef.String, + kind: _root_.scala.Predef.String, + version: _root_.scala.Predef.String, + server: _root_.scala.Predef.String, + checksums: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] + ): _root_.pulumirpc.plugin.PluginDependency = _root_.pulumirpc.plugin.PluginDependency( + name, + kind, + version, + server, + checksums + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.PluginDependency]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/plugin/PluginInfo.scala b/besom-rpc/src/main/scala/pulumirpc/plugin/PluginInfo.scala new file mode 100644 index 00000000..23f9e59b --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/plugin/PluginInfo.scala @@ -0,0 +1,122 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.plugin + +/** PluginInfo is meta-information about a plugin that is used by the system. + * + * @param version + * the semver for this plugin. + */ +@SerialVersionUID(0L) +final case class PluginInfo( + version: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PluginInfo] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = version + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = version + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withVersion(__v: _root_.scala.Predef.String): PluginInfo = copy(version = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = version + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(version) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.plugin.PluginInfo.type = pulumirpc.plugin.PluginInfo + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.PluginInfo]) +} + +object PluginInfo extends scalapb.GeneratedMessageCompanion[pulumirpc.plugin.PluginInfo] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.plugin.PluginInfo] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.plugin.PluginInfo = { + var __version: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __version = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.plugin.PluginInfo( + version = __version, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.plugin.PluginInfo] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.plugin.PluginInfo( + version = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = PluginProto.javaDescriptor.getMessageTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = PluginProto.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) + lazy val defaultInstance = pulumirpc.plugin.PluginInfo( + version = "" + ) + implicit class PluginInfoLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.plugin.PluginInfo]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.plugin.PluginInfo](_l) { + def version: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.version)((c_, f_) => c_.copy(version = f_)) + } + final val VERSION_FIELD_NUMBER = 1 + def of( + version: _root_.scala.Predef.String + ): _root_.pulumirpc.plugin.PluginInfo = _root_.pulumirpc.plugin.PluginInfo( + version + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.PluginInfo]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/plugin/PluginProto.scala b/besom-rpc/src/main/scala/pulumirpc/plugin/PluginProto.scala new file mode 100644 index 00000000..cb40512a --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/plugin/PluginProto.scala @@ -0,0 +1,38 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.plugin + +object PluginProto extends _root_.scalapb.GeneratedFileObject { + lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq.empty + lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + pulumirpc.plugin.PluginInfo, + pulumirpc.plugin.PluginDependency, + pulumirpc.plugin.PluginAttach + ) + private lazy val ProtoBytes: _root_.scala.Array[Byte] = + scalapb.Encoding.fromBase64(scala.collection.immutable.Seq( + """ChNwdWx1bWkvcGx1Z2luLnByb3RvEglwdWx1bWlycGMiNAoKUGx1Z2luSW5mbxImCgd2ZXJzaW9uGAEgASgJQgziPwkSB3Zlc + nNpb25SB3ZlcnNpb24iywIKEFBsdWdpbkRlcGVuZGVuY3kSHQoEbmFtZRgBIAEoCUIJ4j8GEgRuYW1lUgRuYW1lEh0KBGtpbmQYA + iABKAlCCeI/BhIEa2luZFIEa2luZBImCgd2ZXJzaW9uGAMgASgJQgziPwkSB3ZlcnNpb25SB3ZlcnNpb24SIwoGc2VydmVyGAQgA + SgJQgviPwgSBnNlcnZlclIGc2VydmVyElgKCWNoZWNrc3VtcxgFIAMoCzIqLnB1bHVtaXJwYy5QbHVnaW5EZXBlbmRlbmN5LkNoZ + WNrc3Vtc0VudHJ5Qg7iPwsSCWNoZWNrc3Vtc1IJY2hlY2tzdW1zGlIKDkNoZWNrc3Vtc0VudHJ5EhoKA2tleRgBIAEoCUII4j8FE + gNrZXlSA2tleRIgCgV2YWx1ZRgCIAEoDEIK4j8HEgV2YWx1ZVIFdmFsdWU6AjgBIjYKDFBsdWdpbkF0dGFjaBImCgdhZGRyZXNzG + AEgASgJQgziPwkSB2FkZHJlc3NSB2FkZHJlc3NCNFoyZ2l0aHViLmNvbS9wdWx1bWkvcHVsdW1pL3Nkay92My9wcm90by9nbztwd + Wx1bWlycGNiBnByb3RvMw==""" + ).mkString) + lazy val scalaDescriptor: _root_.scalapb.descriptors.FileDescriptor = { + val scalaProto = com.google.protobuf.descriptor.FileDescriptorProto.parseFrom(ProtoBytes) + _root_.scalapb.descriptors.FileDescriptor.buildFrom(scalaProto, dependencies.map(_.scalaDescriptor)) + } + lazy val javaDescriptor: com.google.protobuf.Descriptors.FileDescriptor = { + val javaProto = com.google.protobuf.DescriptorProtos.FileDescriptorProto.parseFrom(ProtoBytes) + com.google.protobuf.Descriptors.FileDescriptor.buildFrom(javaProto, _root_.scala.Array( + )) + } + @deprecated("Use javaDescriptor instead. In a future version this will refer to scalaDescriptor.", "ScalaPB 0.5.47") + def descriptor: com.google.protobuf.Descriptors.FileDescriptor = javaDescriptor +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/CallRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/CallRequest.scala new file mode 100644 index 00000000..5686866e --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/CallRequest.scala @@ -0,0 +1,877 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param tok + * the function token to invoke. + * @param args + * the arguments for the function invocation. + * @param argDependencies + * a map from argument keys to the dependencies of the argument. + * @param project + * the project name. + * @param stack + * the name of the stack being deployed into. + * @param config + * the configuration variables to apply before running. + * @param configSecretKeys + * the configuration keys that have secret values. + * @param dryRun + * true if we're only doing a dryrun (preview). + * @param parallel + * the degree of parallelism for resource operations (<=1 for serial). + * @param monitorEndpoint + * the address for communicating back to the resource monitor. + * @param organization + * the organization of the stack being deployed into. + * @param acceptsOutputValues + * the engine can be passed output values back, returnDependencies can be left blank if returning output values. + */ +@SerialVersionUID(0L) +final case class CallRequest( + tok: _root_.scala.Predef.String = "", + args: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + argDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies] = _root_.scala.collection.immutable.Map.empty, + project: _root_.scala.Predef.String = "", + stack: _root_.scala.Predef.String = "", + config: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty, + configSecretKeys: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + dryRun: _root_.scala.Boolean = false, + parallel: _root_.scala.Int = 0, + monitorEndpoint: _root_.scala.Predef.String = "", + organization: _root_.scala.Predef.String = "", + acceptsOutputValues: _root_.scala.Boolean = false, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[CallRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = tok + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (args.isDefined) { + val __value = args.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + argDependencies.foreach { __item => + val __value = pulumirpc.provider.CallRequest._typemapper_argDependencies.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = project + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(6, __value) + } + }; + + { + val __value = stack + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(7, __value) + } + }; + config.foreach { __item => + val __value = pulumirpc.provider.CallRequest._typemapper_config.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + configSecretKeys.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(9, __value) + } + + { + val __value = dryRun + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(10, __value) + } + }; + + { + val __value = parallel + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(11, __value) + } + }; + + { + val __value = monitorEndpoint + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(12, __value) + } + }; + + { + val __value = organization + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(14, __value) + } + }; + + { + val __value = acceptsOutputValues + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(17, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = tok + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + args.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + argDependencies.foreach { __v => + val __m = pulumirpc.provider.CallRequest._typemapper_argDependencies.toBase(__v) + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = project + if (!__v.isEmpty) { + _output__.writeString(6, __v) + } + }; + { + val __v = stack + if (!__v.isEmpty) { + _output__.writeString(7, __v) + } + }; + config.foreach { __v => + val __m = pulumirpc.provider.CallRequest._typemapper_config.toBase(__v) + _output__.writeTag(8, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + configSecretKeys.foreach { __v => + val __m = __v + _output__.writeString(9, __m) + }; + { + val __v = dryRun + if (__v != false) { + _output__.writeBool(10, __v) + } + }; + { + val __v = parallel + if (__v != 0) { + _output__.writeInt32(11, __v) + } + }; + { + val __v = monitorEndpoint + if (!__v.isEmpty) { + _output__.writeString(12, __v) + } + }; + { + val __v = organization + if (!__v.isEmpty) { + _output__.writeString(14, __v) + } + }; + { + val __v = acceptsOutputValues + if (__v != false) { + _output__.writeBool(17, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withTok(__v: _root_.scala.Predef.String): CallRequest = copy(tok = __v) + def getArgs: com.google.protobuf.struct.Struct = args.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearArgs: CallRequest = copy(args = _root_.scala.None) + def withArgs(__v: com.google.protobuf.struct.Struct): CallRequest = copy(args = Option(__v)) + def clearArgDependencies = copy(argDependencies = _root_.scala.collection.immutable.Map.empty) + def addArgDependencies(__vs: (_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies) *): CallRequest = addAllArgDependencies(__vs) + def addAllArgDependencies(__vs: Iterable[(_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies)]): CallRequest = copy(argDependencies = argDependencies ++ __vs) + def withArgDependencies(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies]): CallRequest = copy(argDependencies = __v) + def withProject(__v: _root_.scala.Predef.String): CallRequest = copy(project = __v) + def withStack(__v: _root_.scala.Predef.String): CallRequest = copy(stack = __v) + def clearConfig = copy(config = _root_.scala.collection.immutable.Map.empty) + def addConfig(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): CallRequest = addAllConfig(__vs) + def addAllConfig(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): CallRequest = copy(config = config ++ __vs) + def withConfig(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): CallRequest = copy(config = __v) + def clearConfigSecretKeys = copy(configSecretKeys = _root_.scala.Seq.empty) + def addConfigSecretKeys(__vs: _root_.scala.Predef.String *): CallRequest = addAllConfigSecretKeys(__vs) + def addAllConfigSecretKeys(__vs: Iterable[_root_.scala.Predef.String]): CallRequest = copy(configSecretKeys = configSecretKeys ++ __vs) + def withConfigSecretKeys(__v: _root_.scala.Seq[_root_.scala.Predef.String]): CallRequest = copy(configSecretKeys = __v) + def withDryRun(__v: _root_.scala.Boolean): CallRequest = copy(dryRun = __v) + def withParallel(__v: _root_.scala.Int): CallRequest = copy(parallel = __v) + def withMonitorEndpoint(__v: _root_.scala.Predef.String): CallRequest = copy(monitorEndpoint = __v) + def withOrganization(__v: _root_.scala.Predef.String): CallRequest = copy(organization = __v) + def withAcceptsOutputValues(__v: _root_.scala.Boolean): CallRequest = copy(acceptsOutputValues = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = tok + if (__t != "") __t else null + } + case 2 => args.orNull + case 3 => argDependencies.iterator.map(pulumirpc.provider.CallRequest._typemapper_argDependencies.toBase(_)).toSeq + case 6 => { + val __t = project + if (__t != "") __t else null + } + case 7 => { + val __t = stack + if (__t != "") __t else null + } + case 8 => config.iterator.map(pulumirpc.provider.CallRequest._typemapper_config.toBase(_)).toSeq + case 9 => configSecretKeys + case 10 => { + val __t = dryRun + if (__t != false) __t else null + } + case 11 => { + val __t = parallel + if (__t != 0) __t else null + } + case 12 => { + val __t = monitorEndpoint + if (__t != "") __t else null + } + case 14 => { + val __t = organization + if (__t != "") __t else null + } + case 17 => { + val __t = acceptsOutputValues + if (__t != false) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(tok) + case 2 => args.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 3 => _root_.scalapb.descriptors.PRepeated(argDependencies.iterator.map(pulumirpc.provider.CallRequest._typemapper_argDependencies.toBase(_).toPMessage).toVector) + case 6 => _root_.scalapb.descriptors.PString(project) + case 7 => _root_.scalapb.descriptors.PString(stack) + case 8 => _root_.scalapb.descriptors.PRepeated(config.iterator.map(pulumirpc.provider.CallRequest._typemapper_config.toBase(_).toPMessage).toVector) + case 9 => _root_.scalapb.descriptors.PRepeated(configSecretKeys.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 10 => _root_.scalapb.descriptors.PBoolean(dryRun) + case 11 => _root_.scalapb.descriptors.PInt(parallel) + case 12 => _root_.scalapb.descriptors.PString(monitorEndpoint) + case 14 => _root_.scalapb.descriptors.PString(organization) + case 17 => _root_.scalapb.descriptors.PBoolean(acceptsOutputValues) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.CallRequest.type = pulumirpc.provider.CallRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CallRequest]) +} + +object CallRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.CallRequest = { + var __tok: _root_.scala.Predef.String = "" + var __args: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + val __argDependencies: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies] + var __project: _root_.scala.Predef.String = "" + var __stack: _root_.scala.Predef.String = "" + val __config: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.scala.Predef.String), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.scala.Predef.String] + val __configSecretKeys: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __dryRun: _root_.scala.Boolean = false + var __parallel: _root_.scala.Int = 0 + var __monitorEndpoint: _root_.scala.Predef.String = "" + var __organization: _root_.scala.Predef.String = "" + var __acceptsOutputValues: _root_.scala.Boolean = false + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __tok = _input__.readStringRequireUtf8() + case 18 => + __args = _root_.scala.Option(__args.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 26 => + __argDependencies += pulumirpc.provider.CallRequest._typemapper_argDependencies.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.CallRequest.ArgDependenciesEntry](_input__)) + case 50 => + __project = _input__.readStringRequireUtf8() + case 58 => + __stack = _input__.readStringRequireUtf8() + case 66 => + __config += pulumirpc.provider.CallRequest._typemapper_config.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.CallRequest.ConfigEntry](_input__)) + case 74 => + __configSecretKeys += _input__.readStringRequireUtf8() + case 80 => + __dryRun = _input__.readBool() + case 88 => + __parallel = _input__.readInt32() + case 98 => + __monitorEndpoint = _input__.readStringRequireUtf8() + case 114 => + __organization = _input__.readStringRequireUtf8() + case 136 => + __acceptsOutputValues = _input__.readBool() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.CallRequest( + tok = __tok, + args = __args, + argDependencies = __argDependencies.result(), + project = __project, + stack = __stack, + config = __config.result(), + configSecretKeys = __configSecretKeys.result(), + dryRun = __dryRun, + parallel = __parallel, + monitorEndpoint = __monitorEndpoint, + organization = __organization, + acceptsOutputValues = __acceptsOutputValues, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.CallRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.CallRequest( + tok = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + args = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + argDependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.CallRequest.ArgDependenciesEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.provider.CallRequest._typemapper_argDependencies.toCustom(_)).toMap, + project = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + stack = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + config = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.CallRequest.ConfigEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.provider.CallRequest._typemapper_config.toCustom(_)).toMap, + configSecretKeys = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + dryRun = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + parallel = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Int]).getOrElse(0), + monitorEndpoint = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + organization = __fieldsMap.get(scalaDescriptor.findFieldByNumber(14).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + acceptsOutputValues = __fieldsMap.get(scalaDescriptor.findFieldByNumber(17).get).map(_.as[_root_.scala.Boolean]).getOrElse(false) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(7) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(7) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = com.google.protobuf.struct.Struct + case 3 => __out = pulumirpc.provider.CallRequest.ArgDependenciesEntry + case 8 => __out = pulumirpc.provider.CallRequest.ConfigEntry + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.provider.CallRequest.ArgumentDependencies, + _root_.pulumirpc.provider.CallRequest.ArgDependenciesEntry, + _root_.pulumirpc.provider.CallRequest.ConfigEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.provider.CallRequest( + tok = "", + args = _root_.scala.None, + argDependencies = _root_.scala.collection.immutable.Map.empty, + project = "", + stack = "", + config = _root_.scala.collection.immutable.Map.empty, + configSecretKeys = _root_.scala.Seq.empty, + dryRun = false, + parallel = 0, + monitorEndpoint = "", + organization = "", + acceptsOutputValues = false + ) + /** ArgumentDependencies describes the resources that a particular argument depends on. + * + * @param urns + * A list of URNs this argument depends on. + */ + @SerialVersionUID(0L) + final case class ArgumentDependencies( + urns: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ArgumentDependencies] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + urns.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + urns.foreach { __v => + val __m = __v + _output__.writeString(1, __m) + }; + unknownFields.writeTo(_output__) + } + def clearUrns = copy(urns = _root_.scala.Seq.empty) + def addUrns(__vs: _root_.scala.Predef.String *): ArgumentDependencies = addAllUrns(__vs) + def addAllUrns(__vs: Iterable[_root_.scala.Predef.String]): ArgumentDependencies = copy(urns = urns ++ __vs) + def withUrns(__v: _root_.scala.Seq[_root_.scala.Predef.String]): ArgumentDependencies = copy(urns = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => urns + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(urns.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.CallRequest.ArgumentDependencies.type = pulumirpc.provider.CallRequest.ArgumentDependencies + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CallRequest.ArgumentDependencies]) + } + + object ArgumentDependencies extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallRequest.ArgumentDependencies] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallRequest.ArgumentDependencies] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.CallRequest.ArgumentDependencies = { + val __urns: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urns += _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.CallRequest.ArgumentDependencies( + urns = __urns.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.CallRequest.ArgumentDependencies] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.CallRequest.ArgumentDependencies( + urns = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.CallRequest.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.CallRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.provider.CallRequest.ArgumentDependencies( + urns = _root_.scala.Seq.empty + ) + implicit class ArgumentDependenciesLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CallRequest.ArgumentDependencies]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.CallRequest.ArgumentDependencies](_l) { + def urns: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.urns)((c_, f_) => c_.copy(urns = f_)) + } + final val URNS_FIELD_NUMBER = 1 + def of( + urns: _root_.scala.Seq[_root_.scala.Predef.String] + ): _root_.pulumirpc.provider.CallRequest.ArgumentDependencies = _root_.pulumirpc.provider.CallRequest.ArgumentDependencies( + urns + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CallRequest.ArgumentDependencies]) + } + + @SerialVersionUID(0L) + final case class ArgDependenciesEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Option[pulumirpc.provider.CallRequest.ArgumentDependencies] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ArgDependenciesEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (value.isDefined) { + val __value = value.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + value.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): ArgDependenciesEntry = copy(key = __v) + def getValue: pulumirpc.provider.CallRequest.ArgumentDependencies = value.getOrElse(pulumirpc.provider.CallRequest.ArgumentDependencies.defaultInstance) + def clearValue: ArgDependenciesEntry = copy(value = _root_.scala.None) + def withValue(__v: pulumirpc.provider.CallRequest.ArgumentDependencies): ArgDependenciesEntry = copy(value = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => value.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => value.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.CallRequest.ArgDependenciesEntry.type = pulumirpc.provider.CallRequest.ArgDependenciesEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CallRequest.ArgDependenciesEntry]) + } + + object ArgDependenciesEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallRequest.ArgDependenciesEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallRequest.ArgDependenciesEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.CallRequest.ArgDependenciesEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Option[pulumirpc.provider.CallRequest.ArgumentDependencies] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _root_.scala.Option(__value.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.CallRequest.ArgumentDependencies](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.CallRequest.ArgDependenciesEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.CallRequest.ArgDependenciesEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.CallRequest.ArgDependenciesEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[pulumirpc.provider.CallRequest.ArgumentDependencies]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.CallRequest.javaDescriptor.getNestedTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.CallRequest.scalaDescriptor.nestedMessages(1) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = pulumirpc.provider.CallRequest.ArgumentDependencies + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.CallRequest.ArgDependenciesEntry( + key = "", + value = _root_.scala.None + ) + implicit class ArgDependenciesEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CallRequest.ArgDependenciesEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.CallRequest.ArgDependenciesEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CallRequest.ArgumentDependencies] = field(_.getValue)((c_, f_) => c_.copy(value = _root_.scala.Option(f_))) + def optionalValue: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.provider.CallRequest.ArgumentDependencies]] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.provider.CallRequest.ArgDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies)] = + _root_.scalapb.TypeMapper[pulumirpc.provider.CallRequest.ArgDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies)](__m => (__m.key, __m.getValue))(__p => pulumirpc.provider.CallRequest.ArgDependenciesEntry(__p._1, Some(__p._2))) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Option[pulumirpc.provider.CallRequest.ArgumentDependencies] + ): _root_.pulumirpc.provider.CallRequest.ArgDependenciesEntry = _root_.pulumirpc.provider.CallRequest.ArgDependenciesEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CallRequest.ArgDependenciesEntry]) + } + + @SerialVersionUID(0L) + final case class ConfigEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ConfigEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): ConfigEntry = copy(key = __v) + def withValue(__v: _root_.scala.Predef.String): ConfigEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.CallRequest.ConfigEntry.type = pulumirpc.provider.CallRequest.ConfigEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CallRequest.ConfigEntry]) + } + + object ConfigEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallRequest.ConfigEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallRequest.ConfigEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.CallRequest.ConfigEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.CallRequest.ConfigEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.CallRequest.ConfigEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.CallRequest.ConfigEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.CallRequest.javaDescriptor.getNestedTypes().get(2) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.CallRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.provider.CallRequest.ConfigEntry( + key = "", + value = "" + ) + implicit class ConfigEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CallRequest.ConfigEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.CallRequest.ConfigEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.provider.CallRequest.ConfigEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = + _root_.scalapb.TypeMapper[pulumirpc.provider.CallRequest.ConfigEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => pulumirpc.provider.CallRequest.ConfigEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Predef.String + ): _root_.pulumirpc.provider.CallRequest.ConfigEntry = _root_.pulumirpc.provider.CallRequest.ConfigEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CallRequest.ConfigEntry]) + } + + implicit class CallRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CallRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.CallRequest](_l) { + def tok: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.tok)((c_, f_) => c_.copy(tok = f_)) + def args: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getArgs)((c_, f_) => c_.copy(args = _root_.scala.Option(f_))) + def optionalArgs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.args)((c_, f_) => c_.copy(args = f_)) + def argDependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies]] = field(_.argDependencies)((c_, f_) => c_.copy(argDependencies = f_)) + def project: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.project)((c_, f_) => c_.copy(project = f_)) + def stack: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.stack)((c_, f_) => c_.copy(stack = f_)) + def config: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.config)((c_, f_) => c_.copy(config = f_)) + def configSecretKeys: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.configSecretKeys)((c_, f_) => c_.copy(configSecretKeys = f_)) + def dryRun: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.dryRun)((c_, f_) => c_.copy(dryRun = f_)) + def parallel: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.parallel)((c_, f_) => c_.copy(parallel = f_)) + def monitorEndpoint: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.monitorEndpoint)((c_, f_) => c_.copy(monitorEndpoint = f_)) + def organization: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.organization)((c_, f_) => c_.copy(organization = f_)) + def acceptsOutputValues: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.acceptsOutputValues)((c_, f_) => c_.copy(acceptsOutputValues = f_)) + } + final val TOK_FIELD_NUMBER = 1 + final val ARGS_FIELD_NUMBER = 2 + final val ARGDEPENDENCIES_FIELD_NUMBER = 3 + final val PROJECT_FIELD_NUMBER = 6 + final val STACK_FIELD_NUMBER = 7 + final val CONFIG_FIELD_NUMBER = 8 + final val CONFIGSECRETKEYS_FIELD_NUMBER = 9 + final val DRYRUN_FIELD_NUMBER = 10 + final val PARALLEL_FIELD_NUMBER = 11 + final val MONITORENDPOINT_FIELD_NUMBER = 12 + final val ORGANIZATION_FIELD_NUMBER = 14 + final val ACCEPTS_OUTPUT_VALUES_FIELD_NUMBER = 17 + @transient + private[provider] val _typemapper_argDependencies: _root_.scalapb.TypeMapper[pulumirpc.provider.CallRequest.ArgDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.provider.CallRequest.ArgDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies)]] + @transient + private[provider] val _typemapper_config: _root_.scalapb.TypeMapper[pulumirpc.provider.CallRequest.ConfigEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.provider.CallRequest.ConfigEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]] + def of( + tok: _root_.scala.Predef.String, + args: _root_.scala.Option[com.google.protobuf.struct.Struct], + argDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.CallRequest.ArgumentDependencies], + project: _root_.scala.Predef.String, + stack: _root_.scala.Predef.String, + config: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String], + configSecretKeys: _root_.scala.Seq[_root_.scala.Predef.String], + dryRun: _root_.scala.Boolean, + parallel: _root_.scala.Int, + monitorEndpoint: _root_.scala.Predef.String, + organization: _root_.scala.Predef.String, + acceptsOutputValues: _root_.scala.Boolean + ): _root_.pulumirpc.provider.CallRequest = _root_.pulumirpc.provider.CallRequest( + tok, + args, + argDependencies, + project, + stack, + config, + configSecretKeys, + dryRun, + parallel, + monitorEndpoint, + organization, + acceptsOutputValues + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CallRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/CallResponse.scala b/besom-rpc/src/main/scala/pulumirpc/provider/CallResponse.scala new file mode 100644 index 00000000..0410f6ad --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/CallResponse.scala @@ -0,0 +1,447 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param return + * the returned values, if call was successful. + * @param returnDependencies + * a map from return value keys to the dependencies of the return value. + * @param failures + * the failures if any arguments didn't pass verification. + */ +@SerialVersionUID(0L) +final case class CallResponse( + `return`: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + returnDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies] = _root_.scala.collection.immutable.Map.empty, + failures: _root_.scala.Seq[pulumirpc.provider.CheckFailure] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[CallResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + if (`return`.isDefined) { + val __value = `return`.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + returnDependencies.foreach { __item => + val __value = pulumirpc.provider.CallResponse._typemapper_returnDependencies.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + failures.foreach { __item => + val __value = __item + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + `return`.foreach { __v => + val __m = __v + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + returnDependencies.foreach { __v => + val __m = pulumirpc.provider.CallResponse._typemapper_returnDependencies.toBase(__v) + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + failures.foreach { __v => + val __m = __v + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def getReturn: com.google.protobuf.struct.Struct = `return`.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearReturn: CallResponse = copy(`return` = _root_.scala.None) + def withReturn(__v: com.google.protobuf.struct.Struct): CallResponse = copy(`return` = Option(__v)) + def clearReturnDependencies = copy(returnDependencies = _root_.scala.collection.immutable.Map.empty) + def addReturnDependencies(__vs: (_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies) *): CallResponse = addAllReturnDependencies(__vs) + def addAllReturnDependencies(__vs: Iterable[(_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies)]): CallResponse = copy(returnDependencies = returnDependencies ++ __vs) + def withReturnDependencies(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies]): CallResponse = copy(returnDependencies = __v) + def clearFailures = copy(failures = _root_.scala.Seq.empty) + def addFailures(__vs: pulumirpc.provider.CheckFailure *): CallResponse = addAllFailures(__vs) + def addAllFailures(__vs: Iterable[pulumirpc.provider.CheckFailure]): CallResponse = copy(failures = failures ++ __vs) + def withFailures(__v: _root_.scala.Seq[pulumirpc.provider.CheckFailure]): CallResponse = copy(failures = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => `return`.orNull + case 2 => returnDependencies.iterator.map(pulumirpc.provider.CallResponse._typemapper_returnDependencies.toBase(_)).toSeq + case 3 => failures + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => `return`.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 2 => _root_.scalapb.descriptors.PRepeated(returnDependencies.iterator.map(pulumirpc.provider.CallResponse._typemapper_returnDependencies.toBase(_).toPMessage).toVector) + case 3 => _root_.scalapb.descriptors.PRepeated(failures.iterator.map(_.toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.CallResponse.type = pulumirpc.provider.CallResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CallResponse]) +} + +object CallResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.CallResponse = { + var __return: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + val __returnDependencies: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies] + val __failures: _root_.scala.collection.immutable.VectorBuilder[pulumirpc.provider.CheckFailure] = new _root_.scala.collection.immutable.VectorBuilder[pulumirpc.provider.CheckFailure] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __return = _root_.scala.Option(__return.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 18 => + __returnDependencies += pulumirpc.provider.CallResponse._typemapper_returnDependencies.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.CallResponse.ReturnDependenciesEntry](_input__)) + case 26 => + __failures += _root_.scalapb.LiteParser.readMessage[pulumirpc.provider.CheckFailure](_input__) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.CallResponse( + `return` = __return, + returnDependencies = __returnDependencies.result(), + failures = __failures.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.CallResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.CallResponse( + `return` = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + returnDependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.CallResponse.ReturnDependenciesEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.provider.CallResponse._typemapper_returnDependencies.toCustom(_)).toMap, + failures = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.CheckFailure]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(8) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(8) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = com.google.protobuf.struct.Struct + case 2 => __out = pulumirpc.provider.CallResponse.ReturnDependenciesEntry + case 3 => __out = pulumirpc.provider.CheckFailure + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.provider.CallResponse.ReturnDependencies, + _root_.pulumirpc.provider.CallResponse.ReturnDependenciesEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.provider.CallResponse( + `return` = _root_.scala.None, + returnDependencies = _root_.scala.collection.immutable.Map.empty, + failures = _root_.scala.Seq.empty + ) + /** ReturnDependencies describes the resources that a particular return value depends on. + * + * @param urns + * A list of URNs this return value depends on. + */ + @SerialVersionUID(0L) + final case class ReturnDependencies( + urns: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ReturnDependencies] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + urns.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + urns.foreach { __v => + val __m = __v + _output__.writeString(1, __m) + }; + unknownFields.writeTo(_output__) + } + def clearUrns = copy(urns = _root_.scala.Seq.empty) + def addUrns(__vs: _root_.scala.Predef.String *): ReturnDependencies = addAllUrns(__vs) + def addAllUrns(__vs: Iterable[_root_.scala.Predef.String]): ReturnDependencies = copy(urns = urns ++ __vs) + def withUrns(__v: _root_.scala.Seq[_root_.scala.Predef.String]): ReturnDependencies = copy(urns = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => urns + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(urns.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.CallResponse.ReturnDependencies.type = pulumirpc.provider.CallResponse.ReturnDependencies + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CallResponse.ReturnDependencies]) + } + + object ReturnDependencies extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallResponse.ReturnDependencies] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallResponse.ReturnDependencies] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.CallResponse.ReturnDependencies = { + val __urns: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urns += _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.CallResponse.ReturnDependencies( + urns = __urns.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.CallResponse.ReturnDependencies] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.CallResponse.ReturnDependencies( + urns = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.CallResponse.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.CallResponse.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.provider.CallResponse.ReturnDependencies( + urns = _root_.scala.Seq.empty + ) + implicit class ReturnDependenciesLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CallResponse.ReturnDependencies]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.CallResponse.ReturnDependencies](_l) { + def urns: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.urns)((c_, f_) => c_.copy(urns = f_)) + } + final val URNS_FIELD_NUMBER = 1 + def of( + urns: _root_.scala.Seq[_root_.scala.Predef.String] + ): _root_.pulumirpc.provider.CallResponse.ReturnDependencies = _root_.pulumirpc.provider.CallResponse.ReturnDependencies( + urns + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CallResponse.ReturnDependencies]) + } + + @SerialVersionUID(0L) + final case class ReturnDependenciesEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Option[pulumirpc.provider.CallResponse.ReturnDependencies] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ReturnDependenciesEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (value.isDefined) { + val __value = value.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + value.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): ReturnDependenciesEntry = copy(key = __v) + def getValue: pulumirpc.provider.CallResponse.ReturnDependencies = value.getOrElse(pulumirpc.provider.CallResponse.ReturnDependencies.defaultInstance) + def clearValue: ReturnDependenciesEntry = copy(value = _root_.scala.None) + def withValue(__v: pulumirpc.provider.CallResponse.ReturnDependencies): ReturnDependenciesEntry = copy(value = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => value.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => value.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.CallResponse.ReturnDependenciesEntry.type = pulumirpc.provider.CallResponse.ReturnDependenciesEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CallResponse.ReturnDependenciesEntry]) + } + + object ReturnDependenciesEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallResponse.ReturnDependenciesEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.CallResponse.ReturnDependenciesEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.CallResponse.ReturnDependenciesEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Option[pulumirpc.provider.CallResponse.ReturnDependencies] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _root_.scala.Option(__value.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.CallResponse.ReturnDependencies](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.CallResponse.ReturnDependenciesEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.CallResponse.ReturnDependenciesEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.CallResponse.ReturnDependenciesEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[pulumirpc.provider.CallResponse.ReturnDependencies]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.CallResponse.javaDescriptor.getNestedTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.CallResponse.scalaDescriptor.nestedMessages(1) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = pulumirpc.provider.CallResponse.ReturnDependencies + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.CallResponse.ReturnDependenciesEntry( + key = "", + value = _root_.scala.None + ) + implicit class ReturnDependenciesEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CallResponse.ReturnDependenciesEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.CallResponse.ReturnDependenciesEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CallResponse.ReturnDependencies] = field(_.getValue)((c_, f_) => c_.copy(value = _root_.scala.Option(f_))) + def optionalValue: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.provider.CallResponse.ReturnDependencies]] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.provider.CallResponse.ReturnDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies)] = + _root_.scalapb.TypeMapper[pulumirpc.provider.CallResponse.ReturnDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies)](__m => (__m.key, __m.getValue))(__p => pulumirpc.provider.CallResponse.ReturnDependenciesEntry(__p._1, Some(__p._2))) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Option[pulumirpc.provider.CallResponse.ReturnDependencies] + ): _root_.pulumirpc.provider.CallResponse.ReturnDependenciesEntry = _root_.pulumirpc.provider.CallResponse.ReturnDependenciesEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CallResponse.ReturnDependenciesEntry]) + } + + implicit class CallResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CallResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.CallResponse](_l) { + def `return`: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getReturn)((c_, f_) => c_.copy(`return` = _root_.scala.Option(f_))) + def optionalReturn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.`return`)((c_, f_) => c_.copy(`return` = f_)) + def returnDependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies]] = field(_.returnDependencies)((c_, f_) => c_.copy(returnDependencies = f_)) + def failures: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[pulumirpc.provider.CheckFailure]] = field(_.failures)((c_, f_) => c_.copy(failures = f_)) + } + final val RETURN_FIELD_NUMBER = 1 + final val RETURNDEPENDENCIES_FIELD_NUMBER = 2 + final val FAILURES_FIELD_NUMBER = 3 + @transient + private[provider] val _typemapper_returnDependencies: _root_.scalapb.TypeMapper[pulumirpc.provider.CallResponse.ReturnDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.provider.CallResponse.ReturnDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies)]] + def of( + `return`: _root_.scala.Option[com.google.protobuf.struct.Struct], + returnDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.CallResponse.ReturnDependencies], + failures: _root_.scala.Seq[pulumirpc.provider.CheckFailure] + ): _root_.pulumirpc.provider.CallResponse = _root_.pulumirpc.provider.CallResponse( + `return`, + returnDependencies, + failures + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CallResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/CheckFailure.scala b/besom-rpc/src/main/scala/pulumirpc/provider/CheckFailure.scala new file mode 100644 index 00000000..7b8f6fb2 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/CheckFailure.scala @@ -0,0 +1,152 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param property + * the property that failed validation. + * @param reason + * the reason that the property failed validation. + */ +@SerialVersionUID(0L) +final case class CheckFailure( + property: _root_.scala.Predef.String = "", + reason: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[CheckFailure] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = property + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = reason + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = property + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = reason + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withProperty(__v: _root_.scala.Predef.String): CheckFailure = copy(property = __v) + def withReason(__v: _root_.scala.Predef.String): CheckFailure = copy(reason = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = property + if (__t != "") __t else null + } + case 2 => { + val __t = reason + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(property) + case 2 => _root_.scalapb.descriptors.PString(reason) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.CheckFailure.type = pulumirpc.provider.CheckFailure + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CheckFailure]) +} + +object CheckFailure extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.CheckFailure] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.CheckFailure] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.CheckFailure = { + var __property: _root_.scala.Predef.String = "" + var __reason: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __property = _input__.readStringRequireUtf8() + case 18 => + __reason = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.CheckFailure( + property = __property, + reason = __reason, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.CheckFailure] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.CheckFailure( + property = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + reason = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(11) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(11) + 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) + lazy val defaultInstance = pulumirpc.provider.CheckFailure( + property = "", + reason = "" + ) + implicit class CheckFailureLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CheckFailure]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.CheckFailure](_l) { + def property: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.property)((c_, f_) => c_.copy(property = f_)) + def reason: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.reason)((c_, f_) => c_.copy(reason = f_)) + } + final val PROPERTY_FIELD_NUMBER = 1 + final val REASON_FIELD_NUMBER = 2 + def of( + property: _root_.scala.Predef.String, + reason: _root_.scala.Predef.String + ): _root_.pulumirpc.provider.CheckFailure = _root_.pulumirpc.provider.CheckFailure( + property, + reason + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CheckFailure]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/CheckRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/CheckRequest.scala new file mode 100644 index 00000000..8bb948f9 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/CheckRequest.scala @@ -0,0 +1,217 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param urn + * the Pulumi URN for this resource. + * @param olds + * the old Pulumi inputs for this resource, if any. + * @param news + * the new Pulumi inputs for this resource. + * @param randomSeed + * a deterministically random hash, primarily intended for global unique naming. + */ +@SerialVersionUID(0L) +final case class CheckRequest( + urn: _root_.scala.Predef.String = "", + olds: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + news: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + randomSeed: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[CheckRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (olds.isDefined) { + val __value = olds.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + if (news.isDefined) { + val __value = news.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + + { + val __value = randomSeed + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(5, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + olds.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + news.foreach { __v => + val __m = __v + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = randomSeed + if (!__v.isEmpty) { + _output__.writeBytes(5, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withUrn(__v: _root_.scala.Predef.String): CheckRequest = copy(urn = __v) + def getOlds: com.google.protobuf.struct.Struct = olds.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearOlds: CheckRequest = copy(olds = _root_.scala.None) + def withOlds(__v: com.google.protobuf.struct.Struct): CheckRequest = copy(olds = Option(__v)) + def getNews: com.google.protobuf.struct.Struct = news.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearNews: CheckRequest = copy(news = _root_.scala.None) + def withNews(__v: com.google.protobuf.struct.Struct): CheckRequest = copy(news = Option(__v)) + def withRandomSeed(__v: _root_.com.google.protobuf.ByteString): CheckRequest = copy(randomSeed = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = urn + if (__t != "") __t else null + } + case 2 => olds.orNull + case 3 => news.orNull + case 5 => { + val __t = randomSeed + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(urn) + case 2 => olds.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 3 => news.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 5 => _root_.scalapb.descriptors.PByteString(randomSeed) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.CheckRequest.type = pulumirpc.provider.CheckRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CheckRequest]) +} + +object CheckRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.CheckRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.CheckRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.CheckRequest = { + var __urn: _root_.scala.Predef.String = "" + var __olds: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __news: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __randomSeed: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urn = _input__.readStringRequireUtf8() + case 18 => + __olds = _root_.scala.Option(__olds.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 26 => + __news = _root_.scala.Option(__news.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 42 => + __randomSeed = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.CheckRequest( + urn = __urn, + olds = __olds, + news = __news, + randomSeed = __randomSeed, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.CheckRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.CheckRequest( + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + olds = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + news = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + randomSeed = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(9) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(9) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = com.google.protobuf.struct.Struct + case 3 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.CheckRequest( + urn = "", + olds = _root_.scala.None, + news = _root_.scala.None, + randomSeed = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class CheckRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CheckRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.CheckRequest](_l) { + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + def olds: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getOlds)((c_, f_) => c_.copy(olds = _root_.scala.Option(f_))) + def optionalOlds: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.olds)((c_, f_) => c_.copy(olds = f_)) + def news: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getNews)((c_, f_) => c_.copy(news = _root_.scala.Option(f_))) + def optionalNews: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.news)((c_, f_) => c_.copy(news = f_)) + def randomSeed: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.randomSeed)((c_, f_) => c_.copy(randomSeed = f_)) + } + final val URN_FIELD_NUMBER = 1 + final val OLDS_FIELD_NUMBER = 2 + final val NEWS_FIELD_NUMBER = 3 + final val RANDOMSEED_FIELD_NUMBER = 5 + def of( + urn: _root_.scala.Predef.String, + olds: _root_.scala.Option[com.google.protobuf.struct.Struct], + news: _root_.scala.Option[com.google.protobuf.struct.Struct], + randomSeed: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.provider.CheckRequest = _root_.pulumirpc.provider.CheckRequest( + urn, + olds, + news, + randomSeed + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CheckRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/CheckResponse.scala b/besom-rpc/src/main/scala/pulumirpc/provider/CheckResponse.scala new file mode 100644 index 00000000..52c8d00d --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/CheckResponse.scala @@ -0,0 +1,153 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param inputs + * the provider inputs for this resource. + * @param failures + * any validation failures that occurred. + */ +@SerialVersionUID(0L) +final case class CheckResponse( + inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + failures: _root_.scala.Seq[pulumirpc.provider.CheckFailure] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[CheckResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + if (inputs.isDefined) { + val __value = inputs.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + failures.foreach { __item => + val __value = __item + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + inputs.foreach { __v => + val __m = __v + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + failures.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def getInputs: com.google.protobuf.struct.Struct = inputs.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearInputs: CheckResponse = copy(inputs = _root_.scala.None) + def withInputs(__v: com.google.protobuf.struct.Struct): CheckResponse = copy(inputs = Option(__v)) + def clearFailures = copy(failures = _root_.scala.Seq.empty) + def addFailures(__vs: pulumirpc.provider.CheckFailure *): CheckResponse = addAllFailures(__vs) + def addAllFailures(__vs: Iterable[pulumirpc.provider.CheckFailure]): CheckResponse = copy(failures = failures ++ __vs) + def withFailures(__v: _root_.scala.Seq[pulumirpc.provider.CheckFailure]): CheckResponse = copy(failures = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => inputs.orNull + case 2 => failures + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => inputs.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 2 => _root_.scalapb.descriptors.PRepeated(failures.iterator.map(_.toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.CheckResponse.type = pulumirpc.provider.CheckResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CheckResponse]) +} + +object CheckResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.CheckResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.CheckResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.CheckResponse = { + var __inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + val __failures: _root_.scala.collection.immutable.VectorBuilder[pulumirpc.provider.CheckFailure] = new _root_.scala.collection.immutable.VectorBuilder[pulumirpc.provider.CheckFailure] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __inputs = _root_.scala.Option(__inputs.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 18 => + __failures += _root_.scalapb.LiteParser.readMessage[pulumirpc.provider.CheckFailure](_input__) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.CheckResponse( + inputs = __inputs, + failures = __failures.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.CheckResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.CheckResponse( + inputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + failures = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.CheckFailure]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(10) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(10) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = com.google.protobuf.struct.Struct + case 2 => __out = pulumirpc.provider.CheckFailure + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.CheckResponse( + inputs = _root_.scala.None, + failures = _root_.scala.Seq.empty + ) + implicit class CheckResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CheckResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.CheckResponse](_l) { + def inputs: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getInputs)((c_, f_) => c_.copy(inputs = _root_.scala.Option(f_))) + def optionalInputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.inputs)((c_, f_) => c_.copy(inputs = f_)) + def failures: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[pulumirpc.provider.CheckFailure]] = field(_.failures)((c_, f_) => c_.copy(failures = f_)) + } + final val INPUTS_FIELD_NUMBER = 1 + final val FAILURES_FIELD_NUMBER = 2 + def of( + inputs: _root_.scala.Option[com.google.protobuf.struct.Struct], + failures: _root_.scala.Seq[pulumirpc.provider.CheckFailure] + ): _root_.pulumirpc.provider.CheckResponse = _root_.pulumirpc.provider.CheckResponse( + inputs, + failures + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CheckResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/ConfigureErrorMissingKeys.scala b/besom-rpc/src/main/scala/pulumirpc/provider/ConfigureErrorMissingKeys.scala new file mode 100644 index 00000000..f827601b --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/ConfigureErrorMissingKeys.scala @@ -0,0 +1,274 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** ConfigureErrorMissingKeys is sent as a Detail on an error returned from `ResourceProvider.Configure`. + * + * @param missingKeys + * a list of required configuration keys that were not supplied. + */ +@SerialVersionUID(0L) +final case class ConfigureErrorMissingKeys( + missingKeys: _root_.scala.Seq[pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ConfigureErrorMissingKeys] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + missingKeys.foreach { __item => + val __value = __item + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + missingKeys.foreach { __v => + val __m = __v + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def clearMissingKeys = copy(missingKeys = _root_.scala.Seq.empty) + def addMissingKeys(__vs: pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey *): ConfigureErrorMissingKeys = addAllMissingKeys(__vs) + def addAllMissingKeys(__vs: Iterable[pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey]): ConfigureErrorMissingKeys = copy(missingKeys = missingKeys ++ __vs) + def withMissingKeys(__v: _root_.scala.Seq[pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey]): ConfigureErrorMissingKeys = copy(missingKeys = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => missingKeys + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(missingKeys.iterator.map(_.toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConfigureErrorMissingKeys.type = pulumirpc.provider.ConfigureErrorMissingKeys + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConfigureErrorMissingKeys]) +} + +object ConfigureErrorMissingKeys extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConfigureErrorMissingKeys] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConfigureErrorMissingKeys] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConfigureErrorMissingKeys = { + val __missingKeys: _root_.scala.collection.immutable.VectorBuilder[pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey] = new _root_.scala.collection.immutable.VectorBuilder[pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __missingKeys += _root_.scalapb.LiteParser.readMessage[pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey](_input__) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConfigureErrorMissingKeys( + missingKeys = __missingKeys.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConfigureErrorMissingKeys] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConfigureErrorMissingKeys( + missingKeys = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(4) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(4) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.provider.ConfigureErrorMissingKeys( + missingKeys = _root_.scala.Seq.empty + ) + /** @param name + * the Pulumi name (not the provider name!) of the missing config key. + * @param description + * a description of the missing config key, as reported by the provider. + */ + @SerialVersionUID(0L) + final case class MissingKey( + name: _root_.scala.Predef.String = "", + description: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[MissingKey] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = name + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = description + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = name + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = description + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withName(__v: _root_.scala.Predef.String): MissingKey = copy(name = __v) + def withDescription(__v: _root_.scala.Predef.String): MissingKey = copy(description = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = name + if (__t != "") __t else null + } + case 2 => { + val __t = description + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(name) + case 2 => _root_.scalapb.descriptors.PString(description) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey.type = pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConfigureErrorMissingKeys.MissingKey]) + } + + object MissingKey extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey = { + var __name: _root_.scala.Predef.String = "" + var __description: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __name = _input__.readStringRequireUtf8() + case 18 => + __description = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey( + name = __name, + description = __description, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey( + name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + description = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.ConfigureErrorMissingKeys.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.ConfigureErrorMissingKeys.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey( + name = "", + description = "" + ) + implicit class MissingKeyLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey](_l) { + def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_)) + def description: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.description)((c_, f_) => c_.copy(description = f_)) + } + final val NAME_FIELD_NUMBER = 1 + final val DESCRIPTION_FIELD_NUMBER = 2 + def of( + name: _root_.scala.Predef.String, + description: _root_.scala.Predef.String + ): _root_.pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey = _root_.pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey( + name, + description + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConfigureErrorMissingKeys.MissingKey]) + } + + implicit class ConfigureErrorMissingKeysLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConfigureErrorMissingKeys]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConfigureErrorMissingKeys](_l) { + def missingKeys: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey]] = field(_.missingKeys)((c_, f_) => c_.copy(missingKeys = f_)) + } + final val MISSINGKEYS_FIELD_NUMBER = 1 + def of( + missingKeys: _root_.scala.Seq[pulumirpc.provider.ConfigureErrorMissingKeys.MissingKey] + ): _root_.pulumirpc.provider.ConfigureErrorMissingKeys = _root_.pulumirpc.provider.ConfigureErrorMissingKeys( + missingKeys + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConfigureErrorMissingKeys]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/ConfigureRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/ConfigureRequest.scala new file mode 100644 index 00000000..ec58bada --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/ConfigureRequest.scala @@ -0,0 +1,430 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param variables + * a map of configuration keys to values. + * @param args + * the input properties for the provider. Only filled in for newer providers. + * @param acceptSecrets + * when true, operations should return secrets as strongly typed. + * @param acceptResources + * when true, operations should return resources as strongly typed values to the provider. + * @param sendsOldInputs + * when true, diff and update will be called with the old outputs and the old inputs. + * @param sendsOldInputsToDelete + * when true, delete will be called with the old outputs and the old inputs. + */ +@SerialVersionUID(0L) +final case class ConfigureRequest( + variables: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty, + args: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + acceptSecrets: _root_.scala.Boolean = false, + acceptResources: _root_.scala.Boolean = false, + sendsOldInputs: _root_.scala.Boolean = false, + sendsOldInputsToDelete: _root_.scala.Boolean = false, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ConfigureRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + variables.foreach { __item => + val __value = pulumirpc.provider.ConfigureRequest._typemapper_variables.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + if (args.isDefined) { + val __value = args.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + + { + val __value = acceptSecrets + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(3, __value) + } + }; + + { + val __value = acceptResources + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(4, __value) + } + }; + + { + val __value = sendsOldInputs + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(5, __value) + } + }; + + { + val __value = sendsOldInputsToDelete + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(6, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + variables.foreach { __v => + val __m = pulumirpc.provider.ConfigureRequest._typemapper_variables.toBase(__v) + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + args.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = acceptSecrets + if (__v != false) { + _output__.writeBool(3, __v) + } + }; + { + val __v = acceptResources + if (__v != false) { + _output__.writeBool(4, __v) + } + }; + { + val __v = sendsOldInputs + if (__v != false) { + _output__.writeBool(5, __v) + } + }; + { + val __v = sendsOldInputsToDelete + if (__v != false) { + _output__.writeBool(6, __v) + } + }; + unknownFields.writeTo(_output__) + } + def clearVariables = copy(variables = _root_.scala.collection.immutable.Map.empty) + def addVariables(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): ConfigureRequest = addAllVariables(__vs) + def addAllVariables(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): ConfigureRequest = copy(variables = variables ++ __vs) + def withVariables(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): ConfigureRequest = copy(variables = __v) + def getArgs: com.google.protobuf.struct.Struct = args.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearArgs: ConfigureRequest = copy(args = _root_.scala.None) + def withArgs(__v: com.google.protobuf.struct.Struct): ConfigureRequest = copy(args = Option(__v)) + def withAcceptSecrets(__v: _root_.scala.Boolean): ConfigureRequest = copy(acceptSecrets = __v) + def withAcceptResources(__v: _root_.scala.Boolean): ConfigureRequest = copy(acceptResources = __v) + def withSendsOldInputs(__v: _root_.scala.Boolean): ConfigureRequest = copy(sendsOldInputs = __v) + def withSendsOldInputsToDelete(__v: _root_.scala.Boolean): ConfigureRequest = copy(sendsOldInputsToDelete = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => variables.iterator.map(pulumirpc.provider.ConfigureRequest._typemapper_variables.toBase(_)).toSeq + case 2 => args.orNull + case 3 => { + val __t = acceptSecrets + if (__t != false) __t else null + } + case 4 => { + val __t = acceptResources + if (__t != false) __t else null + } + case 5 => { + val __t = sendsOldInputs + if (__t != false) __t else null + } + case 6 => { + val __t = sendsOldInputsToDelete + if (__t != false) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(variables.iterator.map(pulumirpc.provider.ConfigureRequest._typemapper_variables.toBase(_).toPMessage).toVector) + case 2 => args.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 3 => _root_.scalapb.descriptors.PBoolean(acceptSecrets) + case 4 => _root_.scalapb.descriptors.PBoolean(acceptResources) + case 5 => _root_.scalapb.descriptors.PBoolean(sendsOldInputs) + case 6 => _root_.scalapb.descriptors.PBoolean(sendsOldInputsToDelete) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConfigureRequest.type = pulumirpc.provider.ConfigureRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConfigureRequest]) +} + +object ConfigureRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConfigureRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConfigureRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConfigureRequest = { + val __variables: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.scala.Predef.String), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.scala.Predef.String] + var __args: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __acceptSecrets: _root_.scala.Boolean = false + var __acceptResources: _root_.scala.Boolean = false + var __sendsOldInputs: _root_.scala.Boolean = false + var __sendsOldInputsToDelete: _root_.scala.Boolean = false + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __variables += pulumirpc.provider.ConfigureRequest._typemapper_variables.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.ConfigureRequest.VariablesEntry](_input__)) + case 18 => + __args = _root_.scala.Option(__args.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 24 => + __acceptSecrets = _input__.readBool() + case 32 => + __acceptResources = _input__.readBool() + case 40 => + __sendsOldInputs = _input__.readBool() + case 48 => + __sendsOldInputsToDelete = _input__.readBool() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConfigureRequest( + variables = __variables.result(), + args = __args, + acceptSecrets = __acceptSecrets, + acceptResources = __acceptResources, + sendsOldInputs = __sendsOldInputs, + sendsOldInputsToDelete = __sendsOldInputsToDelete, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConfigureRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConfigureRequest( + variables = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.ConfigureRequest.VariablesEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.provider.ConfigureRequest._typemapper_variables.toCustom(_)).toMap, + args = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + acceptSecrets = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + acceptResources = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + sendsOldInputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + sendsOldInputsToDelete = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Boolean]).getOrElse(false) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(2) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(2) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = pulumirpc.provider.ConfigureRequest.VariablesEntry + case 2 => __out = com.google.protobuf.struct.Struct + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.provider.ConfigureRequest.VariablesEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.provider.ConfigureRequest( + variables = _root_.scala.collection.immutable.Map.empty, + args = _root_.scala.None, + acceptSecrets = false, + acceptResources = false, + sendsOldInputs = false, + sendsOldInputsToDelete = false + ) + @SerialVersionUID(0L) + final case class VariablesEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[VariablesEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): VariablesEntry = copy(key = __v) + def withValue(__v: _root_.scala.Predef.String): VariablesEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConfigureRequest.VariablesEntry.type = pulumirpc.provider.ConfigureRequest.VariablesEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConfigureRequest.VariablesEntry]) + } + + object VariablesEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConfigureRequest.VariablesEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConfigureRequest.VariablesEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConfigureRequest.VariablesEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConfigureRequest.VariablesEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConfigureRequest.VariablesEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConfigureRequest.VariablesEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.ConfigureRequest.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.ConfigureRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.provider.ConfigureRequest.VariablesEntry( + key = "", + value = "" + ) + implicit class VariablesEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConfigureRequest.VariablesEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConfigureRequest.VariablesEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.provider.ConfigureRequest.VariablesEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = + _root_.scalapb.TypeMapper[pulumirpc.provider.ConfigureRequest.VariablesEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => pulumirpc.provider.ConfigureRequest.VariablesEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Predef.String + ): _root_.pulumirpc.provider.ConfigureRequest.VariablesEntry = _root_.pulumirpc.provider.ConfigureRequest.VariablesEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConfigureRequest.VariablesEntry]) + } + + implicit class ConfigureRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConfigureRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConfigureRequest](_l) { + def variables: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.variables)((c_, f_) => c_.copy(variables = f_)) + def args: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getArgs)((c_, f_) => c_.copy(args = _root_.scala.Option(f_))) + def optionalArgs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.args)((c_, f_) => c_.copy(args = f_)) + def acceptSecrets: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.acceptSecrets)((c_, f_) => c_.copy(acceptSecrets = f_)) + def acceptResources: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.acceptResources)((c_, f_) => c_.copy(acceptResources = f_)) + def sendsOldInputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.sendsOldInputs)((c_, f_) => c_.copy(sendsOldInputs = f_)) + def sendsOldInputsToDelete: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.sendsOldInputsToDelete)((c_, f_) => c_.copy(sendsOldInputsToDelete = f_)) + } + final val VARIABLES_FIELD_NUMBER = 1 + final val ARGS_FIELD_NUMBER = 2 + final val ACCEPTSECRETS_FIELD_NUMBER = 3 + final val ACCEPTRESOURCES_FIELD_NUMBER = 4 + final val SENDS_OLD_INPUTS_FIELD_NUMBER = 5 + final val SENDS_OLD_INPUTS_TO_DELETE_FIELD_NUMBER = 6 + @transient + private[provider] val _typemapper_variables: _root_.scalapb.TypeMapper[pulumirpc.provider.ConfigureRequest.VariablesEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.provider.ConfigureRequest.VariablesEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]] + def of( + variables: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String], + args: _root_.scala.Option[com.google.protobuf.struct.Struct], + acceptSecrets: _root_.scala.Boolean, + acceptResources: _root_.scala.Boolean, + sendsOldInputs: _root_.scala.Boolean, + sendsOldInputsToDelete: _root_.scala.Boolean + ): _root_.pulumirpc.provider.ConfigureRequest = _root_.pulumirpc.provider.ConfigureRequest( + variables, + args, + acceptSecrets, + acceptResources, + sendsOldInputs, + sendsOldInputsToDelete + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConfigureRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/ConfigureResponse.scala b/besom-rpc/src/main/scala/pulumirpc/provider/ConfigureResponse.scala new file mode 100644 index 00000000..c34938fd --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/ConfigureResponse.scala @@ -0,0 +1,216 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param acceptSecrets + * when true, the engine should pass secrets as strongly typed values to the provider. + * @param supportsPreview + * when true, the engine should invoke create and update with preview=true during previews. + * @param acceptResources + * when true, the engine should pass resources as strongly typed values to the provider. + * @param acceptOutputs + * when true, the engine should pass output values to the provider. + */ +@SerialVersionUID(0L) +final case class ConfigureResponse( + acceptSecrets: _root_.scala.Boolean = false, + supportsPreview: _root_.scala.Boolean = false, + acceptResources: _root_.scala.Boolean = false, + acceptOutputs: _root_.scala.Boolean = false, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ConfigureResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = acceptSecrets + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(1, __value) + } + }; + + { + val __value = supportsPreview + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(2, __value) + } + }; + + { + val __value = acceptResources + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(3, __value) + } + }; + + { + val __value = acceptOutputs + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(4, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = acceptSecrets + if (__v != false) { + _output__.writeBool(1, __v) + } + }; + { + val __v = supportsPreview + if (__v != false) { + _output__.writeBool(2, __v) + } + }; + { + val __v = acceptResources + if (__v != false) { + _output__.writeBool(3, __v) + } + }; + { + val __v = acceptOutputs + if (__v != false) { + _output__.writeBool(4, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withAcceptSecrets(__v: _root_.scala.Boolean): ConfigureResponse = copy(acceptSecrets = __v) + def withSupportsPreview(__v: _root_.scala.Boolean): ConfigureResponse = copy(supportsPreview = __v) + def withAcceptResources(__v: _root_.scala.Boolean): ConfigureResponse = copy(acceptResources = __v) + def withAcceptOutputs(__v: _root_.scala.Boolean): ConfigureResponse = copy(acceptOutputs = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = acceptSecrets + if (__t != false) __t else null + } + case 2 => { + val __t = supportsPreview + if (__t != false) __t else null + } + case 3 => { + val __t = acceptResources + if (__t != false) __t else null + } + case 4 => { + val __t = acceptOutputs + if (__t != false) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PBoolean(acceptSecrets) + case 2 => _root_.scalapb.descriptors.PBoolean(supportsPreview) + case 3 => _root_.scalapb.descriptors.PBoolean(acceptResources) + case 4 => _root_.scalapb.descriptors.PBoolean(acceptOutputs) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConfigureResponse.type = pulumirpc.provider.ConfigureResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConfigureResponse]) +} + +object ConfigureResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConfigureResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConfigureResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConfigureResponse = { + var __acceptSecrets: _root_.scala.Boolean = false + var __supportsPreview: _root_.scala.Boolean = false + var __acceptResources: _root_.scala.Boolean = false + var __acceptOutputs: _root_.scala.Boolean = false + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 8 => + __acceptSecrets = _input__.readBool() + case 16 => + __supportsPreview = _input__.readBool() + case 24 => + __acceptResources = _input__.readBool() + case 32 => + __acceptOutputs = _input__.readBool() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConfigureResponse( + acceptSecrets = __acceptSecrets, + supportsPreview = __supportsPreview, + acceptResources = __acceptResources, + acceptOutputs = __acceptOutputs, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConfigureResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConfigureResponse( + acceptSecrets = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + supportsPreview = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + acceptResources = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + acceptOutputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Boolean]).getOrElse(false) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(3) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(3) + 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) + lazy val defaultInstance = pulumirpc.provider.ConfigureResponse( + acceptSecrets = false, + supportsPreview = false, + acceptResources = false, + acceptOutputs = false + ) + implicit class ConfigureResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConfigureResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConfigureResponse](_l) { + def acceptSecrets: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.acceptSecrets)((c_, f_) => c_.copy(acceptSecrets = f_)) + def supportsPreview: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.supportsPreview)((c_, f_) => c_.copy(supportsPreview = f_)) + def acceptResources: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.acceptResources)((c_, f_) => c_.copy(acceptResources = f_)) + def acceptOutputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.acceptOutputs)((c_, f_) => c_.copy(acceptOutputs = f_)) + } + final val ACCEPTSECRETS_FIELD_NUMBER = 1 + final val SUPPORTSPREVIEW_FIELD_NUMBER = 2 + final val ACCEPTRESOURCES_FIELD_NUMBER = 3 + final val ACCEPTOUTPUTS_FIELD_NUMBER = 4 + def of( + acceptSecrets: _root_.scala.Boolean, + supportsPreview: _root_.scala.Boolean, + acceptResources: _root_.scala.Boolean, + acceptOutputs: _root_.scala.Boolean + ): _root_.pulumirpc.provider.ConfigureResponse = _root_.pulumirpc.provider.ConfigureResponse( + acceptSecrets, + supportsPreview, + acceptResources, + acceptOutputs + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConfigureResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/ConstructRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/ConstructRequest.scala new file mode 100644 index 00000000..d32fbc7a --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/ConstructRequest.scala @@ -0,0 +1,1603 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param project + * the project name. + * @param stack + * the name of the stack being deployed into. + * @param config + * the configuration variables to apply before running. + * @param dryRun + * true if we're only doing a dryrun (preview). + * @param parallel + * the degree of parallelism for resource operations (<=1 for serial). + * @param monitorEndpoint + * the address for communicating back to the resource monitor. + * @param type + * the type of the object allocated. + * @param name + * the name, for URN purposes, of the object. + * @param parent + * an optional parent URN that this child resource belongs to. + * @param inputs + * the inputs to the resource constructor. + * @param inputDependencies + * a map from property keys to the dependencies of the property. + * @param providers + * the map of providers to use for this resource's children. + * @param dependencies + * a list of URNs that this resource depends on, as observed by the language host. + * @param configSecretKeys + * the configuration keys that have secret values. + * @param organization + * the organization of the stack being deployed into. + * @param protect + * Resource options: + * Do not change field IDs. Add new fields at the end. + * true if the resource should be marked protected. + * @param aliases + * a list of additional URNs that shoud be considered the same. + * @param additionalSecretOutputs + * additional output properties that should be treated as secrets. + * @param customTimeouts + * default timeouts for CRUD operations on this resource. + * @param deletedWith + * URN of a resource that, if deleted, also deletes this resource. + * @param deleteBeforeReplace + * whether to delete the resource before replacing it. + * @param ignoreChanges + * properties that should be ignored during a diff + * @param replaceOnChanges + * properties that, when changed, trigger a replacement + * @param retainOnDelete + * whether to retain the resource in the cloud provider when it is deleted + * @param acceptsOutputValues + * the engine can be passed output values back, stateDependencies can be left blank if returning output values. + */ +@SerialVersionUID(0L) +final case class ConstructRequest( + project: _root_.scala.Predef.String = "", + stack: _root_.scala.Predef.String = "", + config: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty, + dryRun: _root_.scala.Boolean = false, + parallel: _root_.scala.Int = 0, + monitorEndpoint: _root_.scala.Predef.String = "", + `type`: _root_.scala.Predef.String = "", + name: _root_.scala.Predef.String = "", + parent: _root_.scala.Predef.String = "", + inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + inputDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies] = _root_.scala.collection.immutable.Map.empty, + providers: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty, + dependencies: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + configSecretKeys: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + organization: _root_.scala.Predef.String = "", + protect: _root_.scala.Boolean = false, + aliases: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + additionalSecretOutputs: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + customTimeouts: _root_.scala.Option[pulumirpc.provider.ConstructRequest.CustomTimeouts] = _root_.scala.None, + deletedWith: _root_.scala.Predef.String = "", + deleteBeforeReplace: _root_.scala.Boolean = false, + ignoreChanges: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + replaceOnChanges: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + retainOnDelete: _root_.scala.Boolean = false, + acceptsOutputValues: _root_.scala.Boolean = false, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ConstructRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = project + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = stack + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + config.foreach { __item => + val __value = pulumirpc.provider.ConstructRequest._typemapper_config.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = dryRun + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(4, __value) + } + }; + + { + val __value = parallel + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(5, __value) + } + }; + + { + val __value = monitorEndpoint + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(6, __value) + } + }; + + { + val __value = `type` + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(7, __value) + } + }; + + { + val __value = name + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(8, __value) + } + }; + + { + val __value = parent + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(9, __value) + } + }; + if (inputs.isDefined) { + val __value = inputs.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + inputDependencies.foreach { __item => + val __value = pulumirpc.provider.ConstructRequest._typemapper_inputDependencies.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + providers.foreach { __item => + val __value = pulumirpc.provider.ConstructRequest._typemapper_providers.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + dependencies.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(15, __value) + } + configSecretKeys.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(16, __value) + } + + { + val __value = organization + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(17, __value) + } + }; + + { + val __value = protect + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(12, __value) + } + }; + aliases.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(14, __value) + } + additionalSecretOutputs.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(18, __value) + } + if (customTimeouts.isDefined) { + val __value = customTimeouts.get + __size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + + { + val __value = deletedWith + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(20, __value) + } + }; + + { + val __value = deleteBeforeReplace + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(21, __value) + } + }; + ignoreChanges.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(22, __value) + } + replaceOnChanges.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(23, __value) + } + + { + val __value = retainOnDelete + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(24, __value) + } + }; + + { + val __value = acceptsOutputValues + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(25, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = project + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = stack + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + config.foreach { __v => + val __m = pulumirpc.provider.ConstructRequest._typemapper_config.toBase(__v) + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = dryRun + if (__v != false) { + _output__.writeBool(4, __v) + } + }; + { + val __v = parallel + if (__v != 0) { + _output__.writeInt32(5, __v) + } + }; + { + val __v = monitorEndpoint + if (!__v.isEmpty) { + _output__.writeString(6, __v) + } + }; + { + val __v = `type` + if (!__v.isEmpty) { + _output__.writeString(7, __v) + } + }; + { + val __v = name + if (!__v.isEmpty) { + _output__.writeString(8, __v) + } + }; + { + val __v = parent + if (!__v.isEmpty) { + _output__.writeString(9, __v) + } + }; + inputs.foreach { __v => + val __m = __v + _output__.writeTag(10, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + inputDependencies.foreach { __v => + val __m = pulumirpc.provider.ConstructRequest._typemapper_inputDependencies.toBase(__v) + _output__.writeTag(11, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = protect + if (__v != false) { + _output__.writeBool(12, __v) + } + }; + providers.foreach { __v => + val __m = pulumirpc.provider.ConstructRequest._typemapper_providers.toBase(__v) + _output__.writeTag(13, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + aliases.foreach { __v => + val __m = __v + _output__.writeString(14, __m) + }; + dependencies.foreach { __v => + val __m = __v + _output__.writeString(15, __m) + }; + configSecretKeys.foreach { __v => + val __m = __v + _output__.writeString(16, __m) + }; + { + val __v = organization + if (!__v.isEmpty) { + _output__.writeString(17, __v) + } + }; + additionalSecretOutputs.foreach { __v => + val __m = __v + _output__.writeString(18, __m) + }; + customTimeouts.foreach { __v => + val __m = __v + _output__.writeTag(19, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = deletedWith + if (!__v.isEmpty) { + _output__.writeString(20, __v) + } + }; + { + val __v = deleteBeforeReplace + if (__v != false) { + _output__.writeBool(21, __v) + } + }; + ignoreChanges.foreach { __v => + val __m = __v + _output__.writeString(22, __m) + }; + replaceOnChanges.foreach { __v => + val __m = __v + _output__.writeString(23, __m) + }; + { + val __v = retainOnDelete + if (__v != false) { + _output__.writeBool(24, __v) + } + }; + { + val __v = acceptsOutputValues + if (__v != false) { + _output__.writeBool(25, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withProject(__v: _root_.scala.Predef.String): ConstructRequest = copy(project = __v) + def withStack(__v: _root_.scala.Predef.String): ConstructRequest = copy(stack = __v) + def clearConfig = copy(config = _root_.scala.collection.immutable.Map.empty) + def addConfig(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): ConstructRequest = addAllConfig(__vs) + def addAllConfig(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): ConstructRequest = copy(config = config ++ __vs) + def withConfig(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): ConstructRequest = copy(config = __v) + def withDryRun(__v: _root_.scala.Boolean): ConstructRequest = copy(dryRun = __v) + def withParallel(__v: _root_.scala.Int): ConstructRequest = copy(parallel = __v) + def withMonitorEndpoint(__v: _root_.scala.Predef.String): ConstructRequest = copy(monitorEndpoint = __v) + def withType(__v: _root_.scala.Predef.String): ConstructRequest = copy(`type` = __v) + def withName(__v: _root_.scala.Predef.String): ConstructRequest = copy(name = __v) + def withParent(__v: _root_.scala.Predef.String): ConstructRequest = copy(parent = __v) + def getInputs: com.google.protobuf.struct.Struct = inputs.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearInputs: ConstructRequest = copy(inputs = _root_.scala.None) + def withInputs(__v: com.google.protobuf.struct.Struct): ConstructRequest = copy(inputs = Option(__v)) + def clearInputDependencies = copy(inputDependencies = _root_.scala.collection.immutable.Map.empty) + def addInputDependencies(__vs: (_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies) *): ConstructRequest = addAllInputDependencies(__vs) + def addAllInputDependencies(__vs: Iterable[(_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies)]): ConstructRequest = copy(inputDependencies = inputDependencies ++ __vs) + def withInputDependencies(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies]): ConstructRequest = copy(inputDependencies = __v) + def clearProviders = copy(providers = _root_.scala.collection.immutable.Map.empty) + def addProviders(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): ConstructRequest = addAllProviders(__vs) + def addAllProviders(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): ConstructRequest = copy(providers = providers ++ __vs) + def withProviders(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): ConstructRequest = copy(providers = __v) + def clearDependencies = copy(dependencies = _root_.scala.Seq.empty) + def addDependencies(__vs: _root_.scala.Predef.String *): ConstructRequest = addAllDependencies(__vs) + def addAllDependencies(__vs: Iterable[_root_.scala.Predef.String]): ConstructRequest = copy(dependencies = dependencies ++ __vs) + def withDependencies(__v: _root_.scala.Seq[_root_.scala.Predef.String]): ConstructRequest = copy(dependencies = __v) + def clearConfigSecretKeys = copy(configSecretKeys = _root_.scala.Seq.empty) + def addConfigSecretKeys(__vs: _root_.scala.Predef.String *): ConstructRequest = addAllConfigSecretKeys(__vs) + def addAllConfigSecretKeys(__vs: Iterable[_root_.scala.Predef.String]): ConstructRequest = copy(configSecretKeys = configSecretKeys ++ __vs) + def withConfigSecretKeys(__v: _root_.scala.Seq[_root_.scala.Predef.String]): ConstructRequest = copy(configSecretKeys = __v) + def withOrganization(__v: _root_.scala.Predef.String): ConstructRequest = copy(organization = __v) + def withProtect(__v: _root_.scala.Boolean): ConstructRequest = copy(protect = __v) + def clearAliases = copy(aliases = _root_.scala.Seq.empty) + def addAliases(__vs: _root_.scala.Predef.String *): ConstructRequest = addAllAliases(__vs) + def addAllAliases(__vs: Iterable[_root_.scala.Predef.String]): ConstructRequest = copy(aliases = aliases ++ __vs) + def withAliases(__v: _root_.scala.Seq[_root_.scala.Predef.String]): ConstructRequest = copy(aliases = __v) + def clearAdditionalSecretOutputs = copy(additionalSecretOutputs = _root_.scala.Seq.empty) + def addAdditionalSecretOutputs(__vs: _root_.scala.Predef.String *): ConstructRequest = addAllAdditionalSecretOutputs(__vs) + def addAllAdditionalSecretOutputs(__vs: Iterable[_root_.scala.Predef.String]): ConstructRequest = copy(additionalSecretOutputs = additionalSecretOutputs ++ __vs) + def withAdditionalSecretOutputs(__v: _root_.scala.Seq[_root_.scala.Predef.String]): ConstructRequest = copy(additionalSecretOutputs = __v) + def getCustomTimeouts: pulumirpc.provider.ConstructRequest.CustomTimeouts = customTimeouts.getOrElse(pulumirpc.provider.ConstructRequest.CustomTimeouts.defaultInstance) + def clearCustomTimeouts: ConstructRequest = copy(customTimeouts = _root_.scala.None) + def withCustomTimeouts(__v: pulumirpc.provider.ConstructRequest.CustomTimeouts): ConstructRequest = copy(customTimeouts = Option(__v)) + def withDeletedWith(__v: _root_.scala.Predef.String): ConstructRequest = copy(deletedWith = __v) + def withDeleteBeforeReplace(__v: _root_.scala.Boolean): ConstructRequest = copy(deleteBeforeReplace = __v) + def clearIgnoreChanges = copy(ignoreChanges = _root_.scala.Seq.empty) + def addIgnoreChanges(__vs: _root_.scala.Predef.String *): ConstructRequest = addAllIgnoreChanges(__vs) + def addAllIgnoreChanges(__vs: Iterable[_root_.scala.Predef.String]): ConstructRequest = copy(ignoreChanges = ignoreChanges ++ __vs) + def withIgnoreChanges(__v: _root_.scala.Seq[_root_.scala.Predef.String]): ConstructRequest = copy(ignoreChanges = __v) + def clearReplaceOnChanges = copy(replaceOnChanges = _root_.scala.Seq.empty) + def addReplaceOnChanges(__vs: _root_.scala.Predef.String *): ConstructRequest = addAllReplaceOnChanges(__vs) + def addAllReplaceOnChanges(__vs: Iterable[_root_.scala.Predef.String]): ConstructRequest = copy(replaceOnChanges = replaceOnChanges ++ __vs) + def withReplaceOnChanges(__v: _root_.scala.Seq[_root_.scala.Predef.String]): ConstructRequest = copy(replaceOnChanges = __v) + def withRetainOnDelete(__v: _root_.scala.Boolean): ConstructRequest = copy(retainOnDelete = __v) + def withAcceptsOutputValues(__v: _root_.scala.Boolean): ConstructRequest = copy(acceptsOutputValues = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = project + if (__t != "") __t else null + } + case 2 => { + val __t = stack + if (__t != "") __t else null + } + case 3 => config.iterator.map(pulumirpc.provider.ConstructRequest._typemapper_config.toBase(_)).toSeq + case 4 => { + val __t = dryRun + if (__t != false) __t else null + } + case 5 => { + val __t = parallel + if (__t != 0) __t else null + } + case 6 => { + val __t = monitorEndpoint + if (__t != "") __t else null + } + case 7 => { + val __t = `type` + if (__t != "") __t else null + } + case 8 => { + val __t = name + if (__t != "") __t else null + } + case 9 => { + val __t = parent + if (__t != "") __t else null + } + case 10 => inputs.orNull + case 11 => inputDependencies.iterator.map(pulumirpc.provider.ConstructRequest._typemapper_inputDependencies.toBase(_)).toSeq + case 13 => providers.iterator.map(pulumirpc.provider.ConstructRequest._typemapper_providers.toBase(_)).toSeq + case 15 => dependencies + case 16 => configSecretKeys + case 17 => { + val __t = organization + if (__t != "") __t else null + } + case 12 => { + val __t = protect + if (__t != false) __t else null + } + case 14 => aliases + case 18 => additionalSecretOutputs + case 19 => customTimeouts.orNull + case 20 => { + val __t = deletedWith + if (__t != "") __t else null + } + case 21 => { + val __t = deleteBeforeReplace + if (__t != false) __t else null + } + case 22 => ignoreChanges + case 23 => replaceOnChanges + case 24 => { + val __t = retainOnDelete + if (__t != false) __t else null + } + case 25 => { + val __t = acceptsOutputValues + if (__t != false) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(project) + case 2 => _root_.scalapb.descriptors.PString(stack) + case 3 => _root_.scalapb.descriptors.PRepeated(config.iterator.map(pulumirpc.provider.ConstructRequest._typemapper_config.toBase(_).toPMessage).toVector) + case 4 => _root_.scalapb.descriptors.PBoolean(dryRun) + case 5 => _root_.scalapb.descriptors.PInt(parallel) + case 6 => _root_.scalapb.descriptors.PString(monitorEndpoint) + case 7 => _root_.scalapb.descriptors.PString(`type`) + case 8 => _root_.scalapb.descriptors.PString(name) + case 9 => _root_.scalapb.descriptors.PString(parent) + case 10 => inputs.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 11 => _root_.scalapb.descriptors.PRepeated(inputDependencies.iterator.map(pulumirpc.provider.ConstructRequest._typemapper_inputDependencies.toBase(_).toPMessage).toVector) + case 13 => _root_.scalapb.descriptors.PRepeated(providers.iterator.map(pulumirpc.provider.ConstructRequest._typemapper_providers.toBase(_).toPMessage).toVector) + case 15 => _root_.scalapb.descriptors.PRepeated(dependencies.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 16 => _root_.scalapb.descriptors.PRepeated(configSecretKeys.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 17 => _root_.scalapb.descriptors.PString(organization) + case 12 => _root_.scalapb.descriptors.PBoolean(protect) + case 14 => _root_.scalapb.descriptors.PRepeated(aliases.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 18 => _root_.scalapb.descriptors.PRepeated(additionalSecretOutputs.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 19 => customTimeouts.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 20 => _root_.scalapb.descriptors.PString(deletedWith) + case 21 => _root_.scalapb.descriptors.PBoolean(deleteBeforeReplace) + case 22 => _root_.scalapb.descriptors.PRepeated(ignoreChanges.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 23 => _root_.scalapb.descriptors.PRepeated(replaceOnChanges.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 24 => _root_.scalapb.descriptors.PBoolean(retainOnDelete) + case 25 => _root_.scalapb.descriptors.PBoolean(acceptsOutputValues) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConstructRequest.type = pulumirpc.provider.ConstructRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConstructRequest]) +} + +object ConstructRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConstructRequest = { + var __project: _root_.scala.Predef.String = "" + var __stack: _root_.scala.Predef.String = "" + val __config: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.scala.Predef.String), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.scala.Predef.String] + var __dryRun: _root_.scala.Boolean = false + var __parallel: _root_.scala.Int = 0 + var __monitorEndpoint: _root_.scala.Predef.String = "" + var __type: _root_.scala.Predef.String = "" + var __name: _root_.scala.Predef.String = "" + var __parent: _root_.scala.Predef.String = "" + var __inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + val __inputDependencies: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies] + val __providers: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.scala.Predef.String), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.scala.Predef.String] + val __dependencies: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + val __configSecretKeys: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __organization: _root_.scala.Predef.String = "" + var __protect: _root_.scala.Boolean = false + val __aliases: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + val __additionalSecretOutputs: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __customTimeouts: _root_.scala.Option[pulumirpc.provider.ConstructRequest.CustomTimeouts] = _root_.scala.None + var __deletedWith: _root_.scala.Predef.String = "" + var __deleteBeforeReplace: _root_.scala.Boolean = false + val __ignoreChanges: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + val __replaceOnChanges: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __retainOnDelete: _root_.scala.Boolean = false + var __acceptsOutputValues: _root_.scala.Boolean = false + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __project = _input__.readStringRequireUtf8() + case 18 => + __stack = _input__.readStringRequireUtf8() + case 26 => + __config += pulumirpc.provider.ConstructRequest._typemapper_config.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.ConstructRequest.ConfigEntry](_input__)) + case 32 => + __dryRun = _input__.readBool() + case 40 => + __parallel = _input__.readInt32() + case 50 => + __monitorEndpoint = _input__.readStringRequireUtf8() + case 58 => + __type = _input__.readStringRequireUtf8() + case 66 => + __name = _input__.readStringRequireUtf8() + case 74 => + __parent = _input__.readStringRequireUtf8() + case 82 => + __inputs = _root_.scala.Option(__inputs.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 90 => + __inputDependencies += pulumirpc.provider.ConstructRequest._typemapper_inputDependencies.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.ConstructRequest.InputDependenciesEntry](_input__)) + case 106 => + __providers += pulumirpc.provider.ConstructRequest._typemapper_providers.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.ConstructRequest.ProvidersEntry](_input__)) + case 122 => + __dependencies += _input__.readStringRequireUtf8() + case 130 => + __configSecretKeys += _input__.readStringRequireUtf8() + case 138 => + __organization = _input__.readStringRequireUtf8() + case 96 => + __protect = _input__.readBool() + case 114 => + __aliases += _input__.readStringRequireUtf8() + case 146 => + __additionalSecretOutputs += _input__.readStringRequireUtf8() + case 154 => + __customTimeouts = _root_.scala.Option(__customTimeouts.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.ConstructRequest.CustomTimeouts](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 162 => + __deletedWith = _input__.readStringRequireUtf8() + case 168 => + __deleteBeforeReplace = _input__.readBool() + case 178 => + __ignoreChanges += _input__.readStringRequireUtf8() + case 186 => + __replaceOnChanges += _input__.readStringRequireUtf8() + case 192 => + __retainOnDelete = _input__.readBool() + case 200 => + __acceptsOutputValues = _input__.readBool() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConstructRequest( + project = __project, + stack = __stack, + config = __config.result(), + dryRun = __dryRun, + parallel = __parallel, + monitorEndpoint = __monitorEndpoint, + `type` = __type, + name = __name, + parent = __parent, + inputs = __inputs, + inputDependencies = __inputDependencies.result(), + providers = __providers.result(), + dependencies = __dependencies.result(), + configSecretKeys = __configSecretKeys.result(), + organization = __organization, + protect = __protect, + aliases = __aliases.result(), + additionalSecretOutputs = __additionalSecretOutputs.result(), + customTimeouts = __customTimeouts, + deletedWith = __deletedWith, + deleteBeforeReplace = __deleteBeforeReplace, + ignoreChanges = __ignoreChanges.result(), + replaceOnChanges = __replaceOnChanges.result(), + retainOnDelete = __retainOnDelete, + acceptsOutputValues = __acceptsOutputValues, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConstructRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConstructRequest( + project = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + stack = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + config = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.ConstructRequest.ConfigEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.provider.ConstructRequest._typemapper_config.toCustom(_)).toMap, + dryRun = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + parallel = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Int]).getOrElse(0), + monitorEndpoint = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + `type` = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + parent = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + inputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + inputDependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.ConstructRequest.InputDependenciesEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.provider.ConstructRequest._typemapper_inputDependencies.toCustom(_)).toMap, + providers = __fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.ConstructRequest.ProvidersEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.provider.ConstructRequest._typemapper_providers.toCustom(_)).toMap, + dependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(15).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + configSecretKeys = __fieldsMap.get(scalaDescriptor.findFieldByNumber(16).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + organization = __fieldsMap.get(scalaDescriptor.findFieldByNumber(17).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + protect = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + aliases = __fieldsMap.get(scalaDescriptor.findFieldByNumber(14).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + additionalSecretOutputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(18).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + customTimeouts = __fieldsMap.get(scalaDescriptor.findFieldByNumber(19).get).flatMap(_.as[_root_.scala.Option[pulumirpc.provider.ConstructRequest.CustomTimeouts]]), + deletedWith = __fieldsMap.get(scalaDescriptor.findFieldByNumber(20).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + deleteBeforeReplace = __fieldsMap.get(scalaDescriptor.findFieldByNumber(21).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + ignoreChanges = __fieldsMap.get(scalaDescriptor.findFieldByNumber(22).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + replaceOnChanges = __fieldsMap.get(scalaDescriptor.findFieldByNumber(23).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + retainOnDelete = __fieldsMap.get(scalaDescriptor.findFieldByNumber(24).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + acceptsOutputValues = __fieldsMap.get(scalaDescriptor.findFieldByNumber(25).get).map(_.as[_root_.scala.Boolean]).getOrElse(false) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(22) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(22) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 3 => __out = pulumirpc.provider.ConstructRequest.ConfigEntry + case 10 => __out = com.google.protobuf.struct.Struct + case 11 => __out = pulumirpc.provider.ConstructRequest.InputDependenciesEntry + case 13 => __out = pulumirpc.provider.ConstructRequest.ProvidersEntry + case 19 => __out = pulumirpc.provider.ConstructRequest.CustomTimeouts + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.provider.ConstructRequest.PropertyDependencies, + _root_.pulumirpc.provider.ConstructRequest.CustomTimeouts, + _root_.pulumirpc.provider.ConstructRequest.ConfigEntry, + _root_.pulumirpc.provider.ConstructRequest.InputDependenciesEntry, + _root_.pulumirpc.provider.ConstructRequest.ProvidersEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.provider.ConstructRequest( + project = "", + stack = "", + config = _root_.scala.collection.immutable.Map.empty, + dryRun = false, + parallel = 0, + monitorEndpoint = "", + `type` = "", + name = "", + parent = "", + inputs = _root_.scala.None, + inputDependencies = _root_.scala.collection.immutable.Map.empty, + providers = _root_.scala.collection.immutable.Map.empty, + dependencies = _root_.scala.Seq.empty, + configSecretKeys = _root_.scala.Seq.empty, + organization = "", + protect = false, + aliases = _root_.scala.Seq.empty, + additionalSecretOutputs = _root_.scala.Seq.empty, + customTimeouts = _root_.scala.None, + deletedWith = "", + deleteBeforeReplace = false, + ignoreChanges = _root_.scala.Seq.empty, + replaceOnChanges = _root_.scala.Seq.empty, + retainOnDelete = false, + acceptsOutputValues = false + ) + /** PropertyDependencies describes the resources that a particular property depends on. + * + * @param urns + * A list of URNs this property depends on. + */ + @SerialVersionUID(0L) + final case class PropertyDependencies( + urns: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PropertyDependencies] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + urns.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + urns.foreach { __v => + val __m = __v + _output__.writeString(1, __m) + }; + unknownFields.writeTo(_output__) + } + def clearUrns = copy(urns = _root_.scala.Seq.empty) + def addUrns(__vs: _root_.scala.Predef.String *): PropertyDependencies = addAllUrns(__vs) + def addAllUrns(__vs: Iterable[_root_.scala.Predef.String]): PropertyDependencies = copy(urns = urns ++ __vs) + def withUrns(__v: _root_.scala.Seq[_root_.scala.Predef.String]): PropertyDependencies = copy(urns = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => urns + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(urns.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConstructRequest.PropertyDependencies.type = pulumirpc.provider.ConstructRequest.PropertyDependencies + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConstructRequest.PropertyDependencies]) + } + + object PropertyDependencies extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructRequest.PropertyDependencies] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructRequest.PropertyDependencies] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConstructRequest.PropertyDependencies = { + val __urns: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urns += _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConstructRequest.PropertyDependencies( + urns = __urns.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConstructRequest.PropertyDependencies] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConstructRequest.PropertyDependencies( + urns = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.ConstructRequest.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.ConstructRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.provider.ConstructRequest.PropertyDependencies( + urns = _root_.scala.Seq.empty + ) + implicit class PropertyDependenciesLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConstructRequest.PropertyDependencies]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConstructRequest.PropertyDependencies](_l) { + def urns: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.urns)((c_, f_) => c_.copy(urns = f_)) + } + final val URNS_FIELD_NUMBER = 1 + def of( + urns: _root_.scala.Seq[_root_.scala.Predef.String] + ): _root_.pulumirpc.provider.ConstructRequest.PropertyDependencies = _root_.pulumirpc.provider.ConstructRequest.PropertyDependencies( + urns + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConstructRequest.PropertyDependencies]) + } + + /** CustomTimeouts specifies timeouts for resource provisioning operations. + * Use it with the [Timeouts] option when creating new resources + * to override default timeouts. + * + * Each timeout is specified as a duration string such as, + * "5ms" (5 milliseconds), "40s" (40 seconds), + * and "1m30s" (1 minute, 30 seconds). + * + * The following units are accepted. + * + * - ns: nanoseconds + * - us: microseconds + * - µs: microseconds + * - ms: milliseconds + * - s: seconds + * - m: minutes + * - h: hours + */ + @SerialVersionUID(0L) + final case class CustomTimeouts( + create: _root_.scala.Predef.String = "", + update: _root_.scala.Predef.String = "", + delete: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[CustomTimeouts] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = create + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = update + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = delete + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = create + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = update + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = delete + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withCreate(__v: _root_.scala.Predef.String): CustomTimeouts = copy(create = __v) + def withUpdate(__v: _root_.scala.Predef.String): CustomTimeouts = copy(update = __v) + def withDelete(__v: _root_.scala.Predef.String): CustomTimeouts = copy(delete = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = create + if (__t != "") __t else null + } + case 2 => { + val __t = update + if (__t != "") __t else null + } + case 3 => { + val __t = delete + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(create) + case 2 => _root_.scalapb.descriptors.PString(update) + case 3 => _root_.scalapb.descriptors.PString(delete) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConstructRequest.CustomTimeouts.type = pulumirpc.provider.ConstructRequest.CustomTimeouts + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConstructRequest.CustomTimeouts]) + } + + object CustomTimeouts extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructRequest.CustomTimeouts] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructRequest.CustomTimeouts] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConstructRequest.CustomTimeouts = { + var __create: _root_.scala.Predef.String = "" + var __update: _root_.scala.Predef.String = "" + var __delete: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __create = _input__.readStringRequireUtf8() + case 18 => + __update = _input__.readStringRequireUtf8() + case 26 => + __delete = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConstructRequest.CustomTimeouts( + create = __create, + update = __update, + delete = __delete, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConstructRequest.CustomTimeouts] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConstructRequest.CustomTimeouts( + create = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + update = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + delete = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.ConstructRequest.javaDescriptor.getNestedTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.ConstructRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.provider.ConstructRequest.CustomTimeouts( + create = "", + update = "", + delete = "" + ) + implicit class CustomTimeoutsLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConstructRequest.CustomTimeouts]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConstructRequest.CustomTimeouts](_l) { + def create: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.create)((c_, f_) => c_.copy(create = f_)) + def update: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.update)((c_, f_) => c_.copy(update = f_)) + def delete: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.delete)((c_, f_) => c_.copy(delete = f_)) + } + final val CREATE_FIELD_NUMBER = 1 + final val UPDATE_FIELD_NUMBER = 2 + final val DELETE_FIELD_NUMBER = 3 + def of( + create: _root_.scala.Predef.String, + update: _root_.scala.Predef.String, + delete: _root_.scala.Predef.String + ): _root_.pulumirpc.provider.ConstructRequest.CustomTimeouts = _root_.pulumirpc.provider.ConstructRequest.CustomTimeouts( + create, + update, + delete + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConstructRequest.CustomTimeouts]) + } + + @SerialVersionUID(0L) + final case class ConfigEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ConfigEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): ConfigEntry = copy(key = __v) + def withValue(__v: _root_.scala.Predef.String): ConfigEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConstructRequest.ConfigEntry.type = pulumirpc.provider.ConstructRequest.ConfigEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConstructRequest.ConfigEntry]) + } + + object ConfigEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructRequest.ConfigEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructRequest.ConfigEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConstructRequest.ConfigEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConstructRequest.ConfigEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConstructRequest.ConfigEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConstructRequest.ConfigEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.ConstructRequest.javaDescriptor.getNestedTypes().get(2) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.ConstructRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.provider.ConstructRequest.ConfigEntry( + key = "", + value = "" + ) + implicit class ConfigEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConstructRequest.ConfigEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConstructRequest.ConfigEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.provider.ConstructRequest.ConfigEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = + _root_.scalapb.TypeMapper[pulumirpc.provider.ConstructRequest.ConfigEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => pulumirpc.provider.ConstructRequest.ConfigEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Predef.String + ): _root_.pulumirpc.provider.ConstructRequest.ConfigEntry = _root_.pulumirpc.provider.ConstructRequest.ConfigEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConstructRequest.ConfigEntry]) + } + + @SerialVersionUID(0L) + final case class InputDependenciesEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Option[pulumirpc.provider.ConstructRequest.PropertyDependencies] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[InputDependenciesEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (value.isDefined) { + val __value = value.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + value.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): InputDependenciesEntry = copy(key = __v) + def getValue: pulumirpc.provider.ConstructRequest.PropertyDependencies = value.getOrElse(pulumirpc.provider.ConstructRequest.PropertyDependencies.defaultInstance) + def clearValue: InputDependenciesEntry = copy(value = _root_.scala.None) + def withValue(__v: pulumirpc.provider.ConstructRequest.PropertyDependencies): InputDependenciesEntry = copy(value = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => value.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => value.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConstructRequest.InputDependenciesEntry.type = pulumirpc.provider.ConstructRequest.InputDependenciesEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConstructRequest.InputDependenciesEntry]) + } + + object InputDependenciesEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructRequest.InputDependenciesEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructRequest.InputDependenciesEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConstructRequest.InputDependenciesEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Option[pulumirpc.provider.ConstructRequest.PropertyDependencies] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _root_.scala.Option(__value.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.ConstructRequest.PropertyDependencies](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConstructRequest.InputDependenciesEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConstructRequest.InputDependenciesEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConstructRequest.InputDependenciesEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[pulumirpc.provider.ConstructRequest.PropertyDependencies]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.ConstructRequest.javaDescriptor.getNestedTypes().get(3) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.ConstructRequest.scalaDescriptor.nestedMessages(3) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = pulumirpc.provider.ConstructRequest.PropertyDependencies + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.ConstructRequest.InputDependenciesEntry( + key = "", + value = _root_.scala.None + ) + implicit class InputDependenciesEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConstructRequest.InputDependenciesEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConstructRequest.InputDependenciesEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConstructRequest.PropertyDependencies] = field(_.getValue)((c_, f_) => c_.copy(value = _root_.scala.Option(f_))) + def optionalValue: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.provider.ConstructRequest.PropertyDependencies]] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.provider.ConstructRequest.InputDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies)] = + _root_.scalapb.TypeMapper[pulumirpc.provider.ConstructRequest.InputDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies)](__m => (__m.key, __m.getValue))(__p => pulumirpc.provider.ConstructRequest.InputDependenciesEntry(__p._1, Some(__p._2))) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Option[pulumirpc.provider.ConstructRequest.PropertyDependencies] + ): _root_.pulumirpc.provider.ConstructRequest.InputDependenciesEntry = _root_.pulumirpc.provider.ConstructRequest.InputDependenciesEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConstructRequest.InputDependenciesEntry]) + } + + @SerialVersionUID(0L) + final case class ProvidersEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ProvidersEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): ProvidersEntry = copy(key = __v) + def withValue(__v: _root_.scala.Predef.String): ProvidersEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConstructRequest.ProvidersEntry.type = pulumirpc.provider.ConstructRequest.ProvidersEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConstructRequest.ProvidersEntry]) + } + + object ProvidersEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructRequest.ProvidersEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructRequest.ProvidersEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConstructRequest.ProvidersEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConstructRequest.ProvidersEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConstructRequest.ProvidersEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConstructRequest.ProvidersEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.ConstructRequest.javaDescriptor.getNestedTypes().get(4) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.ConstructRequest.scalaDescriptor.nestedMessages(4) + 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) + lazy val defaultInstance = pulumirpc.provider.ConstructRequest.ProvidersEntry( + key = "", + value = "" + ) + implicit class ProvidersEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConstructRequest.ProvidersEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConstructRequest.ProvidersEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.provider.ConstructRequest.ProvidersEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = + _root_.scalapb.TypeMapper[pulumirpc.provider.ConstructRequest.ProvidersEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => pulumirpc.provider.ConstructRequest.ProvidersEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Predef.String + ): _root_.pulumirpc.provider.ConstructRequest.ProvidersEntry = _root_.pulumirpc.provider.ConstructRequest.ProvidersEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConstructRequest.ProvidersEntry]) + } + + implicit class ConstructRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConstructRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConstructRequest](_l) { + def project: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.project)((c_, f_) => c_.copy(project = f_)) + def stack: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.stack)((c_, f_) => c_.copy(stack = f_)) + def config: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.config)((c_, f_) => c_.copy(config = f_)) + def dryRun: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.dryRun)((c_, f_) => c_.copy(dryRun = f_)) + def parallel: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.parallel)((c_, f_) => c_.copy(parallel = f_)) + def monitorEndpoint: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.monitorEndpoint)((c_, f_) => c_.copy(monitorEndpoint = f_)) + def `type`: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.`type`)((c_, f_) => c_.copy(`type` = f_)) + def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_)) + def parent: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.parent)((c_, f_) => c_.copy(parent = f_)) + def inputs: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getInputs)((c_, f_) => c_.copy(inputs = _root_.scala.Option(f_))) + def optionalInputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.inputs)((c_, f_) => c_.copy(inputs = f_)) + def inputDependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies]] = field(_.inputDependencies)((c_, f_) => c_.copy(inputDependencies = f_)) + def providers: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.providers)((c_, f_) => c_.copy(providers = f_)) + def dependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.dependencies)((c_, f_) => c_.copy(dependencies = f_)) + def configSecretKeys: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.configSecretKeys)((c_, f_) => c_.copy(configSecretKeys = f_)) + def organization: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.organization)((c_, f_) => c_.copy(organization = f_)) + def protect: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.protect)((c_, f_) => c_.copy(protect = f_)) + def aliases: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.aliases)((c_, f_) => c_.copy(aliases = f_)) + def additionalSecretOutputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.additionalSecretOutputs)((c_, f_) => c_.copy(additionalSecretOutputs = f_)) + def customTimeouts: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConstructRequest.CustomTimeouts] = field(_.getCustomTimeouts)((c_, f_) => c_.copy(customTimeouts = _root_.scala.Option(f_))) + def optionalCustomTimeouts: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.provider.ConstructRequest.CustomTimeouts]] = field(_.customTimeouts)((c_, f_) => c_.copy(customTimeouts = f_)) + def deletedWith: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.deletedWith)((c_, f_) => c_.copy(deletedWith = f_)) + def deleteBeforeReplace: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.deleteBeforeReplace)((c_, f_) => c_.copy(deleteBeforeReplace = f_)) + def ignoreChanges: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.ignoreChanges)((c_, f_) => c_.copy(ignoreChanges = f_)) + def replaceOnChanges: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.replaceOnChanges)((c_, f_) => c_.copy(replaceOnChanges = f_)) + def retainOnDelete: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.retainOnDelete)((c_, f_) => c_.copy(retainOnDelete = f_)) + def acceptsOutputValues: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.acceptsOutputValues)((c_, f_) => c_.copy(acceptsOutputValues = f_)) + } + final val PROJECT_FIELD_NUMBER = 1 + final val STACK_FIELD_NUMBER = 2 + final val CONFIG_FIELD_NUMBER = 3 + final val DRYRUN_FIELD_NUMBER = 4 + final val PARALLEL_FIELD_NUMBER = 5 + final val MONITORENDPOINT_FIELD_NUMBER = 6 + final val TYPE_FIELD_NUMBER = 7 + final val NAME_FIELD_NUMBER = 8 + final val PARENT_FIELD_NUMBER = 9 + final val INPUTS_FIELD_NUMBER = 10 + final val INPUTDEPENDENCIES_FIELD_NUMBER = 11 + final val PROVIDERS_FIELD_NUMBER = 13 + final val DEPENDENCIES_FIELD_NUMBER = 15 + final val CONFIGSECRETKEYS_FIELD_NUMBER = 16 + final val ORGANIZATION_FIELD_NUMBER = 17 + final val PROTECT_FIELD_NUMBER = 12 + final val ALIASES_FIELD_NUMBER = 14 + final val ADDITIONALSECRETOUTPUTS_FIELD_NUMBER = 18 + final val CUSTOMTIMEOUTS_FIELD_NUMBER = 19 + final val DELETEDWITH_FIELD_NUMBER = 20 + final val DELETEBEFOREREPLACE_FIELD_NUMBER = 21 + final val IGNORECHANGES_FIELD_NUMBER = 22 + final val REPLACEONCHANGES_FIELD_NUMBER = 23 + final val RETAINONDELETE_FIELD_NUMBER = 24 + final val ACCEPTS_OUTPUT_VALUES_FIELD_NUMBER = 25 + @transient + private[provider] val _typemapper_config: _root_.scalapb.TypeMapper[pulumirpc.provider.ConstructRequest.ConfigEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.provider.ConstructRequest.ConfigEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]] + @transient + private[provider] val _typemapper_inputDependencies: _root_.scalapb.TypeMapper[pulumirpc.provider.ConstructRequest.InputDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.provider.ConstructRequest.InputDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies)]] + @transient + private[provider] val _typemapper_providers: _root_.scalapb.TypeMapper[pulumirpc.provider.ConstructRequest.ProvidersEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.provider.ConstructRequest.ProvidersEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]] + def of( + project: _root_.scala.Predef.String, + stack: _root_.scala.Predef.String, + config: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String], + dryRun: _root_.scala.Boolean, + parallel: _root_.scala.Int, + monitorEndpoint: _root_.scala.Predef.String, + `type`: _root_.scala.Predef.String, + name: _root_.scala.Predef.String, + parent: _root_.scala.Predef.String, + inputs: _root_.scala.Option[com.google.protobuf.struct.Struct], + inputDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.ConstructRequest.PropertyDependencies], + providers: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String], + dependencies: _root_.scala.Seq[_root_.scala.Predef.String], + configSecretKeys: _root_.scala.Seq[_root_.scala.Predef.String], + organization: _root_.scala.Predef.String, + protect: _root_.scala.Boolean, + aliases: _root_.scala.Seq[_root_.scala.Predef.String], + additionalSecretOutputs: _root_.scala.Seq[_root_.scala.Predef.String], + customTimeouts: _root_.scala.Option[pulumirpc.provider.ConstructRequest.CustomTimeouts], + deletedWith: _root_.scala.Predef.String, + deleteBeforeReplace: _root_.scala.Boolean, + ignoreChanges: _root_.scala.Seq[_root_.scala.Predef.String], + replaceOnChanges: _root_.scala.Seq[_root_.scala.Predef.String], + retainOnDelete: _root_.scala.Boolean, + acceptsOutputValues: _root_.scala.Boolean + ): _root_.pulumirpc.provider.ConstructRequest = _root_.pulumirpc.provider.ConstructRequest( + project, + stack, + config, + dryRun, + parallel, + monitorEndpoint, + `type`, + name, + parent, + inputs, + inputDependencies, + providers, + dependencies, + configSecretKeys, + organization, + protect, + aliases, + additionalSecretOutputs, + customTimeouts, + deletedWith, + deleteBeforeReplace, + ignoreChanges, + replaceOnChanges, + retainOnDelete, + acceptsOutputValues + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConstructRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/ConstructResponse.scala b/besom-rpc/src/main/scala/pulumirpc/provider/ConstructResponse.scala new file mode 100644 index 00000000..bb53ab7b --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/ConstructResponse.scala @@ -0,0 +1,449 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param urn + * the URN of the component resource. + * @param state + * any properties that were computed during construction. + * @param stateDependencies + * a map from property keys to the dependencies of the property. + */ +@SerialVersionUID(0L) +final case class ConstructResponse( + urn: _root_.scala.Predef.String = "", + state: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + stateDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies] = _root_.scala.collection.immutable.Map.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ConstructResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (state.isDefined) { + val __value = state.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + stateDependencies.foreach { __item => + val __value = pulumirpc.provider.ConstructResponse._typemapper_stateDependencies.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + state.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + stateDependencies.foreach { __v => + val __m = pulumirpc.provider.ConstructResponse._typemapper_stateDependencies.toBase(__v) + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withUrn(__v: _root_.scala.Predef.String): ConstructResponse = copy(urn = __v) + def getState: com.google.protobuf.struct.Struct = state.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearState: ConstructResponse = copy(state = _root_.scala.None) + def withState(__v: com.google.protobuf.struct.Struct): ConstructResponse = copy(state = Option(__v)) + def clearStateDependencies = copy(stateDependencies = _root_.scala.collection.immutable.Map.empty) + def addStateDependencies(__vs: (_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies) *): ConstructResponse = addAllStateDependencies(__vs) + def addAllStateDependencies(__vs: Iterable[(_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies)]): ConstructResponse = copy(stateDependencies = stateDependencies ++ __vs) + def withStateDependencies(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies]): ConstructResponse = copy(stateDependencies = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = urn + if (__t != "") __t else null + } + case 2 => state.orNull + case 3 => stateDependencies.iterator.map(pulumirpc.provider.ConstructResponse._typemapper_stateDependencies.toBase(_)).toSeq + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(urn) + case 2 => state.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 3 => _root_.scalapb.descriptors.PRepeated(stateDependencies.iterator.map(pulumirpc.provider.ConstructResponse._typemapper_stateDependencies.toBase(_).toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConstructResponse.type = pulumirpc.provider.ConstructResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConstructResponse]) +} + +object ConstructResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConstructResponse = { + var __urn: _root_.scala.Predef.String = "" + var __state: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + val __stateDependencies: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urn = _input__.readStringRequireUtf8() + case 18 => + __state = _root_.scala.Option(__state.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 26 => + __stateDependencies += pulumirpc.provider.ConstructResponse._typemapper_stateDependencies.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.ConstructResponse.StateDependenciesEntry](_input__)) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConstructResponse( + urn = __urn, + state = __state, + stateDependencies = __stateDependencies.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConstructResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConstructResponse( + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + state = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + stateDependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.ConstructResponse.StateDependenciesEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.provider.ConstructResponse._typemapper_stateDependencies.toCustom(_)).toMap + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(23) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(23) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = com.google.protobuf.struct.Struct + case 3 => __out = pulumirpc.provider.ConstructResponse.StateDependenciesEntry + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.provider.ConstructResponse.PropertyDependencies, + _root_.pulumirpc.provider.ConstructResponse.StateDependenciesEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.provider.ConstructResponse( + urn = "", + state = _root_.scala.None, + stateDependencies = _root_.scala.collection.immutable.Map.empty + ) + /** PropertyDependencies describes the resources that a particular property depends on. + * + * @param urns + * A list of URNs this property depends on. + */ + @SerialVersionUID(0L) + final case class PropertyDependencies( + urns: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PropertyDependencies] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + urns.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + urns.foreach { __v => + val __m = __v + _output__.writeString(1, __m) + }; + unknownFields.writeTo(_output__) + } + def clearUrns = copy(urns = _root_.scala.Seq.empty) + def addUrns(__vs: _root_.scala.Predef.String *): PropertyDependencies = addAllUrns(__vs) + def addAllUrns(__vs: Iterable[_root_.scala.Predef.String]): PropertyDependencies = copy(urns = urns ++ __vs) + def withUrns(__v: _root_.scala.Seq[_root_.scala.Predef.String]): PropertyDependencies = copy(urns = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => urns + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(urns.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConstructResponse.PropertyDependencies.type = pulumirpc.provider.ConstructResponse.PropertyDependencies + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConstructResponse.PropertyDependencies]) + } + + object PropertyDependencies extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructResponse.PropertyDependencies] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructResponse.PropertyDependencies] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConstructResponse.PropertyDependencies = { + val __urns: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urns += _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConstructResponse.PropertyDependencies( + urns = __urns.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConstructResponse.PropertyDependencies] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConstructResponse.PropertyDependencies( + urns = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.ConstructResponse.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.ConstructResponse.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.provider.ConstructResponse.PropertyDependencies( + urns = _root_.scala.Seq.empty + ) + implicit class PropertyDependenciesLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConstructResponse.PropertyDependencies]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConstructResponse.PropertyDependencies](_l) { + def urns: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.urns)((c_, f_) => c_.copy(urns = f_)) + } + final val URNS_FIELD_NUMBER = 1 + def of( + urns: _root_.scala.Seq[_root_.scala.Predef.String] + ): _root_.pulumirpc.provider.ConstructResponse.PropertyDependencies = _root_.pulumirpc.provider.ConstructResponse.PropertyDependencies( + urns + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConstructResponse.PropertyDependencies]) + } + + @SerialVersionUID(0L) + final case class StateDependenciesEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Option[pulumirpc.provider.ConstructResponse.PropertyDependencies] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[StateDependenciesEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (value.isDefined) { + val __value = value.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + value.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): StateDependenciesEntry = copy(key = __v) + def getValue: pulumirpc.provider.ConstructResponse.PropertyDependencies = value.getOrElse(pulumirpc.provider.ConstructResponse.PropertyDependencies.defaultInstance) + def clearValue: StateDependenciesEntry = copy(value = _root_.scala.None) + def withValue(__v: pulumirpc.provider.ConstructResponse.PropertyDependencies): StateDependenciesEntry = copy(value = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => value.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => value.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ConstructResponse.StateDependenciesEntry.type = pulumirpc.provider.ConstructResponse.StateDependenciesEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ConstructResponse.StateDependenciesEntry]) + } + + object StateDependenciesEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructResponse.StateDependenciesEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ConstructResponse.StateDependenciesEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ConstructResponse.StateDependenciesEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Option[pulumirpc.provider.ConstructResponse.PropertyDependencies] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _root_.scala.Option(__value.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.ConstructResponse.PropertyDependencies](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ConstructResponse.StateDependenciesEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ConstructResponse.StateDependenciesEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ConstructResponse.StateDependenciesEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[pulumirpc.provider.ConstructResponse.PropertyDependencies]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.ConstructResponse.javaDescriptor.getNestedTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.ConstructResponse.scalaDescriptor.nestedMessages(1) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = pulumirpc.provider.ConstructResponse.PropertyDependencies + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.ConstructResponse.StateDependenciesEntry( + key = "", + value = _root_.scala.None + ) + implicit class StateDependenciesEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConstructResponse.StateDependenciesEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConstructResponse.StateDependenciesEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConstructResponse.PropertyDependencies] = field(_.getValue)((c_, f_) => c_.copy(value = _root_.scala.Option(f_))) + def optionalValue: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.provider.ConstructResponse.PropertyDependencies]] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.provider.ConstructResponse.StateDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies)] = + _root_.scalapb.TypeMapper[pulumirpc.provider.ConstructResponse.StateDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies)](__m => (__m.key, __m.getValue))(__p => pulumirpc.provider.ConstructResponse.StateDependenciesEntry(__p._1, Some(__p._2))) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Option[pulumirpc.provider.ConstructResponse.PropertyDependencies] + ): _root_.pulumirpc.provider.ConstructResponse.StateDependenciesEntry = _root_.pulumirpc.provider.ConstructResponse.StateDependenciesEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConstructResponse.StateDependenciesEntry]) + } + + implicit class ConstructResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ConstructResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ConstructResponse](_l) { + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + def state: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getState)((c_, f_) => c_.copy(state = _root_.scala.Option(f_))) + def optionalState: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.state)((c_, f_) => c_.copy(state = f_)) + def stateDependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies]] = field(_.stateDependencies)((c_, f_) => c_.copy(stateDependencies = f_)) + } + final val URN_FIELD_NUMBER = 1 + final val STATE_FIELD_NUMBER = 2 + final val STATEDEPENDENCIES_FIELD_NUMBER = 3 + @transient + private[provider] val _typemapper_stateDependencies: _root_.scalapb.TypeMapper[pulumirpc.provider.ConstructResponse.StateDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.provider.ConstructResponse.StateDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies)]] + def of( + urn: _root_.scala.Predef.String, + state: _root_.scala.Option[com.google.protobuf.struct.Struct], + stateDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.ConstructResponse.PropertyDependencies] + ): _root_.pulumirpc.provider.ConstructResponse = _root_.pulumirpc.provider.ConstructResponse( + urn, + state, + stateDependencies + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ConstructResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/CreateRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/CreateRequest.scala new file mode 100644 index 00000000..7fde34dd --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/CreateRequest.scala @@ -0,0 +1,219 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param urn + * the Pulumi URN for this resource. + * @param properties + * the provider inputs to set during creation. + * @param timeout + * the create request timeout represented in seconds. + * @param preview + * true if this is a preview and the provider should not actually create the resource. + */ +@SerialVersionUID(0L) +final case class CreateRequest( + urn: _root_.scala.Predef.String = "", + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + timeout: _root_.scala.Double = 0.0, + preview: _root_.scala.Boolean = false, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[CreateRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (properties.isDefined) { + val __value = properties.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + + { + val __value = timeout + if (__value != 0.0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeDoubleSize(3, __value) + } + }; + + { + val __value = preview + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(4, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + properties.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = timeout + if (__v != 0.0) { + _output__.writeDouble(3, __v) + } + }; + { + val __v = preview + if (__v != false) { + _output__.writeBool(4, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withUrn(__v: _root_.scala.Predef.String): CreateRequest = copy(urn = __v) + def getProperties: com.google.protobuf.struct.Struct = properties.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearProperties: CreateRequest = copy(properties = _root_.scala.None) + def withProperties(__v: com.google.protobuf.struct.Struct): CreateRequest = copy(properties = Option(__v)) + def withTimeout(__v: _root_.scala.Double): CreateRequest = copy(timeout = __v) + def withPreview(__v: _root_.scala.Boolean): CreateRequest = copy(preview = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = urn + if (__t != "") __t else null + } + case 2 => properties.orNull + case 3 => { + val __t = timeout + if (__t != 0.0) __t else null + } + case 4 => { + val __t = preview + if (__t != false) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(urn) + case 2 => properties.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 3 => _root_.scalapb.descriptors.PDouble(timeout) + case 4 => _root_.scalapb.descriptors.PBoolean(preview) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.CreateRequest.type = pulumirpc.provider.CreateRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CreateRequest]) +} + +object CreateRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.CreateRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.CreateRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.CreateRequest = { + var __urn: _root_.scala.Predef.String = "" + var __properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __timeout: _root_.scala.Double = 0.0 + var __preview: _root_.scala.Boolean = false + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urn = _input__.readStringRequireUtf8() + case 18 => + __properties = _root_.scala.Option(__properties.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 25 => + __timeout = _input__.readDouble() + case 32 => + __preview = _input__.readBool() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.CreateRequest( + urn = __urn, + properties = __properties, + timeout = __timeout, + preview = __preview, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.CreateRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.CreateRequest( + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + properties = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + timeout = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Double]).getOrElse(0.0), + preview = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Boolean]).getOrElse(false) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(15) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(15) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.CreateRequest( + urn = "", + properties = _root_.scala.None, + timeout = 0.0, + preview = false + ) + implicit class CreateRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CreateRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.CreateRequest](_l) { + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + def properties: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getProperties)((c_, f_) => c_.copy(properties = _root_.scala.Option(f_))) + def optionalProperties: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.properties)((c_, f_) => c_.copy(properties = f_)) + def timeout: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Double] = field(_.timeout)((c_, f_) => c_.copy(timeout = f_)) + def preview: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.preview)((c_, f_) => c_.copy(preview = f_)) + } + final val URN_FIELD_NUMBER = 1 + final val PROPERTIES_FIELD_NUMBER = 2 + final val TIMEOUT_FIELD_NUMBER = 3 + final val PREVIEW_FIELD_NUMBER = 4 + def of( + urn: _root_.scala.Predef.String, + properties: _root_.scala.Option[com.google.protobuf.struct.Struct], + timeout: _root_.scala.Double, + preview: _root_.scala.Boolean + ): _root_.pulumirpc.provider.CreateRequest = _root_.pulumirpc.provider.CreateRequest( + urn, + properties, + timeout, + preview + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CreateRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/CreateResponse.scala b/besom-rpc/src/main/scala/pulumirpc/provider/CreateResponse.scala new file mode 100644 index 00000000..96eec02a --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/CreateResponse.scala @@ -0,0 +1,157 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** NOTE: The partial-update-error equivalent of this message is `ErrorResourceInitFailed`. + * + * @param id + * the ID of the created resource. + * @param properties + * any properties that were computed during creation. + */ +@SerialVersionUID(0L) +final case class CreateResponse( + id: _root_.scala.Predef.String = "", + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[CreateResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = id + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (properties.isDefined) { + val __value = properties.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = id + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + properties.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withId(__v: _root_.scala.Predef.String): CreateResponse = copy(id = __v) + def getProperties: com.google.protobuf.struct.Struct = properties.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearProperties: CreateResponse = copy(properties = _root_.scala.None) + def withProperties(__v: com.google.protobuf.struct.Struct): CreateResponse = copy(properties = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = id + if (__t != "") __t else null + } + case 2 => properties.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(id) + case 2 => properties.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.CreateResponse.type = pulumirpc.provider.CreateResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.CreateResponse]) +} + +object CreateResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.CreateResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.CreateResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.CreateResponse = { + var __id: _root_.scala.Predef.String = "" + var __properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __id = _input__.readStringRequireUtf8() + case 18 => + __properties = _root_.scala.Option(__properties.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.CreateResponse( + id = __id, + properties = __properties, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.CreateResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.CreateResponse( + id = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + properties = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(16) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(16) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.CreateResponse( + id = "", + properties = _root_.scala.None + ) + implicit class CreateResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.CreateResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.CreateResponse](_l) { + def id: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.id)((c_, f_) => c_.copy(id = f_)) + def properties: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getProperties)((c_, f_) => c_.copy(properties = _root_.scala.Option(f_))) + def optionalProperties: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.properties)((c_, f_) => c_.copy(properties = f_)) + } + final val ID_FIELD_NUMBER = 1 + final val PROPERTIES_FIELD_NUMBER = 2 + def of( + id: _root_.scala.Predef.String, + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] + ): _root_.pulumirpc.provider.CreateResponse = _root_.pulumirpc.provider.CreateResponse( + id, + properties + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.CreateResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/DeleteRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/DeleteRequest.scala new file mode 100644 index 00000000..7af13ac7 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/DeleteRequest.scala @@ -0,0 +1,249 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param id + * the ID of the resource to delete. + * @param urn + * the Pulumi URN for this resource. + * @param properties + * the current properties on the resource. + * @param timeout + * the delete request timeout represented in seconds. + * @param oldInputs + * the old input values of the resource to delete. + */ +@SerialVersionUID(0L) +final case class DeleteRequest( + id: _root_.scala.Predef.String = "", + urn: _root_.scala.Predef.String = "", + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + timeout: _root_.scala.Double = 0.0, + oldInputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[DeleteRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = id + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + if (properties.isDefined) { + val __value = properties.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + + { + val __value = timeout + if (__value != 0.0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeDoubleSize(4, __value) + } + }; + if (oldInputs.isDefined) { + val __value = oldInputs.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = id + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + properties.foreach { __v => + val __m = __v + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = timeout + if (__v != 0.0) { + _output__.writeDouble(4, __v) + } + }; + oldInputs.foreach { __v => + val __m = __v + _output__.writeTag(5, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withId(__v: _root_.scala.Predef.String): DeleteRequest = copy(id = __v) + def withUrn(__v: _root_.scala.Predef.String): DeleteRequest = copy(urn = __v) + def getProperties: com.google.protobuf.struct.Struct = properties.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearProperties: DeleteRequest = copy(properties = _root_.scala.None) + def withProperties(__v: com.google.protobuf.struct.Struct): DeleteRequest = copy(properties = Option(__v)) + def withTimeout(__v: _root_.scala.Double): DeleteRequest = copy(timeout = __v) + def getOldInputs: com.google.protobuf.struct.Struct = oldInputs.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearOldInputs: DeleteRequest = copy(oldInputs = _root_.scala.None) + def withOldInputs(__v: com.google.protobuf.struct.Struct): DeleteRequest = copy(oldInputs = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = id + if (__t != "") __t else null + } + case 2 => { + val __t = urn + if (__t != "") __t else null + } + case 3 => properties.orNull + case 4 => { + val __t = timeout + if (__t != 0.0) __t else null + } + case 5 => oldInputs.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(id) + case 2 => _root_.scalapb.descriptors.PString(urn) + case 3 => properties.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 4 => _root_.scalapb.descriptors.PDouble(timeout) + case 5 => oldInputs.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.DeleteRequest.type = pulumirpc.provider.DeleteRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.DeleteRequest]) +} + +object DeleteRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.DeleteRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.DeleteRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.DeleteRequest = { + var __id: _root_.scala.Predef.String = "" + var __urn: _root_.scala.Predef.String = "" + var __properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __timeout: _root_.scala.Double = 0.0 + var __oldInputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __id = _input__.readStringRequireUtf8() + case 18 => + __urn = _input__.readStringRequireUtf8() + case 26 => + __properties = _root_.scala.Option(__properties.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 33 => + __timeout = _input__.readDouble() + case 42 => + __oldInputs = _root_.scala.Option(__oldInputs.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.DeleteRequest( + id = __id, + urn = __urn, + properties = __properties, + timeout = __timeout, + oldInputs = __oldInputs, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.DeleteRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.DeleteRequest( + id = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + properties = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + timeout = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Double]).getOrElse(0.0), + oldInputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(21) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(21) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 3 => __out = com.google.protobuf.struct.Struct + case 5 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.DeleteRequest( + id = "", + urn = "", + properties = _root_.scala.None, + timeout = 0.0, + oldInputs = _root_.scala.None + ) + implicit class DeleteRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.DeleteRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.DeleteRequest](_l) { + def id: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.id)((c_, f_) => c_.copy(id = f_)) + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + def properties: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getProperties)((c_, f_) => c_.copy(properties = _root_.scala.Option(f_))) + def optionalProperties: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.properties)((c_, f_) => c_.copy(properties = f_)) + def timeout: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Double] = field(_.timeout)((c_, f_) => c_.copy(timeout = f_)) + def oldInputs: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getOldInputs)((c_, f_) => c_.copy(oldInputs = _root_.scala.Option(f_))) + def optionalOldInputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.oldInputs)((c_, f_) => c_.copy(oldInputs = f_)) + } + final val ID_FIELD_NUMBER = 1 + final val URN_FIELD_NUMBER = 2 + final val PROPERTIES_FIELD_NUMBER = 3 + final val TIMEOUT_FIELD_NUMBER = 4 + final val OLD_INPUTS_FIELD_NUMBER = 5 + def of( + id: _root_.scala.Predef.String, + urn: _root_.scala.Predef.String, + properties: _root_.scala.Option[com.google.protobuf.struct.Struct], + timeout: _root_.scala.Double, + oldInputs: _root_.scala.Option[com.google.protobuf.struct.Struct] + ): _root_.pulumirpc.provider.DeleteRequest = _root_.pulumirpc.provider.DeleteRequest( + id, + urn, + properties, + timeout, + oldInputs + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.DeleteRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/DiffRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/DiffRequest.scala new file mode 100644 index 00000000..bd313e52 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/DiffRequest.scala @@ -0,0 +1,274 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param id + * the ID of the resource to diff. + * @param urn + * the Pulumi URN for this resource. + * @param olds + * the old output values of resource to diff. + * @param news + * the new input values of resource to diff. + * @param ignoreChanges + * a set of property paths that should be treated as unchanged. + * @param oldInputs + * the old input values of the resource to diff. + */ +@SerialVersionUID(0L) +final case class DiffRequest( + id: _root_.scala.Predef.String = "", + urn: _root_.scala.Predef.String = "", + olds: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + news: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + ignoreChanges: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + oldInputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[DiffRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = id + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + if (olds.isDefined) { + val __value = olds.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + if (news.isDefined) { + val __value = news.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + ignoreChanges.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(5, __value) + } + if (oldInputs.isDefined) { + val __value = oldInputs.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = id + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + olds.foreach { __v => + val __m = __v + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + news.foreach { __v => + val __m = __v + _output__.writeTag(4, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + ignoreChanges.foreach { __v => + val __m = __v + _output__.writeString(5, __m) + }; + oldInputs.foreach { __v => + val __m = __v + _output__.writeTag(6, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withId(__v: _root_.scala.Predef.String): DiffRequest = copy(id = __v) + def withUrn(__v: _root_.scala.Predef.String): DiffRequest = copy(urn = __v) + def getOlds: com.google.protobuf.struct.Struct = olds.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearOlds: DiffRequest = copy(olds = _root_.scala.None) + def withOlds(__v: com.google.protobuf.struct.Struct): DiffRequest = copy(olds = Option(__v)) + def getNews: com.google.protobuf.struct.Struct = news.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearNews: DiffRequest = copy(news = _root_.scala.None) + def withNews(__v: com.google.protobuf.struct.Struct): DiffRequest = copy(news = Option(__v)) + def clearIgnoreChanges = copy(ignoreChanges = _root_.scala.Seq.empty) + def addIgnoreChanges(__vs: _root_.scala.Predef.String *): DiffRequest = addAllIgnoreChanges(__vs) + def addAllIgnoreChanges(__vs: Iterable[_root_.scala.Predef.String]): DiffRequest = copy(ignoreChanges = ignoreChanges ++ __vs) + def withIgnoreChanges(__v: _root_.scala.Seq[_root_.scala.Predef.String]): DiffRequest = copy(ignoreChanges = __v) + def getOldInputs: com.google.protobuf.struct.Struct = oldInputs.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearOldInputs: DiffRequest = copy(oldInputs = _root_.scala.None) + def withOldInputs(__v: com.google.protobuf.struct.Struct): DiffRequest = copy(oldInputs = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = id + if (__t != "") __t else null + } + case 2 => { + val __t = urn + if (__t != "") __t else null + } + case 3 => olds.orNull + case 4 => news.orNull + case 5 => ignoreChanges + case 6 => oldInputs.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(id) + case 2 => _root_.scalapb.descriptors.PString(urn) + case 3 => olds.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 4 => news.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 5 => _root_.scalapb.descriptors.PRepeated(ignoreChanges.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 6 => oldInputs.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.DiffRequest.type = pulumirpc.provider.DiffRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.DiffRequest]) +} + +object DiffRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.DiffRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.DiffRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.DiffRequest = { + var __id: _root_.scala.Predef.String = "" + var __urn: _root_.scala.Predef.String = "" + var __olds: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __news: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + val __ignoreChanges: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __oldInputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __id = _input__.readStringRequireUtf8() + case 18 => + __urn = _input__.readStringRequireUtf8() + case 26 => + __olds = _root_.scala.Option(__olds.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 34 => + __news = _root_.scala.Option(__news.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 42 => + __ignoreChanges += _input__.readStringRequireUtf8() + case 50 => + __oldInputs = _root_.scala.Option(__oldInputs.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.DiffRequest( + id = __id, + urn = __urn, + olds = __olds, + news = __news, + ignoreChanges = __ignoreChanges.result(), + oldInputs = __oldInputs, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.DiffRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.DiffRequest( + id = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + olds = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + news = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + ignoreChanges = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + oldInputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(12) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(12) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 3 => __out = com.google.protobuf.struct.Struct + case 4 => __out = com.google.protobuf.struct.Struct + case 6 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.DiffRequest( + id = "", + urn = "", + olds = _root_.scala.None, + news = _root_.scala.None, + ignoreChanges = _root_.scala.Seq.empty, + oldInputs = _root_.scala.None + ) + implicit class DiffRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.DiffRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.DiffRequest](_l) { + def id: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.id)((c_, f_) => c_.copy(id = f_)) + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + def olds: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getOlds)((c_, f_) => c_.copy(olds = _root_.scala.Option(f_))) + def optionalOlds: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.olds)((c_, f_) => c_.copy(olds = f_)) + def news: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getNews)((c_, f_) => c_.copy(news = _root_.scala.Option(f_))) + def optionalNews: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.news)((c_, f_) => c_.copy(news = f_)) + def ignoreChanges: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.ignoreChanges)((c_, f_) => c_.copy(ignoreChanges = f_)) + def oldInputs: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getOldInputs)((c_, f_) => c_.copy(oldInputs = _root_.scala.Option(f_))) + def optionalOldInputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.oldInputs)((c_, f_) => c_.copy(oldInputs = f_)) + } + final val ID_FIELD_NUMBER = 1 + final val URN_FIELD_NUMBER = 2 + final val OLDS_FIELD_NUMBER = 3 + final val NEWS_FIELD_NUMBER = 4 + final val IGNORECHANGES_FIELD_NUMBER = 5 + final val OLD_INPUTS_FIELD_NUMBER = 6 + def of( + id: _root_.scala.Predef.String, + urn: _root_.scala.Predef.String, + olds: _root_.scala.Option[com.google.protobuf.struct.Struct], + news: _root_.scala.Option[com.google.protobuf.struct.Struct], + ignoreChanges: _root_.scala.Seq[_root_.scala.Predef.String], + oldInputs: _root_.scala.Option[com.google.protobuf.struct.Struct] + ): _root_.pulumirpc.provider.DiffRequest = _root_.pulumirpc.provider.DiffRequest( + id, + urn, + olds, + news, + ignoreChanges, + oldInputs + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.DiffRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/DiffResponse.scala b/besom-rpc/src/main/scala/pulumirpc/provider/DiffResponse.scala new file mode 100644 index 00000000..8ab8a720 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/DiffResponse.scala @@ -0,0 +1,539 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param replaces + * if this update requires a replacement, the set of properties triggering it. + * @param stables + * an optional list of properties that will not ever change. + * @param deleteBeforeReplace + * if true, this resource must be deleted before replacing it. + * @param changes + * if true, this diff represents an actual difference and thus requires an update. + * @param diffs + * a list of the properties that changed. + * @param detailedDiff + * detailedDiff is an optional field that contains map from each changed property to the type of the change. + * + * The keys of this map are property paths. These paths are essentially Javascript property access expressions + * in which all elements are literals, and obey the following EBNF-ish grammar: + * + * propertyName := [a-zA-Z_$] { [a-zA-Z0-9_$] } + * quotedPropertyName := '"' ( '&92;' '"' | [^"] ) { ( '&92;' '"' | [^"] ) } '"' + * arrayIndex := { [0-9] } + * + * propertyIndex := '[' ( quotedPropertyName | arrayIndex ) ']' + * rootProperty := ( propertyName | propertyIndex ) + * propertyAccessor := ( ( '.' propertyName ) | propertyIndex ) + * path := rootProperty { propertyAccessor } + * + * Examples of valid keys: + * - root + * - root.nested + * - root["nested"] + * - root.double.nest + * - root["double"].nest + * - root["double"]["nest"] + * - root.array[0] + * - root.array[100] + * - root.array[0].nested + * - root.array[0][1].nested + * - root.nested.array[0].double[1] + * - root["key with &92;"escaped&92;" quotes"] + * - root["key with a ."] + * - ["root key with &92;"escaped&92;" quotes"].nested + * - ["root key with a ."][100] + * a detailed diff appropriate for display. + * @param hasDetailedDiff + * true if this response contains a detailed diff. + */ +@SerialVersionUID(0L) +final case class DiffResponse( + replaces: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + stables: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + deleteBeforeReplace: _root_.scala.Boolean = false, + changes: pulumirpc.provider.DiffResponse.DiffChanges = pulumirpc.provider.DiffResponse.DiffChanges.DIFF_UNKNOWN, + diffs: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + detailedDiff: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff] = _root_.scala.collection.immutable.Map.empty, + hasDetailedDiff: _root_.scala.Boolean = false, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[DiffResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + replaces.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + stables.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + + { + val __value = deleteBeforeReplace + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(3, __value) + } + }; + + { + val __value = changes.value + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(4, __value) + } + }; + diffs.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(5, __value) + } + detailedDiff.foreach { __item => + val __value = pulumirpc.provider.DiffResponse._typemapper_detailedDiff.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = hasDetailedDiff + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(7, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + replaces.foreach { __v => + val __m = __v + _output__.writeString(1, __m) + }; + stables.foreach { __v => + val __m = __v + _output__.writeString(2, __m) + }; + { + val __v = deleteBeforeReplace + if (__v != false) { + _output__.writeBool(3, __v) + } + }; + { + val __v = changes.value + if (__v != 0) { + _output__.writeEnum(4, __v) + } + }; + diffs.foreach { __v => + val __m = __v + _output__.writeString(5, __m) + }; + detailedDiff.foreach { __v => + val __m = pulumirpc.provider.DiffResponse._typemapper_detailedDiff.toBase(__v) + _output__.writeTag(6, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = hasDetailedDiff + if (__v != false) { + _output__.writeBool(7, __v) + } + }; + unknownFields.writeTo(_output__) + } + def clearReplaces = copy(replaces = _root_.scala.Seq.empty) + def addReplaces(__vs: _root_.scala.Predef.String *): DiffResponse = addAllReplaces(__vs) + def addAllReplaces(__vs: Iterable[_root_.scala.Predef.String]): DiffResponse = copy(replaces = replaces ++ __vs) + def withReplaces(__v: _root_.scala.Seq[_root_.scala.Predef.String]): DiffResponse = copy(replaces = __v) + def clearStables = copy(stables = _root_.scala.Seq.empty) + def addStables(__vs: _root_.scala.Predef.String *): DiffResponse = addAllStables(__vs) + def addAllStables(__vs: Iterable[_root_.scala.Predef.String]): DiffResponse = copy(stables = stables ++ __vs) + def withStables(__v: _root_.scala.Seq[_root_.scala.Predef.String]): DiffResponse = copy(stables = __v) + def withDeleteBeforeReplace(__v: _root_.scala.Boolean): DiffResponse = copy(deleteBeforeReplace = __v) + def withChanges(__v: pulumirpc.provider.DiffResponse.DiffChanges): DiffResponse = copy(changes = __v) + def clearDiffs = copy(diffs = _root_.scala.Seq.empty) + def addDiffs(__vs: _root_.scala.Predef.String *): DiffResponse = addAllDiffs(__vs) + def addAllDiffs(__vs: Iterable[_root_.scala.Predef.String]): DiffResponse = copy(diffs = diffs ++ __vs) + def withDiffs(__v: _root_.scala.Seq[_root_.scala.Predef.String]): DiffResponse = copy(diffs = __v) + def clearDetailedDiff = copy(detailedDiff = _root_.scala.collection.immutable.Map.empty) + def addDetailedDiff(__vs: (_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff) *): DiffResponse = addAllDetailedDiff(__vs) + def addAllDetailedDiff(__vs: Iterable[(_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff)]): DiffResponse = copy(detailedDiff = detailedDiff ++ __vs) + def withDetailedDiff(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff]): DiffResponse = copy(detailedDiff = __v) + def withHasDetailedDiff(__v: _root_.scala.Boolean): DiffResponse = copy(hasDetailedDiff = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => replaces + case 2 => stables + case 3 => { + val __t = deleteBeforeReplace + if (__t != false) __t else null + } + case 4 => { + val __t = changes.javaValueDescriptor + if (__t.getNumber() != 0) __t else null + } + case 5 => diffs + case 6 => detailedDiff.iterator.map(pulumirpc.provider.DiffResponse._typemapper_detailedDiff.toBase(_)).toSeq + case 7 => { + val __t = hasDetailedDiff + if (__t != false) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(replaces.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 2 => _root_.scalapb.descriptors.PRepeated(stables.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 3 => _root_.scalapb.descriptors.PBoolean(deleteBeforeReplace) + case 4 => _root_.scalapb.descriptors.PEnum(changes.scalaValueDescriptor) + case 5 => _root_.scalapb.descriptors.PRepeated(diffs.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 6 => _root_.scalapb.descriptors.PRepeated(detailedDiff.iterator.map(pulumirpc.provider.DiffResponse._typemapper_detailedDiff.toBase(_).toPMessage).toVector) + case 7 => _root_.scalapb.descriptors.PBoolean(hasDetailedDiff) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.DiffResponse.type = pulumirpc.provider.DiffResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.DiffResponse]) +} + +object DiffResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.DiffResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.DiffResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.DiffResponse = { + val __replaces: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + val __stables: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __deleteBeforeReplace: _root_.scala.Boolean = false + var __changes: pulumirpc.provider.DiffResponse.DiffChanges = pulumirpc.provider.DiffResponse.DiffChanges.DIFF_UNKNOWN + val __diffs: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + val __detailedDiff: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff] + var __hasDetailedDiff: _root_.scala.Boolean = false + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __replaces += _input__.readStringRequireUtf8() + case 18 => + __stables += _input__.readStringRequireUtf8() + case 24 => + __deleteBeforeReplace = _input__.readBool() + case 32 => + __changes = pulumirpc.provider.DiffResponse.DiffChanges.fromValue(_input__.readEnum()) + case 42 => + __diffs += _input__.readStringRequireUtf8() + case 50 => + __detailedDiff += pulumirpc.provider.DiffResponse._typemapper_detailedDiff.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.DiffResponse.DetailedDiffEntry](_input__)) + case 56 => + __hasDetailedDiff = _input__.readBool() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.DiffResponse( + replaces = __replaces.result(), + stables = __stables.result(), + deleteBeforeReplace = __deleteBeforeReplace, + changes = __changes, + diffs = __diffs.result(), + detailedDiff = __detailedDiff.result(), + hasDetailedDiff = __hasDetailedDiff, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.DiffResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.DiffResponse( + replaces = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + stables = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + deleteBeforeReplace = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + changes = pulumirpc.provider.DiffResponse.DiffChanges.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(pulumirpc.provider.DiffResponse.DiffChanges.DIFF_UNKNOWN.scalaValueDescriptor).number), + diffs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + detailedDiff = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.DiffResponse.DetailedDiffEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.provider.DiffResponse._typemapper_detailedDiff.toCustom(_)).toMap, + hasDetailedDiff = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Boolean]).getOrElse(false) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(14) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(14) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 6 => __out = pulumirpc.provider.DiffResponse.DetailedDiffEntry + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.provider.DiffResponse.DetailedDiffEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 4 => pulumirpc.provider.DiffResponse.DiffChanges + } + } + lazy val defaultInstance = pulumirpc.provider.DiffResponse( + replaces = _root_.scala.Seq.empty, + stables = _root_.scala.Seq.empty, + deleteBeforeReplace = false, + changes = pulumirpc.provider.DiffResponse.DiffChanges.DIFF_UNKNOWN, + diffs = _root_.scala.Seq.empty, + detailedDiff = _root_.scala.collection.immutable.Map.empty, + hasDetailedDiff = false + ) + sealed abstract class DiffChanges(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum { + type EnumType = pulumirpc.provider.DiffResponse.DiffChanges + type RecognizedType = pulumirpc.provider.DiffResponse.DiffChanges.Recognized + def isDiffUnknown: _root_.scala.Boolean = false + def isDiffNone: _root_.scala.Boolean = false + def isDiffSome: _root_.scala.Boolean = false + def companion: _root_.scalapb.GeneratedEnumCompanion[DiffChanges] = pulumirpc.provider.DiffResponse.DiffChanges + final def asRecognized: _root_.scala.Option[pulumirpc.provider.DiffResponse.DiffChanges.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[pulumirpc.provider.DiffResponse.DiffChanges.Recognized]) + } + + object DiffChanges extends _root_.scalapb.GeneratedEnumCompanion[DiffChanges] { + sealed trait Recognized extends DiffChanges + implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[DiffChanges] = this + + /** unknown whether there are changes or not (legacy behavior). + */ + @SerialVersionUID(0L) + case object DIFF_UNKNOWN extends DiffChanges(0) with DiffChanges.Recognized { + val index = 0 + val name = "DIFF_UNKNOWN" + override def isDiffUnknown: _root_.scala.Boolean = true + } + + /** the diff was performed, and no changes were detected that require an update. + */ + @SerialVersionUID(0L) + case object DIFF_NONE extends DiffChanges(1) with DiffChanges.Recognized { + val index = 1 + val name = "DIFF_NONE" + override def isDiffNone: _root_.scala.Boolean = true + } + + /** the diff was performed, and changes were detected that require an update or replacement. + */ + @SerialVersionUID(0L) + case object DIFF_SOME extends DiffChanges(2) with DiffChanges.Recognized { + val index = 2 + val name = "DIFF_SOME" + override def isDiffSome: _root_.scala.Boolean = true + } + + @SerialVersionUID(0L) + final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends DiffChanges(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum + lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(DIFF_UNKNOWN, DIFF_NONE, DIFF_SOME) + def fromValue(__value: _root_.scala.Int): DiffChanges = __value match { + case 0 => DIFF_UNKNOWN + case 1 => DIFF_NONE + case 2 => DIFF_SOME + case __other => Unrecognized(__other) + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = pulumirpc.provider.DiffResponse.javaDescriptor.getEnumTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = pulumirpc.provider.DiffResponse.scalaDescriptor.enums(0) + } + @SerialVersionUID(0L) + final case class DetailedDiffEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Option[pulumirpc.provider.PropertyDiff] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[DetailedDiffEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (value.isDefined) { + val __value = value.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + value.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): DetailedDiffEntry = copy(key = __v) + def getValue: pulumirpc.provider.PropertyDiff = value.getOrElse(pulumirpc.provider.PropertyDiff.defaultInstance) + def clearValue: DetailedDiffEntry = copy(value = _root_.scala.None) + def withValue(__v: pulumirpc.provider.PropertyDiff): DetailedDiffEntry = copy(value = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => value.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => value.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.DiffResponse.DetailedDiffEntry.type = pulumirpc.provider.DiffResponse.DetailedDiffEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.DiffResponse.DetailedDiffEntry]) + } + + object DetailedDiffEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.DiffResponse.DetailedDiffEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.DiffResponse.DetailedDiffEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.DiffResponse.DetailedDiffEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Option[pulumirpc.provider.PropertyDiff] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _root_.scala.Option(__value.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.provider.PropertyDiff](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.DiffResponse.DetailedDiffEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.DiffResponse.DetailedDiffEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.DiffResponse.DetailedDiffEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[pulumirpc.provider.PropertyDiff]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.provider.DiffResponse.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.provider.DiffResponse.scalaDescriptor.nestedMessages(0) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = pulumirpc.provider.PropertyDiff + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.DiffResponse.DetailedDiffEntry( + key = "", + value = _root_.scala.None + ) + implicit class DetailedDiffEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.DiffResponse.DetailedDiffEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.DiffResponse.DetailedDiffEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.PropertyDiff] = field(_.getValue)((c_, f_) => c_.copy(value = _root_.scala.Option(f_))) + def optionalValue: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.provider.PropertyDiff]] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.provider.DiffResponse.DetailedDiffEntry, (_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff)] = + _root_.scalapb.TypeMapper[pulumirpc.provider.DiffResponse.DetailedDiffEntry, (_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff)](__m => (__m.key, __m.getValue))(__p => pulumirpc.provider.DiffResponse.DetailedDiffEntry(__p._1, Some(__p._2))) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Option[pulumirpc.provider.PropertyDiff] + ): _root_.pulumirpc.provider.DiffResponse.DetailedDiffEntry = _root_.pulumirpc.provider.DiffResponse.DetailedDiffEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.DiffResponse.DetailedDiffEntry]) + } + + implicit class DiffResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.DiffResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.DiffResponse](_l) { + def replaces: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.replaces)((c_, f_) => c_.copy(replaces = f_)) + def stables: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.stables)((c_, f_) => c_.copy(stables = f_)) + def deleteBeforeReplace: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.deleteBeforeReplace)((c_, f_) => c_.copy(deleteBeforeReplace = f_)) + def changes: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.DiffResponse.DiffChanges] = field(_.changes)((c_, f_) => c_.copy(changes = f_)) + def diffs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.diffs)((c_, f_) => c_.copy(diffs = f_)) + def detailedDiff: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff]] = field(_.detailedDiff)((c_, f_) => c_.copy(detailedDiff = f_)) + def hasDetailedDiff: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.hasDetailedDiff)((c_, f_) => c_.copy(hasDetailedDiff = f_)) + } + final val REPLACES_FIELD_NUMBER = 1 + final val STABLES_FIELD_NUMBER = 2 + final val DELETEBEFOREREPLACE_FIELD_NUMBER = 3 + final val CHANGES_FIELD_NUMBER = 4 + final val DIFFS_FIELD_NUMBER = 5 + final val DETAILEDDIFF_FIELD_NUMBER = 6 + final val HASDETAILEDDIFF_FIELD_NUMBER = 7 + @transient + private[provider] val _typemapper_detailedDiff: _root_.scalapb.TypeMapper[pulumirpc.provider.DiffResponse.DetailedDiffEntry, (_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.provider.DiffResponse.DetailedDiffEntry, (_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff)]] + def of( + replaces: _root_.scala.Seq[_root_.scala.Predef.String], + stables: _root_.scala.Seq[_root_.scala.Predef.String], + deleteBeforeReplace: _root_.scala.Boolean, + changes: pulumirpc.provider.DiffResponse.DiffChanges, + diffs: _root_.scala.Seq[_root_.scala.Predef.String], + detailedDiff: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.provider.PropertyDiff], + hasDetailedDiff: _root_.scala.Boolean + ): _root_.pulumirpc.provider.DiffResponse = _root_.pulumirpc.provider.DiffResponse( + replaces, + stables, + deleteBeforeReplace, + changes, + diffs, + detailedDiff, + hasDetailedDiff + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.DiffResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/ErrorResourceInitFailed.scala b/besom-rpc/src/main/scala/pulumirpc/provider/ErrorResourceInitFailed.scala new file mode 100644 index 00000000..114fb0f5 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/ErrorResourceInitFailed.scala @@ -0,0 +1,215 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** ErrorResourceInitFailed is sent as a Detail `ResourceProvider.{Create, Update}` fail because a + * resource was created successfully, but failed to initialize. + * + * @param id + * the ID of the created resource. + * @param properties + * any properties that were computed during updating. + * @param reasons + * error messages associated with initialization failure. + * @param inputs + * the current inputs to this resource (only applicable for Read) + */ +@SerialVersionUID(0L) +final case class ErrorResourceInitFailed( + id: _root_.scala.Predef.String = "", + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + reasons: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ErrorResourceInitFailed] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = id + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (properties.isDefined) { + val __value = properties.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + reasons.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + if (inputs.isDefined) { + val __value = inputs.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = id + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + properties.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + reasons.foreach { __v => + val __m = __v + _output__.writeString(3, __m) + }; + inputs.foreach { __v => + val __m = __v + _output__.writeTag(4, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withId(__v: _root_.scala.Predef.String): ErrorResourceInitFailed = copy(id = __v) + def getProperties: com.google.protobuf.struct.Struct = properties.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearProperties: ErrorResourceInitFailed = copy(properties = _root_.scala.None) + def withProperties(__v: com.google.protobuf.struct.Struct): ErrorResourceInitFailed = copy(properties = Option(__v)) + def clearReasons = copy(reasons = _root_.scala.Seq.empty) + def addReasons(__vs: _root_.scala.Predef.String *): ErrorResourceInitFailed = addAllReasons(__vs) + def addAllReasons(__vs: Iterable[_root_.scala.Predef.String]): ErrorResourceInitFailed = copy(reasons = reasons ++ __vs) + def withReasons(__v: _root_.scala.Seq[_root_.scala.Predef.String]): ErrorResourceInitFailed = copy(reasons = __v) + def getInputs: com.google.protobuf.struct.Struct = inputs.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearInputs: ErrorResourceInitFailed = copy(inputs = _root_.scala.None) + def withInputs(__v: com.google.protobuf.struct.Struct): ErrorResourceInitFailed = copy(inputs = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = id + if (__t != "") __t else null + } + case 2 => properties.orNull + case 3 => reasons + case 4 => inputs.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(id) + case 2 => properties.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 3 => _root_.scalapb.descriptors.PRepeated(reasons.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 4 => inputs.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ErrorResourceInitFailed.type = pulumirpc.provider.ErrorResourceInitFailed + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ErrorResourceInitFailed]) +} + +object ErrorResourceInitFailed extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ErrorResourceInitFailed] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ErrorResourceInitFailed] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ErrorResourceInitFailed = { + var __id: _root_.scala.Predef.String = "" + var __properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + val __reasons: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __id = _input__.readStringRequireUtf8() + case 18 => + __properties = _root_.scala.Option(__properties.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 26 => + __reasons += _input__.readStringRequireUtf8() + case 34 => + __inputs = _root_.scala.Option(__inputs.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ErrorResourceInitFailed( + id = __id, + properties = __properties, + reasons = __reasons.result(), + inputs = __inputs, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ErrorResourceInitFailed] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ErrorResourceInitFailed( + id = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + properties = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + reasons = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + inputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(24) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(24) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = com.google.protobuf.struct.Struct + case 4 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.ErrorResourceInitFailed( + id = "", + properties = _root_.scala.None, + reasons = _root_.scala.Seq.empty, + inputs = _root_.scala.None + ) + implicit class ErrorResourceInitFailedLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ErrorResourceInitFailed]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ErrorResourceInitFailed](_l) { + def id: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.id)((c_, f_) => c_.copy(id = f_)) + def properties: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getProperties)((c_, f_) => c_.copy(properties = _root_.scala.Option(f_))) + def optionalProperties: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.properties)((c_, f_) => c_.copy(properties = f_)) + def reasons: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.reasons)((c_, f_) => c_.copy(reasons = f_)) + def inputs: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getInputs)((c_, f_) => c_.copy(inputs = _root_.scala.Option(f_))) + def optionalInputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.inputs)((c_, f_) => c_.copy(inputs = f_)) + } + final val ID_FIELD_NUMBER = 1 + final val PROPERTIES_FIELD_NUMBER = 2 + final val REASONS_FIELD_NUMBER = 3 + final val INPUTS_FIELD_NUMBER = 4 + def of( + id: _root_.scala.Predef.String, + properties: _root_.scala.Option[com.google.protobuf.struct.Struct], + reasons: _root_.scala.Seq[_root_.scala.Predef.String], + inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] + ): _root_.pulumirpc.provider.ErrorResourceInitFailed = _root_.pulumirpc.provider.ErrorResourceInitFailed( + id, + properties, + reasons, + inputs + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ErrorResourceInitFailed]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/GetMappingRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/GetMappingRequest.scala new file mode 100644 index 00000000..2de9cdfb --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/GetMappingRequest.scala @@ -0,0 +1,159 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** GetMappingRequest allows providers to return ecosystem specific information to allow the provider to be + * converted from a source markup to Pulumi. It's expected that provider bridges that target a given ecosystem + * (e.g. Terraform, Kubernetes) would also publish a conversion plugin to convert markup from that ecosystem + * to Pulumi, using the bridged providers. + * + * @param key + * the conversion key for the mapping being requested. + * @param provider + * the optional provider key for the mapping being requested, if this is empty the provider should assume this + * request is from an old engine from before GetMappings and should return it's "primary" mapping. If this is set + * then the `provider` field in GetMappingResponse should be the same. + */ +@SerialVersionUID(0L) +final case class GetMappingRequest( + key: _root_.scala.Predef.String = "", + provider: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GetMappingRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = provider + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = provider + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): GetMappingRequest = copy(key = __v) + def withProvider(__v: _root_.scala.Predef.String): GetMappingRequest = copy(provider = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = provider + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PString(provider) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.GetMappingRequest.type = pulumirpc.provider.GetMappingRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GetMappingRequest]) +} + +object GetMappingRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.GetMappingRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.GetMappingRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.GetMappingRequest = { + var __key: _root_.scala.Predef.String = "" + var __provider: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __provider = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.GetMappingRequest( + key = __key, + provider = __provider, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.GetMappingRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.GetMappingRequest( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + provider = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(25) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(25) + 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) + lazy val defaultInstance = pulumirpc.provider.GetMappingRequest( + key = "", + provider = "" + ) + implicit class GetMappingRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.GetMappingRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.GetMappingRequest](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def provider: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.provider)((c_, f_) => c_.copy(provider = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val PROVIDER_FIELD_NUMBER = 2 + def of( + key: _root_.scala.Predef.String, + provider: _root_.scala.Predef.String + ): _root_.pulumirpc.provider.GetMappingRequest = _root_.pulumirpc.provider.GetMappingRequest( + key, + provider + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GetMappingRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/GetMappingResponse.scala b/besom-rpc/src/main/scala/pulumirpc/provider/GetMappingResponse.scala new file mode 100644 index 00000000..944a24c2 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/GetMappingResponse.scala @@ -0,0 +1,155 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** GetMappingResponse returns convert plugin specific data for this provider. This will normally be human + * readable JSON, but the engine doesn't mandate any form. + * + * @param provider + * the provider key this is mapping for. For example the Pulumi provider "terraform-template" would return "template" for this. + * @param data + * the conversion plugin specific data. + */ +@SerialVersionUID(0L) +final case class GetMappingResponse( + provider: _root_.scala.Predef.String = "", + data: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GetMappingResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = provider + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = data + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = provider + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = data + if (!__v.isEmpty) { + _output__.writeBytes(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withProvider(__v: _root_.scala.Predef.String): GetMappingResponse = copy(provider = __v) + def withData(__v: _root_.com.google.protobuf.ByteString): GetMappingResponse = copy(data = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = provider + if (__t != "") __t else null + } + case 2 => { + val __t = data + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(provider) + case 2 => _root_.scalapb.descriptors.PByteString(data) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.GetMappingResponse.type = pulumirpc.provider.GetMappingResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GetMappingResponse]) +} + +object GetMappingResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.GetMappingResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.GetMappingResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.GetMappingResponse = { + var __provider: _root_.scala.Predef.String = "" + var __data: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __provider = _input__.readStringRequireUtf8() + case 18 => + __data = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.GetMappingResponse( + provider = __provider, + data = __data, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.GetMappingResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.GetMappingResponse( + provider = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + data = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(26) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(26) + 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) + lazy val defaultInstance = pulumirpc.provider.GetMappingResponse( + provider = "", + data = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class GetMappingResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.GetMappingResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.GetMappingResponse](_l) { + def provider: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.provider)((c_, f_) => c_.copy(provider = f_)) + def data: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.data)((c_, f_) => c_.copy(data = f_)) + } + final val PROVIDER_FIELD_NUMBER = 1 + final val DATA_FIELD_NUMBER = 2 + def of( + provider: _root_.scala.Predef.String, + data: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.provider.GetMappingResponse = _root_.pulumirpc.provider.GetMappingResponse( + provider, + data + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GetMappingResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/GetMappingsRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/GetMappingsRequest.scala new file mode 100644 index 00000000..d011b9c2 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/GetMappingsRequest.scala @@ -0,0 +1,123 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** GetMappingsRequest allows providers to return ecosystem specific information without having to send back large data + * blobs for provider mappings that the engine doesn't then need. + * + * @param key + * the conversion key for the mapping being requested. + */ +@SerialVersionUID(0L) +final case class GetMappingsRequest( + key: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GetMappingsRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): GetMappingsRequest = copy(key = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.GetMappingsRequest.type = pulumirpc.provider.GetMappingsRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GetMappingsRequest]) +} + +object GetMappingsRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.GetMappingsRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.GetMappingsRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.GetMappingsRequest = { + var __key: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.GetMappingsRequest( + key = __key, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.GetMappingsRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.GetMappingsRequest( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(27) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(27) + 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) + lazy val defaultInstance = pulumirpc.provider.GetMappingsRequest( + key = "" + ) + implicit class GetMappingsRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.GetMappingsRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.GetMappingsRequest](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + } + final val KEY_FIELD_NUMBER = 1 + def of( + key: _root_.scala.Predef.String + ): _root_.pulumirpc.provider.GetMappingsRequest = _root_.pulumirpc.provider.GetMappingsRequest( + key + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GetMappingsRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/GetMappingsResponse.scala b/besom-rpc/src/main/scala/pulumirpc/provider/GetMappingsResponse.scala new file mode 100644 index 00000000..e5bc416e --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/GetMappingsResponse.scala @@ -0,0 +1,118 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** GetMappingsRequest returns a list of providers that this provider can provide mapping information for. + * + * @param providers + * the provider keys this provider can supply mappings for. For example the Pulumi provider "terraform-template" + * would return ["template"] for this. + */ +@SerialVersionUID(0L) +final case class GetMappingsResponse( + providers: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GetMappingsResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + providers.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + providers.foreach { __v => + val __m = __v + _output__.writeString(1, __m) + }; + unknownFields.writeTo(_output__) + } + def clearProviders = copy(providers = _root_.scala.Seq.empty) + def addProviders(__vs: _root_.scala.Predef.String *): GetMappingsResponse = addAllProviders(__vs) + def addAllProviders(__vs: Iterable[_root_.scala.Predef.String]): GetMappingsResponse = copy(providers = providers ++ __vs) + def withProviders(__v: _root_.scala.Seq[_root_.scala.Predef.String]): GetMappingsResponse = copy(providers = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => providers + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(providers.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.GetMappingsResponse.type = pulumirpc.provider.GetMappingsResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GetMappingsResponse]) +} + +object GetMappingsResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.GetMappingsResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.GetMappingsResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.GetMappingsResponse = { + val __providers: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __providers += _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.GetMappingsResponse( + providers = __providers.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.GetMappingsResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.GetMappingsResponse( + providers = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(28) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(28) + 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) + lazy val defaultInstance = pulumirpc.provider.GetMappingsResponse( + providers = _root_.scala.Seq.empty + ) + implicit class GetMappingsResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.GetMappingsResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.GetMappingsResponse](_l) { + def providers: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.providers)((c_, f_) => c_.copy(providers = f_)) + } + final val PROVIDERS_FIELD_NUMBER = 1 + def of( + providers: _root_.scala.Seq[_root_.scala.Predef.String] + ): _root_.pulumirpc.provider.GetMappingsResponse = _root_.pulumirpc.provider.GetMappingsResponse( + providers + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GetMappingsResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/GetSchemaRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/GetSchemaRequest.scala new file mode 100644 index 00000000..39c77304 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/GetSchemaRequest.scala @@ -0,0 +1,120 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param version + * the schema version. + */ +@SerialVersionUID(0L) +final case class GetSchemaRequest( + version: _root_.scala.Int = 0, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GetSchemaRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = version + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(1, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = version + if (__v != 0) { + _output__.writeInt32(1, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withVersion(__v: _root_.scala.Int): GetSchemaRequest = copy(version = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = version + if (__t != 0) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PInt(version) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.GetSchemaRequest.type = pulumirpc.provider.GetSchemaRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GetSchemaRequest]) +} + +object GetSchemaRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.GetSchemaRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.GetSchemaRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.GetSchemaRequest = { + var __version: _root_.scala.Int = 0 + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 8 => + __version = _input__.readInt32() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.GetSchemaRequest( + version = __version, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.GetSchemaRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.GetSchemaRequest( + version = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Int]).getOrElse(0) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.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) + lazy val defaultInstance = pulumirpc.provider.GetSchemaRequest( + version = 0 + ) + implicit class GetSchemaRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.GetSchemaRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.GetSchemaRequest](_l) { + def version: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.version)((c_, f_) => c_.copy(version = f_)) + } + final val VERSION_FIELD_NUMBER = 1 + def of( + version: _root_.scala.Int + ): _root_.pulumirpc.provider.GetSchemaRequest = _root_.pulumirpc.provider.GetSchemaRequest( + version + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GetSchemaRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/GetSchemaResponse.scala b/besom-rpc/src/main/scala/pulumirpc/provider/GetSchemaResponse.scala new file mode 100644 index 00000000..f7e2e8ff --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/GetSchemaResponse.scala @@ -0,0 +1,120 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param schema + * the JSON-encoded schema. + */ +@SerialVersionUID(0L) +final case class GetSchemaResponse( + schema: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[GetSchemaResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = schema + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = schema + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withSchema(__v: _root_.scala.Predef.String): GetSchemaResponse = copy(schema = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = schema + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(schema) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.GetSchemaResponse.type = pulumirpc.provider.GetSchemaResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.GetSchemaResponse]) +} + +object GetSchemaResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.GetSchemaResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.GetSchemaResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.GetSchemaResponse = { + var __schema: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __schema = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.GetSchemaResponse( + schema = __schema, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.GetSchemaResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.GetSchemaResponse( + schema = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.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) + lazy val defaultInstance = pulumirpc.provider.GetSchemaResponse( + schema = "" + ) + implicit class GetSchemaResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.GetSchemaResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.GetSchemaResponse](_l) { + def schema: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.schema)((c_, f_) => c_.copy(schema = f_)) + } + final val SCHEMA_FIELD_NUMBER = 1 + def of( + schema: _root_.scala.Predef.String + ): _root_.pulumirpc.provider.GetSchemaResponse = _root_.pulumirpc.provider.GetSchemaResponse( + schema + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.GetSchemaResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/InvokeRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/InvokeRequest.scala new file mode 100644 index 00000000..e93cea0a --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/InvokeRequest.scala @@ -0,0 +1,155 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param tok + * the function token to invoke. + * @param args + * the arguments for the function invocation. + */ +@SerialVersionUID(0L) +final case class InvokeRequest( + tok: _root_.scala.Predef.String = "", + args: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[InvokeRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = tok + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (args.isDefined) { + val __value = args.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = tok + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + args.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withTok(__v: _root_.scala.Predef.String): InvokeRequest = copy(tok = __v) + def getArgs: com.google.protobuf.struct.Struct = args.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearArgs: InvokeRequest = copy(args = _root_.scala.None) + def withArgs(__v: com.google.protobuf.struct.Struct): InvokeRequest = copy(args = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = tok + if (__t != "") __t else null + } + case 2 => args.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(tok) + case 2 => args.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.InvokeRequest.type = pulumirpc.provider.InvokeRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.InvokeRequest]) +} + +object InvokeRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.InvokeRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.InvokeRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.InvokeRequest = { + var __tok: _root_.scala.Predef.String = "" + var __args: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __tok = _input__.readStringRequireUtf8() + case 18 => + __args = _root_.scala.Option(__args.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.InvokeRequest( + tok = __tok, + args = __args, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.InvokeRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.InvokeRequest( + tok = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + args = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(5) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(5) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.InvokeRequest( + tok = "", + args = _root_.scala.None + ) + implicit class InvokeRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.InvokeRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.InvokeRequest](_l) { + def tok: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.tok)((c_, f_) => c_.copy(tok = f_)) + def args: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getArgs)((c_, f_) => c_.copy(args = _root_.scala.Option(f_))) + def optionalArgs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.args)((c_, f_) => c_.copy(args = f_)) + } + final val TOK_FIELD_NUMBER = 1 + final val ARGS_FIELD_NUMBER = 2 + def of( + tok: _root_.scala.Predef.String, + args: _root_.scala.Option[com.google.protobuf.struct.Struct] + ): _root_.pulumirpc.provider.InvokeRequest = _root_.pulumirpc.provider.InvokeRequest( + tok, + args + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.InvokeRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/InvokeResponse.scala b/besom-rpc/src/main/scala/pulumirpc/provider/InvokeResponse.scala new file mode 100644 index 00000000..fb43951b --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/InvokeResponse.scala @@ -0,0 +1,153 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param return + * the returned values, if invoke was successful. + * @param failures + * the failures if any arguments didn't pass verification. + */ +@SerialVersionUID(0L) +final case class InvokeResponse( + `return`: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + failures: _root_.scala.Seq[pulumirpc.provider.CheckFailure] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[InvokeResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + if (`return`.isDefined) { + val __value = `return`.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + failures.foreach { __item => + val __value = __item + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + `return`.foreach { __v => + val __m = __v + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + failures.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def getReturn: com.google.protobuf.struct.Struct = `return`.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearReturn: InvokeResponse = copy(`return` = _root_.scala.None) + def withReturn(__v: com.google.protobuf.struct.Struct): InvokeResponse = copy(`return` = Option(__v)) + def clearFailures = copy(failures = _root_.scala.Seq.empty) + def addFailures(__vs: pulumirpc.provider.CheckFailure *): InvokeResponse = addAllFailures(__vs) + def addAllFailures(__vs: Iterable[pulumirpc.provider.CheckFailure]): InvokeResponse = copy(failures = failures ++ __vs) + def withFailures(__v: _root_.scala.Seq[pulumirpc.provider.CheckFailure]): InvokeResponse = copy(failures = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => `return`.orNull + case 2 => failures + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => `return`.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 2 => _root_.scalapb.descriptors.PRepeated(failures.iterator.map(_.toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.InvokeResponse.type = pulumirpc.provider.InvokeResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.InvokeResponse]) +} + +object InvokeResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.InvokeResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.InvokeResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.InvokeResponse = { + var __return: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + val __failures: _root_.scala.collection.immutable.VectorBuilder[pulumirpc.provider.CheckFailure] = new _root_.scala.collection.immutable.VectorBuilder[pulumirpc.provider.CheckFailure] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __return = _root_.scala.Option(__return.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 18 => + __failures += _root_.scalapb.LiteParser.readMessage[pulumirpc.provider.CheckFailure](_input__) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.InvokeResponse( + `return` = __return, + failures = __failures.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.InvokeResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.InvokeResponse( + `return` = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + failures = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Seq[pulumirpc.provider.CheckFailure]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(6) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(6) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = com.google.protobuf.struct.Struct + case 2 => __out = pulumirpc.provider.CheckFailure + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.InvokeResponse( + `return` = _root_.scala.None, + failures = _root_.scala.Seq.empty + ) + implicit class InvokeResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.InvokeResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.InvokeResponse](_l) { + def `return`: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getReturn)((c_, f_) => c_.copy(`return` = _root_.scala.Option(f_))) + def optionalReturn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.`return`)((c_, f_) => c_.copy(`return` = f_)) + def failures: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[pulumirpc.provider.CheckFailure]] = field(_.failures)((c_, f_) => c_.copy(failures = f_)) + } + final val RETURN_FIELD_NUMBER = 1 + final val FAILURES_FIELD_NUMBER = 2 + def of( + `return`: _root_.scala.Option[com.google.protobuf.struct.Struct], + failures: _root_.scala.Seq[pulumirpc.provider.CheckFailure] + ): _root_.pulumirpc.provider.InvokeResponse = _root_.pulumirpc.provider.InvokeResponse( + `return`, + failures + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.InvokeResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/PropertyDiff.scala b/besom-rpc/src/main/scala/pulumirpc/provider/PropertyDiff.scala new file mode 100644 index 00000000..2447911e --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/PropertyDiff.scala @@ -0,0 +1,242 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param kind + * The kind of diff asdsociated with this property. + * @param inputDiff + * The difference is between old and new inputs, not old and new state. + */ +@SerialVersionUID(0L) +final case class PropertyDiff( + kind: pulumirpc.provider.PropertyDiff.Kind = pulumirpc.provider.PropertyDiff.Kind.ADD, + inputDiff: _root_.scala.Boolean = false, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PropertyDiff] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = kind.value + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(1, __value) + } + }; + + { + val __value = inputDiff + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = kind.value + if (__v != 0) { + _output__.writeEnum(1, __v) + } + }; + { + val __v = inputDiff + if (__v != false) { + _output__.writeBool(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKind(__v: pulumirpc.provider.PropertyDiff.Kind): PropertyDiff = copy(kind = __v) + def withInputDiff(__v: _root_.scala.Boolean): PropertyDiff = copy(inputDiff = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = kind.javaValueDescriptor + if (__t.getNumber() != 0) __t else null + } + case 2 => { + val __t = inputDiff + if (__t != false) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PEnum(kind.scalaValueDescriptor) + case 2 => _root_.scalapb.descriptors.PBoolean(inputDiff) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.PropertyDiff.type = pulumirpc.provider.PropertyDiff + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.PropertyDiff]) +} + +object PropertyDiff extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.PropertyDiff] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.PropertyDiff] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.PropertyDiff = { + var __kind: pulumirpc.provider.PropertyDiff.Kind = pulumirpc.provider.PropertyDiff.Kind.ADD + var __inputDiff: _root_.scala.Boolean = false + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 8 => + __kind = pulumirpc.provider.PropertyDiff.Kind.fromValue(_input__.readEnum()) + case 16 => + __inputDiff = _input__.readBool() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.PropertyDiff( + kind = __kind, + inputDiff = __inputDiff, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.PropertyDiff] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.PropertyDiff( + kind = pulumirpc.provider.PropertyDiff.Kind.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(pulumirpc.provider.PropertyDiff.Kind.ADD.scalaValueDescriptor).number), + inputDiff = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Boolean]).getOrElse(false) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(13) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(13) + 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[?] = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => pulumirpc.provider.PropertyDiff.Kind + } + } + lazy val defaultInstance = pulumirpc.provider.PropertyDiff( + kind = pulumirpc.provider.PropertyDiff.Kind.ADD, + inputDiff = false + ) + sealed abstract class Kind(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum { + type EnumType = pulumirpc.provider.PropertyDiff.Kind + type RecognizedType = pulumirpc.provider.PropertyDiff.Kind.Recognized + def isAdd: _root_.scala.Boolean = false + def isAddReplace: _root_.scala.Boolean = false + def isDelete: _root_.scala.Boolean = false + def isDeleteReplace: _root_.scala.Boolean = false + def isUpdate: _root_.scala.Boolean = false + def isUpdateReplace: _root_.scala.Boolean = false + def companion: _root_.scalapb.GeneratedEnumCompanion[Kind] = pulumirpc.provider.PropertyDiff.Kind + final def asRecognized: _root_.scala.Option[pulumirpc.provider.PropertyDiff.Kind.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[pulumirpc.provider.PropertyDiff.Kind.Recognized]) + } + + object Kind extends _root_.scalapb.GeneratedEnumCompanion[Kind] { + sealed trait Recognized extends Kind + implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[Kind] = this + + /** this property was added + */ + @SerialVersionUID(0L) + case object ADD extends Kind(0) with Kind.Recognized { + val index = 0 + val name = "ADD" + override def isAdd: _root_.scala.Boolean = true + } + + /** this property was added, and this change requires a replace + */ + @SerialVersionUID(0L) + case object ADD_REPLACE extends Kind(1) with Kind.Recognized { + val index = 1 + val name = "ADD_REPLACE" + override def isAddReplace: _root_.scala.Boolean = true + } + + /** this property was removed + */ + @SerialVersionUID(0L) + case object DELETE extends Kind(2) with Kind.Recognized { + val index = 2 + val name = "DELETE" + override def isDelete: _root_.scala.Boolean = true + } + + /** this property was removed, and this change requires a replace + */ + @SerialVersionUID(0L) + case object DELETE_REPLACE extends Kind(3) with Kind.Recognized { + val index = 3 + val name = "DELETE_REPLACE" + override def isDeleteReplace: _root_.scala.Boolean = true + } + + /** this property's value was changed + */ + @SerialVersionUID(0L) + case object UPDATE extends Kind(4) with Kind.Recognized { + val index = 4 + val name = "UPDATE" + override def isUpdate: _root_.scala.Boolean = true + } + + /** this property's value was changed, and this change requires a replace + */ + @SerialVersionUID(0L) + case object UPDATE_REPLACE extends Kind(5) with Kind.Recognized { + val index = 5 + val name = "UPDATE_REPLACE" + override def isUpdateReplace: _root_.scala.Boolean = true + } + + @SerialVersionUID(0L) + final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Kind(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum + lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(ADD, ADD_REPLACE, DELETE, DELETE_REPLACE, UPDATE, UPDATE_REPLACE) + def fromValue(__value: _root_.scala.Int): Kind = __value match { + case 0 => ADD + case 1 => ADD_REPLACE + case 2 => DELETE + case 3 => DELETE_REPLACE + case 4 => UPDATE + case 5 => UPDATE_REPLACE + case __other => Unrecognized(__other) + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = pulumirpc.provider.PropertyDiff.javaDescriptor.getEnumTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = pulumirpc.provider.PropertyDiff.scalaDescriptor.enums(0) + } + implicit class PropertyDiffLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.PropertyDiff]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.PropertyDiff](_l) { + def kind: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.PropertyDiff.Kind] = field(_.kind)((c_, f_) => c_.copy(kind = f_)) + def inputDiff: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.inputDiff)((c_, f_) => c_.copy(inputDiff = f_)) + } + final val KIND_FIELD_NUMBER = 1 + final val INPUTDIFF_FIELD_NUMBER = 2 + def of( + kind: pulumirpc.provider.PropertyDiff.Kind, + inputDiff: _root_.scala.Boolean + ): _root_.pulumirpc.provider.PropertyDiff = _root_.pulumirpc.provider.PropertyDiff( + kind, + inputDiff + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.PropertyDiff]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/ProviderProto.scala b/besom-rpc/src/main/scala/pulumirpc/provider/ProviderProto.scala new file mode 100644 index 00000000..18001e27 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/ProviderProto.scala @@ -0,0 +1,206 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +object ProviderProto extends _root_.scalapb.GeneratedFileObject { + lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq( + pulumirpc.plugin.PluginProto, + com.google.protobuf.empty.EmptyProto, + com.google.protobuf.struct.StructProto + ) + lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + pulumirpc.provider.GetSchemaRequest, + pulumirpc.provider.GetSchemaResponse, + pulumirpc.provider.ConfigureRequest, + pulumirpc.provider.ConfigureResponse, + pulumirpc.provider.ConfigureErrorMissingKeys, + pulumirpc.provider.InvokeRequest, + pulumirpc.provider.InvokeResponse, + pulumirpc.provider.CallRequest, + pulumirpc.provider.CallResponse, + pulumirpc.provider.CheckRequest, + pulumirpc.provider.CheckResponse, + pulumirpc.provider.CheckFailure, + pulumirpc.provider.DiffRequest, + pulumirpc.provider.PropertyDiff, + pulumirpc.provider.DiffResponse, + pulumirpc.provider.CreateRequest, + pulumirpc.provider.CreateResponse, + pulumirpc.provider.ReadRequest, + pulumirpc.provider.ReadResponse, + pulumirpc.provider.UpdateRequest, + pulumirpc.provider.UpdateResponse, + pulumirpc.provider.DeleteRequest, + pulumirpc.provider.ConstructRequest, + pulumirpc.provider.ConstructResponse, + pulumirpc.provider.ErrorResourceInitFailed, + pulumirpc.provider.GetMappingRequest, + pulumirpc.provider.GetMappingResponse, + pulumirpc.provider.GetMappingsRequest, + pulumirpc.provider.GetMappingsResponse + ) + private lazy val ProtoBytes: _root_.scala.Array[Byte] = + scalapb.Encoding.fromBase64(scala.collection.immutable.Seq( + """ChVwdWx1bWkvcHJvdmlkZXIucHJvdG8SCXB1bHVtaXJwYxoTcHVsdW1pL3BsdWdpbi5wcm90bxobZ29vZ2xlL3Byb3RvYnVmL + 2VtcHR5LnByb3RvGhxnb29nbGUvcHJvdG9idWYvc3RydWN0LnByb3RvIjoKEEdldFNjaGVtYVJlcXVlc3QSJgoHdmVyc2lvbhgBI + AEoBUIM4j8JEgd2ZXJzaW9uUgd2ZXJzaW9uIjgKEUdldFNjaGVtYVJlc3BvbnNlEiMKBnNjaGVtYRgBIAEoCUIL4j8IEgZzY2hlb + WFSBnNjaGVtYSKKBAoQQ29uZmlndXJlUmVxdWVzdBJYCgl2YXJpYWJsZXMYASADKAsyKi5wdWx1bWlycGMuQ29uZmlndXJlUmVxd + WVzdC5WYXJpYWJsZXNFbnRyeUIO4j8LEgl2YXJpYWJsZXNSCXZhcmlhYmxlcxI2CgRhcmdzGAIgASgLMhcuZ29vZ2xlLnByb3RvY + nVmLlN0cnVjdEIJ4j8GEgRhcmdzUgRhcmdzEjgKDWFjY2VwdFNlY3JldHMYAyABKAhCEuI/DxINYWNjZXB0U2VjcmV0c1INYWNjZ + XB0U2VjcmV0cxI+Cg9hY2NlcHRSZXNvdXJjZXMYBCABKAhCFOI/ERIPYWNjZXB0UmVzb3VyY2VzUg9hY2NlcHRSZXNvdXJjZXMSP + QoQc2VuZHNfb2xkX2lucHV0cxgFIAEoCEIT4j8QEg5zZW5kc09sZElucHV0c1IOc2VuZHNPbGRJbnB1dHMSVwoac2VuZHNfb2xkX + 2lucHV0c190b19kZWxldGUYBiABKAhCG+I/GBIWc2VuZHNPbGRJbnB1dHNUb0RlbGV0ZVIWc2VuZHNPbGRJbnB1dHNUb0RlbGV0Z + RpSCg5WYXJpYWJsZXNFbnRyeRIaCgNrZXkYASABKAlCCOI/BRIDa2V5UgNrZXkSIAoFdmFsdWUYAiABKAlCCuI/BxIFdmFsdWVSB + XZhbHVlOgI4ASKHAgoRQ29uZmlndXJlUmVzcG9uc2USOAoNYWNjZXB0U2VjcmV0cxgBIAEoCEIS4j8PEg1hY2NlcHRTZWNyZXRzU + g1hY2NlcHRTZWNyZXRzEj4KD3N1cHBvcnRzUHJldmlldxgCIAEoCEIU4j8REg9zdXBwb3J0c1ByZXZpZXdSD3N1cHBvcnRzUHJld + mlldxI+Cg9hY2NlcHRSZXNvdXJjZXMYAyABKAhCFOI/ERIPYWNjZXB0UmVzb3VyY2VzUg9hY2NlcHRSZXNvdXJjZXMSOAoNYWNjZ + XB0T3V0cHV0cxgEIAEoCEIS4j8PEg1hY2NlcHRPdXRwdXRzUg1hY2NlcHRPdXRwdXRzIuEBChlDb25maWd1cmVFcnJvck1pc3Npb + mdLZXlzEmMKC21pc3NpbmdLZXlzGAEgAygLMi8ucHVsdW1pcnBjLkNvbmZpZ3VyZUVycm9yTWlzc2luZ0tleXMuTWlzc2luZ0tle + UIQ4j8NEgttaXNzaW5nS2V5c1ILbWlzc2luZ0tleXMaXwoKTWlzc2luZ0tleRIdCgRuYW1lGAEgASgJQgniPwYSBG5hbWVSBG5hb + WUSMgoLZGVzY3JpcHRpb24YAiABKAlCEOI/DRILZGVzY3JpcHRpb25SC2Rlc2NyaXB0aW9uIqABCg1JbnZva2VSZXF1ZXN0EhoKA + 3RvaxgBIAEoCUII4j8FEgN0b2tSA3RvaxI2CgRhcmdzGAIgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdEIJ4j8GEgRhcmdzU + gRhcmdzSgQIAxAHUghwcm92aWRlclIHdmVyc2lvblIPYWNjZXB0UmVzb3VyY2VzUhFwbHVnaW5Eb3dubG9hZFVSTCKSAQoOSW52b + 2tlUmVzcG9uc2USPAoGcmV0dXJuGAEgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdEIL4j8IEgZyZXR1cm5SBnJldHVybhJCC + ghmYWlsdXJlcxgCIAMoCzIXLnB1bHVtaXJwYy5DaGVja0ZhaWx1cmVCDeI/ChIIZmFpbHVyZXNSCGZhaWx1cmVzIq4ICgtDYWxsU + mVxdWVzdBIaCgN0b2sYASABKAlCCOI/BRIDdG9rUgN0b2sSNgoEYXJncxgCIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RCC + eI/BhIEYXJnc1IEYXJncxJrCg9hcmdEZXBlbmRlbmNpZXMYAyADKAsyKy5wdWx1bWlycGMuQ2FsbFJlcXVlc3QuQXJnRGVwZW5kZ + W5jaWVzRW50cnlCFOI/ERIPYXJnRGVwZW5kZW5jaWVzUg9hcmdEZXBlbmRlbmNpZXMSJgoHcHJvamVjdBgGIAEoCUIM4j8JEgdwc + m9qZWN0Ugdwcm9qZWN0EiAKBXN0YWNrGAcgASgJQgriPwcSBXN0YWNrUgVzdGFjaxJHCgZjb25maWcYCCADKAsyIi5wdWx1bWlyc + GMuQ2FsbFJlcXVlc3QuQ29uZmlnRW50cnlCC+I/CBIGY29uZmlnUgZjb25maWcSQQoQY29uZmlnU2VjcmV0S2V5cxgJIAMoCUIV4 + j8SEhBjb25maWdTZWNyZXRLZXlzUhBjb25maWdTZWNyZXRLZXlzEiMKBmRyeVJ1bhgKIAEoCEIL4j8IEgZkcnlSdW5SBmRyeVJ1b + hIpCghwYXJhbGxlbBgLIAEoBUIN4j8KEghwYXJhbGxlbFIIcGFyYWxsZWwSPgoPbW9uaXRvckVuZHBvaW50GAwgASgJQhTiPxESD + 21vbml0b3JFbmRwb2ludFIPbW9uaXRvckVuZHBvaW50EjUKDG9yZ2FuaXphdGlvbhgOIAEoCUIR4j8OEgxvcmdhbml6YXRpb25SD + G9yZ2FuaXphdGlvbhJMChVhY2NlcHRzX291dHB1dF92YWx1ZXMYESABKAhCGOI/FRITYWNjZXB0c091dHB1dFZhbHVlc1ITYWNjZ + XB0c091dHB1dFZhbHVlcxo1ChRBcmd1bWVudERlcGVuZGVuY2llcxIdCgR1cm5zGAEgAygJQgniPwYSBHVybnNSBHVybnMahQEKF + EFyZ0RlcGVuZGVuY2llc0VudHJ5EhoKA2tleRgBIAEoCUII4j8FEgNrZXlSA2tleRJNCgV2YWx1ZRgCIAEoCzIrLnB1bHVtaXJwY + y5DYWxsUmVxdWVzdC5Bcmd1bWVudERlcGVuZGVuY2llc0IK4j8HEgV2YWx1ZVIFdmFsdWU6AjgBGk8KC0NvbmZpZ0VudHJ5EhoKA + 2tleRgBIAEoCUII4j8FEgNrZXlSA2tleRIgCgV2YWx1ZRgCIAEoCUIK4j8HEgV2YWx1ZVIFdmFsdWU6AjgBSgQIBBAFSgQIBRAGS + gQIDRAOSgQIEBARSgQIDxAQUghwcm92aWRlclIHdmVyc2lvblIRcGx1Z2luRG93bmxvYWRVUkxSD3BsdWdpbkNoZWNrc3Vtc1IOc + 291cmNlUG9zaXRpb24iyQMKDENhbGxSZXNwb25zZRI8CgZyZXR1cm4YASABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0QgviP + wgSBnJldHVyblIGcmV0dXJuEngKEnJldHVybkRlcGVuZGVuY2llcxgCIAMoCzIvLnB1bHVtaXJwYy5DYWxsUmVzcG9uc2UuUmV0d + XJuRGVwZW5kZW5jaWVzRW50cnlCF+I/FBIScmV0dXJuRGVwZW5kZW5jaWVzUhJyZXR1cm5EZXBlbmRlbmNpZXMSQgoIZmFpbHVyZ + XMYAyADKAsyFy5wdWx1bWlycGMuQ2hlY2tGYWlsdXJlQg3iPwoSCGZhaWx1cmVzUghmYWlsdXJlcxozChJSZXR1cm5EZXBlbmRlb + mNpZXMSHQoEdXJucxgBIAMoCUIJ4j8GEgR1cm5zUgR1cm5zGocBChdSZXR1cm5EZXBlbmRlbmNpZXNFbnRyeRIaCgNrZXkYASABK + AlCCOI/BRIDa2V5UgNrZXkSTAoFdmFsdWUYAiABKAsyKi5wdWx1bWlycGMuQ2FsbFJlc3BvbnNlLlJldHVybkRlcGVuZGVuY2llc + 0IK4j8HEgV2YWx1ZVIFdmFsdWU6AjgBIuEBCgxDaGVja1JlcXVlc3QSGgoDdXJuGAEgASgJQgjiPwUSA3VyblIDdXJuEjYKBG9sZ + HMYAiABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0QgniPwYSBG9sZHNSBG9sZHMSNgoEbmV3cxgDIAEoCzIXLmdvb2dsZS5wc + m90b2J1Zi5TdHJ1Y3RCCeI/BhIEbmV3c1IEbmV3cxIvCgpyYW5kb21TZWVkGAUgASgMQg/iPwwSCnJhbmRvbVNlZWRSCnJhbmRvb + VNlZWRKBAgEEAVSDnNlcXVlbmNlTnVtYmVyIpEBCg1DaGVja1Jlc3BvbnNlEjwKBmlucHV0cxgBIAEoCzIXLmdvb2dsZS5wcm90b + 2J1Zi5TdHJ1Y3RCC+I/CBIGaW5wdXRzUgZpbnB1dHMSQgoIZmFpbHVyZXMYAiADKAsyFy5wdWx1bWlycGMuQ2hlY2tGYWlsdXJlQ + g3iPwoSCGZhaWx1cmVzUghmYWlsdXJlcyJeCgxDaGVja0ZhaWx1cmUSKQoIcHJvcGVydHkYASABKAlCDeI/ChIIcHJvcGVydHlSC + HByb3BlcnR5EiMKBnJlYXNvbhgCIAEoCUIL4j8IEgZyZWFzb25SBnJlYXNvbiK0AgoLRGlmZlJlcXVlc3QSFwoCaWQYASABKAlCB + +I/BBICaWRSAmlkEhoKA3VybhgCIAEoCUII4j8FEgN1cm5SA3VybhI2CgRvbGRzGAMgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0c + nVjdEIJ4j8GEgRvbGRzUgRvbGRzEjYKBG5ld3MYBCABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0QgniPwYSBG5ld3NSBG5ld + 3MSOAoNaWdub3JlQ2hhbmdlcxgFIAMoCUIS4j8PEg1pZ25vcmVDaGFuZ2VzUg1pZ25vcmVDaGFuZ2VzEkYKCm9sZF9pbnB1dHMYB + iABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Qg7iPwsSCW9sZElucHV0c1IJb2xkSW5wdXRzIrwCCgxQcm9wZXJ0eURpZmYSO + woEa2luZBgBIAEoDjIcLnB1bHVtaXJwYy5Qcm9wZXJ0eURpZmYuS2luZEIJ4j8GEgRraW5kUgRraW5kEiwKCWlucHV0RGlmZhgCI + AEoCEIO4j8LEglpbnB1dERpZmZSCWlucHV0RGlmZiLAAQoES2luZBIRCgNBREQQABoI4j8FEgNBREQSIQoLQUREX1JFUExBQ0UQA + RoQ4j8NEgtBRERfUkVQTEFDRRIXCgZERUxFVEUQAhoL4j8IEgZERUxFVEUSJwoOREVMRVRFX1JFUExBQ0UQAxoT4j8QEg5ERUxFV + EVfUkVQTEFDRRIXCgZVUERBVEUQBBoL4j8IEgZVUERBVEUSJwoOVVBEQVRFX1JFUExBQ0UQBRoT4j8QEg5VUERBVEVfUkVQTEFDR + SKgBQoMRGlmZlJlc3BvbnNlEikKCHJlcGxhY2VzGAEgAygJQg3iPwoSCHJlcGxhY2VzUghyZXBsYWNlcxImCgdzdGFibGVzGAIgA + ygJQgziPwkSB3N0YWJsZXNSB3N0YWJsZXMSSgoTZGVsZXRlQmVmb3JlUmVwbGFjZRgDIAEoCEIY4j8VEhNkZWxldGVCZWZvcmVSZ + XBsYWNlUhNkZWxldGVCZWZvcmVSZXBsYWNlEksKB2NoYW5nZXMYBCABKA4yIy5wdWx1bWlycGMuRGlmZlJlc3BvbnNlLkRpZmZDa + GFuZ2VzQgziPwkSB2NoYW5nZXNSB2NoYW5nZXMSIAoFZGlmZnMYBSADKAlCCuI/BxIFZGlmZnNSBWRpZmZzEmAKDGRldGFpbGVkR + GlmZhgGIAMoCzIpLnB1bHVtaXJwYy5EaWZmUmVzcG9uc2UuRGV0YWlsZWREaWZmRW50cnlCEeI/DhIMZGV0YWlsZWREaWZmUgxkZ + XRhaWxlZERpZmYSPgoPaGFzRGV0YWlsZWREaWZmGAcgASgIQhTiPxESD2hhc0RldGFpbGVkRGlmZlIPaGFzRGV0YWlsZWREaWZmG + m4KEURldGFpbGVkRGlmZkVudHJ5EhoKA2tleRgBIAEoCUII4j8FEgNrZXlSA2tleRI5CgV2YWx1ZRgCIAEoCzIXLnB1bHVtaXJwY + y5Qcm9wZXJ0eURpZmZCCuI/BxIFdmFsdWVSBXZhbHVlOgI4ASJwCgtEaWZmQ2hhbmdlcxIjCgxESUZGX1VOS05PV04QABoR4j8OE + gxESUZGX1VOS05PV04SHQoJRElGRl9OT05FEAEaDuI/CxIJRElGRl9OT05FEh0KCURJRkZfU09NRRACGg7iPwsSCURJRkZfU09NR + SLFAQoNQ3JlYXRlUmVxdWVzdBIaCgN1cm4YASABKAlCCOI/BRIDdXJuUgN1cm4SSAoKcHJvcGVydGllcxgCIAEoCzIXLmdvb2dsZ + S5wcm90b2J1Zi5TdHJ1Y3RCD+I/DBIKcHJvcGVydGllc1IKcHJvcGVydGllcxImCgd0aW1lb3V0GAMgASgBQgziPwkSB3RpbWVvd + XRSB3RpbWVvdXQSJgoHcHJldmlldxgEIAEoCEIM4j8JEgdwcmV2aWV3UgdwcmV2aWV3InMKDkNyZWF0ZVJlc3BvbnNlEhcKAmlkG + AEgASgJQgfiPwQSAmlkUgJpZBJICgpwcm9wZXJ0aWVzGAIgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdEIP4j8MEgpwcm9wZ + XJ0aWVzUgpwcm9wZXJ0aWVzIsoBCgtSZWFkUmVxdWVzdBIXCgJpZBgBIAEoCUIH4j8EEgJpZFICaWQSGgoDdXJuGAIgASgJQgjiP + wUSA3VyblIDdXJuEkgKCnByb3BlcnRpZXMYAyABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Qg/iPwwSCnByb3BlcnRpZXNSC + nByb3BlcnRpZXMSPAoGaW5wdXRzGAQgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdEIL4j8IEgZpbnB1dHNSBmlucHV0cyKvA + QoMUmVhZFJlc3BvbnNlEhcKAmlkGAEgASgJQgfiPwQSAmlkUgJpZBJICgpwcm9wZXJ0aWVzGAIgASgLMhcuZ29vZ2xlLnByb3RvY + nVmLlN0cnVjdEIP4j8MEgpwcm9wZXJ0aWVzUgpwcm9wZXJ0aWVzEjwKBmlucHV0cxgDIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5Td + HJ1Y3RCC+I/CBIGaW5wdXRzUgZpbnB1dHMihgMKDVVwZGF0ZVJlcXVlc3QSFwoCaWQYASABKAlCB+I/BBICaWRSAmlkEhoKA3Vyb + hgCIAEoCUII4j8FEgN1cm5SA3VybhI2CgRvbGRzGAMgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdEIJ4j8GEgRvbGRzUgRvb + GRzEjYKBG5ld3MYBCABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0QgniPwYSBG5ld3NSBG5ld3MSJgoHdGltZW91dBgFIAEoA + UIM4j8JEgd0aW1lb3V0Ugd0aW1lb3V0EjgKDWlnbm9yZUNoYW5nZXMYBiADKAlCEuI/DxINaWdub3JlQ2hhbmdlc1INaWdub3JlQ + 2hhbmdlcxImCgdwcmV2aWV3GAcgASgIQgziPwkSB3ByZXZpZXdSB3ByZXZpZXcSRgoKb2xkX2lucHV0cxgIIAEoCzIXLmdvb2dsZ + S5wcm90b2J1Zi5TdHJ1Y3RCDuI/CxIJb2xkSW5wdXRzUglvbGRJbnB1dHMiWgoOVXBkYXRlUmVzcG9uc2USSAoKcHJvcGVydGllc + xgBIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RCD+I/DBIKcHJvcGVydGllc1IKcHJvcGVydGllcyL+AQoNRGVsZXRlUmVxd + WVzdBIXCgJpZBgBIAEoCUIH4j8EEgJpZFICaWQSGgoDdXJuGAIgASgJQgjiPwUSA3VyblIDdXJuEkgKCnByb3BlcnRpZXMYAyABK + AsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Qg/iPwwSCnByb3BlcnRpZXNSCnByb3BlcnRpZXMSJgoHdGltZW91dBgEIAEoAUIM4 + j8JEgd0aW1lb3V0Ugd0aW1lb3V0EkYKCm9sZF9pbnB1dHMYBSABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Qg7iPwsSCW9sZ + ElucHV0c1IJb2xkSW5wdXRzIuUPChBDb25zdHJ1Y3RSZXF1ZXN0EiYKB3Byb2plY3QYASABKAlCDOI/CRIHcHJvamVjdFIHcHJva + mVjdBIgCgVzdGFjaxgCIAEoCUIK4j8HEgVzdGFja1IFc3RhY2sSTAoGY29uZmlnGAMgAygLMicucHVsdW1pcnBjLkNvbnN0cnVjd + FJlcXVlc3QuQ29uZmlnRW50cnlCC+I/CBIGY29uZmlnUgZjb25maWcSIwoGZHJ5UnVuGAQgASgIQgviPwgSBmRyeVJ1blIGZHJ5U + nVuEikKCHBhcmFsbGVsGAUgASgFQg3iPwoSCHBhcmFsbGVsUghwYXJhbGxlbBI+Cg9tb25pdG9yRW5kcG9pbnQYBiABKAlCFOI/E + RIPbW9uaXRvckVuZHBvaW50Ug9tb25pdG9yRW5kcG9pbnQSHQoEdHlwZRgHIAEoCUIJ4j8GEgR0eXBlUgR0eXBlEh0KBG5hbWUYC + CABKAlCCeI/BhIEbmFtZVIEbmFtZRIjCgZwYXJlbnQYCSABKAlCC+I/CBIGcGFyZW50UgZwYXJlbnQSPAoGaW5wdXRzGAogASgLM + hcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdEIL4j8IEgZpbnB1dHNSBmlucHV0cxJ4ChFpbnB1dERlcGVuZGVuY2llcxgLIAMoCzIyL + nB1bHVtaXJwYy5Db25zdHJ1Y3RSZXF1ZXN0LklucHV0RGVwZW5kZW5jaWVzRW50cnlCFuI/ExIRaW5wdXREZXBlbmRlbmNpZXNSE + WlucHV0RGVwZW5kZW5jaWVzElgKCXByb3ZpZGVycxgNIAMoCzIqLnB1bHVtaXJwYy5Db25zdHJ1Y3RSZXF1ZXN0LlByb3ZpZGVyc + 0VudHJ5Qg7iPwsSCXByb3ZpZGVyc1IJcHJvdmlkZXJzEjUKDGRlcGVuZGVuY2llcxgPIAMoCUIR4j8OEgxkZXBlbmRlbmNpZXNSD + GRlcGVuZGVuY2llcxJBChBjb25maWdTZWNyZXRLZXlzGBAgAygJQhXiPxISEGNvbmZpZ1NlY3JldEtleXNSEGNvbmZpZ1NlY3Jld + EtleXMSNQoMb3JnYW5pemF0aW9uGBEgASgJQhHiPw4SDG9yZ2FuaXphdGlvblIMb3JnYW5pemF0aW9uEiYKB3Byb3RlY3QYDCABK + AhCDOI/CRIHcHJvdGVjdFIHcHJvdGVjdBImCgdhbGlhc2VzGA4gAygJQgziPwkSB2FsaWFzZXNSB2FsaWFzZXMSVgoXYWRkaXRpb + 25hbFNlY3JldE91dHB1dHMYEiADKAlCHOI/GRIXYWRkaXRpb25hbFNlY3JldE91dHB1dHNSF2FkZGl0aW9uYWxTZWNyZXRPdXRwd + XRzEmcKDmN1c3RvbVRpbWVvdXRzGBMgASgLMioucHVsdW1pcnBjLkNvbnN0cnVjdFJlcXVlc3QuQ3VzdG9tVGltZW91dHNCE+I/E + BIOY3VzdG9tVGltZW91dHNSDmN1c3RvbVRpbWVvdXRzEjIKC2RlbGV0ZWRXaXRoGBQgASgJQhDiPw0SC2RlbGV0ZWRXaXRoUgtkZ + WxldGVkV2l0aBJKChNkZWxldGVCZWZvcmVSZXBsYWNlGBUgASgIQhjiPxUSE2RlbGV0ZUJlZm9yZVJlcGxhY2VSE2RlbGV0ZUJlZ + m9yZVJlcGxhY2USOAoNaWdub3JlQ2hhbmdlcxgWIAMoCUIS4j8PEg1pZ25vcmVDaGFuZ2VzUg1pZ25vcmVDaGFuZ2VzEkEKEHJlc + GxhY2VPbkNoYW5nZXMYFyADKAlCFeI/EhIQcmVwbGFjZU9uQ2hhbmdlc1IQcmVwbGFjZU9uQ2hhbmdlcxI7Cg5yZXRhaW5PbkRlb + GV0ZRgYIAEoCEIT4j8QEg5yZXRhaW5PbkRlbGV0ZVIOcmV0YWluT25EZWxldGUSTAoVYWNjZXB0c19vdXRwdXRfdmFsdWVzGBkgA + SgIQhjiPxUSE2FjY2VwdHNPdXRwdXRWYWx1ZXNSE2FjY2VwdHNPdXRwdXRWYWx1ZXMaNQoUUHJvcGVydHlEZXBlbmRlbmNpZXMSH + QoEdXJucxgBIAMoCUIJ4j8GEgR1cm5zUgR1cm5zGn8KDkN1c3RvbVRpbWVvdXRzEiMKBmNyZWF0ZRgBIAEoCUIL4j8IEgZjcmVhd + GVSBmNyZWF0ZRIjCgZ1cGRhdGUYAiABKAlCC+I/CBIGdXBkYXRlUgZ1cGRhdGUSIwoGZGVsZXRlGAMgASgJQgviPwgSBmRlbGV0Z + VIGZGVsZXRlGk8KC0NvbmZpZ0VudHJ5EhoKA2tleRgBIAEoCUII4j8FEgNrZXlSA2tleRIgCgV2YWx1ZRgCIAEoCUIK4j8HEgV2Y + Wx1ZVIFdmFsdWU6AjgBGowBChZJbnB1dERlcGVuZGVuY2llc0VudHJ5EhoKA2tleRgBIAEoCUII4j8FEgNrZXlSA2tleRJSCgV2Y + Wx1ZRgCIAEoCzIwLnB1bHVtaXJwYy5Db25zdHJ1Y3RSZXF1ZXN0LlByb3BlcnR5RGVwZW5kZW5jaWVzQgriPwcSBXZhbHVlUgV2Y + Wx1ZToCOAEaUgoOUHJvdmlkZXJzRW50cnkSGgoDa2V5GAEgASgJQgjiPwUSA2tleVIDa2V5EiAKBXZhbHVlGAIgASgJQgriPwcSB + XZhbHVlUgV2YWx1ZToCOAEirAMKEUNvbnN0cnVjdFJlc3BvbnNlEhoKA3VybhgBIAEoCUII4j8FEgN1cm5SA3VybhI5CgVzdGF0Z + RgCIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RCCuI/BxIFc3RhdGVSBXN0YXRlEnkKEXN0YXRlRGVwZW5kZW5jaWVzGAMgA + ygLMjMucHVsdW1pcnBjLkNvbnN0cnVjdFJlc3BvbnNlLlN0YXRlRGVwZW5kZW5jaWVzRW50cnlCFuI/ExIRc3RhdGVEZXBlbmRlb + mNpZXNSEXN0YXRlRGVwZW5kZW5jaWVzGjUKFFByb3BlcnR5RGVwZW5kZW5jaWVzEh0KBHVybnMYASADKAlCCeI/BhIEdXJuc1IEd + XJucxqNAQoWU3RhdGVEZXBlbmRlbmNpZXNFbnRyeRIaCgNrZXkYASABKAlCCOI/BRIDa2V5UgNrZXkSUwoFdmFsdWUYAiABKAsyM + S5wdWx1bWlycGMuQ29uc3RydWN0UmVzcG9uc2UuUHJvcGVydHlEZXBlbmRlbmNpZXNCCuI/BxIFdmFsdWVSBXZhbHVlOgI4ASLiA + QoXRXJyb3JSZXNvdXJjZUluaXRGYWlsZWQSFwoCaWQYASABKAlCB+I/BBICaWRSAmlkEkgKCnByb3BlcnRpZXMYAiABKAsyFy5nb + 29nbGUucHJvdG9idWYuU3RydWN0Qg/iPwwSCnByb3BlcnRpZXNSCnByb3BlcnRpZXMSJgoHcmVhc29ucxgDIAMoCUIM4j8JEgdyZ + WFzb25zUgdyZWFzb25zEjwKBmlucHV0cxgEIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RCC+I/CBIGaW5wdXRzUgZpbnB1d + HMiWgoRR2V0TWFwcGluZ1JlcXVlc3QSGgoDa2V5GAEgASgJQgjiPwUSA2tleVIDa2V5EikKCHByb3ZpZGVyGAIgASgJQg3iPwoSC + HByb3ZpZGVyUghwcm92aWRlciJeChJHZXRNYXBwaW5nUmVzcG9uc2USKQoIcHJvdmlkZXIYASABKAlCDeI/ChIIcHJvdmlkZXJSC + HByb3ZpZGVyEh0KBGRhdGEYAiABKAxCCeI/BhIEZGF0YVIEZGF0YSIwChJHZXRNYXBwaW5nc1JlcXVlc3QSGgoDa2V5GAEgASgJQ + gjiPwUSA2tleVIDa2V5IkMKE0dldE1hcHBpbmdzUmVzcG9uc2USLAoJcHJvdmlkZXJzGAEgAygJQg7iPwsSCXByb3ZpZGVyc1IJc + HJvdmlkZXJzMoYKChBSZXNvdXJjZVByb3ZpZGVyEkgKCUdldFNjaGVtYRIbLnB1bHVtaXJwYy5HZXRTY2hlbWFSZXF1ZXN0Ghwuc + HVsdW1pcnBjLkdldFNjaGVtYVJlc3BvbnNlIgASQgoLQ2hlY2tDb25maWcSFy5wdWx1bWlycGMuQ2hlY2tSZXF1ZXN0GhgucHVsd + W1pcnBjLkNoZWNrUmVzcG9uc2UiABI/CgpEaWZmQ29uZmlnEhYucHVsdW1pcnBjLkRpZmZSZXF1ZXN0GhcucHVsdW1pcnBjLkRpZ + mZSZXNwb25zZSIAEkgKCUNvbmZpZ3VyZRIbLnB1bHVtaXJwYy5Db25maWd1cmVSZXF1ZXN0GhwucHVsdW1pcnBjLkNvbmZpZ3VyZ + VJlc3BvbnNlIgASPwoGSW52b2tlEhgucHVsdW1pcnBjLkludm9rZVJlcXVlc3QaGS5wdWx1bWlycGMuSW52b2tlUmVzcG9uc2UiA + BJHCgxTdHJlYW1JbnZva2USGC5wdWx1bWlycGMuSW52b2tlUmVxdWVzdBoZLnB1bHVtaXJwYy5JbnZva2VSZXNwb25zZSIAMAESO + QoEQ2FsbBIWLnB1bHVtaXJwYy5DYWxsUmVxdWVzdBoXLnB1bHVtaXJwYy5DYWxsUmVzcG9uc2UiABI8CgVDaGVjaxIXLnB1bHVta + XJwYy5DaGVja1JlcXVlc3QaGC5wdWx1bWlycGMuQ2hlY2tSZXNwb25zZSIAEjkKBERpZmYSFi5wdWx1bWlycGMuRGlmZlJlcXVlc + 3QaFy5wdWx1bWlycGMuRGlmZlJlc3BvbnNlIgASPwoGQ3JlYXRlEhgucHVsdW1pcnBjLkNyZWF0ZVJlcXVlc3QaGS5wdWx1bWlyc + GMuQ3JlYXRlUmVzcG9uc2UiABI5CgRSZWFkEhYucHVsdW1pcnBjLlJlYWRSZXF1ZXN0GhcucHVsdW1pcnBjLlJlYWRSZXNwb25zZ + SIAEj8KBlVwZGF0ZRIYLnB1bHVtaXJwYy5VcGRhdGVSZXF1ZXN0GhkucHVsdW1pcnBjLlVwZGF0ZVJlc3BvbnNlIgASPAoGRGVsZ + XRlEhgucHVsdW1pcnBjLkRlbGV0ZVJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiABJICglDb25zdHJ1Y3QSGy5wdWx1b + WlycGMuQ29uc3RydWN0UmVxdWVzdBocLnB1bHVtaXJwYy5Db25zdHJ1Y3RSZXNwb25zZSIAEjoKBkNhbmNlbBIWLmdvb2dsZS5wc + m90b2J1Zi5FbXB0eRoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSIAEkAKDUdldFBsdWdpbkluZm8SFi5nb29nbGUucHJvdG9idWYuR + W1wdHkaFS5wdWx1bWlycGMuUGx1Z2luSW5mbyIAEjsKBkF0dGFjaBIXLnB1bHVtaXJwYy5QbHVnaW5BdHRhY2gaFi5nb29nbGUuc + HJvdG9idWYuRW1wdHkiABJLCgpHZXRNYXBwaW5nEhwucHVsdW1pcnBjLkdldE1hcHBpbmdSZXF1ZXN0Gh0ucHVsdW1pcnBjLkdld + E1hcHBpbmdSZXNwb25zZSIAEk4KC0dldE1hcHBpbmdzEh0ucHVsdW1pcnBjLkdldE1hcHBpbmdzUmVxdWVzdBoeLnB1bHVtaXJwY + y5HZXRNYXBwaW5nc1Jlc3BvbnNlIgBCNFoyZ2l0aHViLmNvbS9wdWx1bWkvcHVsdW1pL3Nkay92My9wcm90by9nbztwdWx1bWlyc + GNiBnByb3RvMw==""" + ).mkString) + lazy val scalaDescriptor: _root_.scalapb.descriptors.FileDescriptor = { + val scalaProto = com.google.protobuf.descriptor.FileDescriptorProto.parseFrom(ProtoBytes) + _root_.scalapb.descriptors.FileDescriptor.buildFrom(scalaProto, dependencies.map(_.scalaDescriptor)) + } + lazy val javaDescriptor: com.google.protobuf.Descriptors.FileDescriptor = { + val javaProto = com.google.protobuf.DescriptorProtos.FileDescriptorProto.parseFrom(ProtoBytes) + com.google.protobuf.Descriptors.FileDescriptor.buildFrom(javaProto, _root_.scala.Array( + pulumirpc.plugin.PluginProto.javaDescriptor, + com.google.protobuf.empty.EmptyProto.javaDescriptor, + com.google.protobuf.struct.StructProto.javaDescriptor + )) + } + @deprecated("Use javaDescriptor instead. In a future version this will refer to scalaDescriptor.", "ScalaPB 0.5.47") + def descriptor: com.google.protobuf.Descriptors.FileDescriptor = javaDescriptor +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/ReadRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/ReadRequest.scala new file mode 100644 index 00000000..d180805e --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/ReadRequest.scala @@ -0,0 +1,217 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param id + * the ID of the resource to read. + * @param urn + * the Pulumi URN for this resource. + * @param properties + * the current state (sufficiently complete to identify the resource). + * @param inputs + * the current inputs, if any (only populated during refresh). + */ +@SerialVersionUID(0L) +final case class ReadRequest( + id: _root_.scala.Predef.String = "", + urn: _root_.scala.Predef.String = "", + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ReadRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = id + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + if (properties.isDefined) { + val __value = properties.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + if (inputs.isDefined) { + val __value = inputs.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = id + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + properties.foreach { __v => + val __m = __v + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + inputs.foreach { __v => + val __m = __v + _output__.writeTag(4, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withId(__v: _root_.scala.Predef.String): ReadRequest = copy(id = __v) + def withUrn(__v: _root_.scala.Predef.String): ReadRequest = copy(urn = __v) + def getProperties: com.google.protobuf.struct.Struct = properties.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearProperties: ReadRequest = copy(properties = _root_.scala.None) + def withProperties(__v: com.google.protobuf.struct.Struct): ReadRequest = copy(properties = Option(__v)) + def getInputs: com.google.protobuf.struct.Struct = inputs.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearInputs: ReadRequest = copy(inputs = _root_.scala.None) + def withInputs(__v: com.google.protobuf.struct.Struct): ReadRequest = copy(inputs = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = id + if (__t != "") __t else null + } + case 2 => { + val __t = urn + if (__t != "") __t else null + } + case 3 => properties.orNull + case 4 => inputs.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(id) + case 2 => _root_.scalapb.descriptors.PString(urn) + case 3 => properties.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 4 => inputs.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ReadRequest.type = pulumirpc.provider.ReadRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ReadRequest]) +} + +object ReadRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ReadRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ReadRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ReadRequest = { + var __id: _root_.scala.Predef.String = "" + var __urn: _root_.scala.Predef.String = "" + var __properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __id = _input__.readStringRequireUtf8() + case 18 => + __urn = _input__.readStringRequireUtf8() + case 26 => + __properties = _root_.scala.Option(__properties.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 34 => + __inputs = _root_.scala.Option(__inputs.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ReadRequest( + id = __id, + urn = __urn, + properties = __properties, + inputs = __inputs, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ReadRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ReadRequest( + id = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + properties = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + inputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(17) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(17) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 3 => __out = com.google.protobuf.struct.Struct + case 4 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.ReadRequest( + id = "", + urn = "", + properties = _root_.scala.None, + inputs = _root_.scala.None + ) + implicit class ReadRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ReadRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ReadRequest](_l) { + def id: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.id)((c_, f_) => c_.copy(id = f_)) + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + def properties: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getProperties)((c_, f_) => c_.copy(properties = _root_.scala.Option(f_))) + def optionalProperties: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.properties)((c_, f_) => c_.copy(properties = f_)) + def inputs: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getInputs)((c_, f_) => c_.copy(inputs = _root_.scala.Option(f_))) + def optionalInputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.inputs)((c_, f_) => c_.copy(inputs = f_)) + } + final val ID_FIELD_NUMBER = 1 + final val URN_FIELD_NUMBER = 2 + final val PROPERTIES_FIELD_NUMBER = 3 + final val INPUTS_FIELD_NUMBER = 4 + def of( + id: _root_.scala.Predef.String, + urn: _root_.scala.Predef.String, + properties: _root_.scala.Option[com.google.protobuf.struct.Struct], + inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] + ): _root_.pulumirpc.provider.ReadRequest = _root_.pulumirpc.provider.ReadRequest( + id, + urn, + properties, + inputs + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ReadRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/ReadResponse.scala b/besom-rpc/src/main/scala/pulumirpc/provider/ReadResponse.scala new file mode 100644 index 00000000..b630efa2 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/ReadResponse.scala @@ -0,0 +1,185 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param id + * the ID of the resource read back (or empty if missing). + * @param properties + * the state of the resource read from the live environment. + * @param inputs + * the inputs for this resource that would be returned from Check. + */ +@SerialVersionUID(0L) +final case class ReadResponse( + id: _root_.scala.Predef.String = "", + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ReadResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = id + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (properties.isDefined) { + val __value = properties.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + if (inputs.isDefined) { + val __value = inputs.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = id + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + properties.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + inputs.foreach { __v => + val __m = __v + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withId(__v: _root_.scala.Predef.String): ReadResponse = copy(id = __v) + def getProperties: com.google.protobuf.struct.Struct = properties.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearProperties: ReadResponse = copy(properties = _root_.scala.None) + def withProperties(__v: com.google.protobuf.struct.Struct): ReadResponse = copy(properties = Option(__v)) + def getInputs: com.google.protobuf.struct.Struct = inputs.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearInputs: ReadResponse = copy(inputs = _root_.scala.None) + def withInputs(__v: com.google.protobuf.struct.Struct): ReadResponse = copy(inputs = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = id + if (__t != "") __t else null + } + case 2 => properties.orNull + case 3 => inputs.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(id) + case 2 => properties.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 3 => inputs.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.ReadResponse.type = pulumirpc.provider.ReadResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ReadResponse]) +} + +object ReadResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.ReadResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.ReadResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.ReadResponse = { + var __id: _root_.scala.Predef.String = "" + var __properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __id = _input__.readStringRequireUtf8() + case 18 => + __properties = _root_.scala.Option(__properties.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 26 => + __inputs = _root_.scala.Option(__inputs.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.ReadResponse( + id = __id, + properties = __properties, + inputs = __inputs, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.ReadResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.ReadResponse( + id = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + properties = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + inputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(18) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(18) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = com.google.protobuf.struct.Struct + case 3 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.ReadResponse( + id = "", + properties = _root_.scala.None, + inputs = _root_.scala.None + ) + implicit class ReadResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.ReadResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.ReadResponse](_l) { + def id: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.id)((c_, f_) => c_.copy(id = f_)) + def properties: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getProperties)((c_, f_) => c_.copy(properties = _root_.scala.Option(f_))) + def optionalProperties: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.properties)((c_, f_) => c_.copy(properties = f_)) + def inputs: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getInputs)((c_, f_) => c_.copy(inputs = _root_.scala.Option(f_))) + def optionalInputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.inputs)((c_, f_) => c_.copy(inputs = f_)) + } + final val ID_FIELD_NUMBER = 1 + final val PROPERTIES_FIELD_NUMBER = 2 + final val INPUTS_FIELD_NUMBER = 3 + def of( + id: _root_.scala.Predef.String, + properties: _root_.scala.Option[com.google.protobuf.struct.Struct], + inputs: _root_.scala.Option[com.google.protobuf.struct.Struct] + ): _root_.pulumirpc.provider.ReadResponse = _root_.pulumirpc.provider.ReadResponse( + id, + properties, + inputs + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ReadResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/ResourceProviderGrpc.scala b/besom-rpc/src/main/scala/pulumirpc/provider/ResourceProviderGrpc.scala new file mode 100644 index 00000000..673d8f90 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/ResourceProviderGrpc.scala @@ -0,0 +1,780 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + + +object ResourceProviderGrpc { + val METHOD_GET_SCHEMA: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.GetSchemaRequest, pulumirpc.provider.GetSchemaResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "GetSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.GetSchemaRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.GetSchemaResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(0))) + .build() + + val METHOD_CHECK_CONFIG: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.CheckRequest, pulumirpc.provider.CheckResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "CheckConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.CheckRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.CheckResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(1))) + .build() + + val METHOD_DIFF_CONFIG: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.DiffRequest, pulumirpc.provider.DiffResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "DiffConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.DiffRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.DiffResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(2))) + .build() + + val METHOD_CONFIGURE: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.ConfigureRequest, pulumirpc.provider.ConfigureResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "Configure")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.ConfigureRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.ConfigureResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(3))) + .build() + + val METHOD_INVOKE: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.InvokeRequest, pulumirpc.provider.InvokeResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "Invoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.InvokeRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.InvokeResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(4))) + .build() + + val METHOD_STREAM_INVOKE: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.InvokeRequest, pulumirpc.provider.InvokeResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "StreamInvoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.InvokeRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.InvokeResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(5))) + .build() + + val METHOD_CALL: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.CallRequest, pulumirpc.provider.CallResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "Call")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.CallRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.CallResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(6))) + .build() + + val METHOD_CHECK: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.CheckRequest, pulumirpc.provider.CheckResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "Check")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.CheckRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.CheckResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(7))) + .build() + + val METHOD_DIFF: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.DiffRequest, pulumirpc.provider.DiffResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "Diff")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.DiffRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.DiffResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(8))) + .build() + + val METHOD_CREATE: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.CreateRequest, pulumirpc.provider.CreateResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "Create")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.CreateRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.CreateResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(9))) + .build() + + val METHOD_READ: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.ReadRequest, pulumirpc.provider.ReadResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "Read")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.ReadRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.ReadResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(10))) + .build() + + val METHOD_UPDATE: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.UpdateRequest, pulumirpc.provider.UpdateResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "Update")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.UpdateRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.UpdateResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(11))) + .build() + + val METHOD_DELETE: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.DeleteRequest, com.google.protobuf.empty.Empty] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "Delete")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.DeleteRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[com.google.protobuf.empty.Empty]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(12))) + .build() + + val METHOD_CONSTRUCT: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.ConstructRequest, pulumirpc.provider.ConstructResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "Construct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.ConstructRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.ConstructResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(13))) + .build() + + val METHOD_CANCEL: _root_.io.grpc.MethodDescriptor[com.google.protobuf.empty.Empty, com.google.protobuf.empty.Empty] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "Cancel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[com.google.protobuf.empty.Empty]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[com.google.protobuf.empty.Empty]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(14))) + .build() + + val METHOD_GET_PLUGIN_INFO: _root_.io.grpc.MethodDescriptor[com.google.protobuf.empty.Empty, pulumirpc.plugin.PluginInfo] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "GetPluginInfo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[com.google.protobuf.empty.Empty]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.plugin.PluginInfo]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(15))) + .build() + + val METHOD_ATTACH: _root_.io.grpc.MethodDescriptor[pulumirpc.plugin.PluginAttach, com.google.protobuf.empty.Empty] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "Attach")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.plugin.PluginAttach]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[com.google.protobuf.empty.Empty]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(16))) + .build() + + val METHOD_GET_MAPPING: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.GetMappingRequest, pulumirpc.provider.GetMappingResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "GetMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.GetMappingRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.GetMappingResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(17))) + .build() + + val METHOD_GET_MAPPINGS: _root_.io.grpc.MethodDescriptor[pulumirpc.provider.GetMappingsRequest, pulumirpc.provider.GetMappingsResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceProvider", "GetMappings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.GetMappingsRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.GetMappingsResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0).getMethods().get(18))) + .build() + + val SERVICE: _root_.io.grpc.ServiceDescriptor = + _root_.io.grpc.ServiceDescriptor.newBuilder("pulumirpc.ResourceProvider") + .setSchemaDescriptor(new _root_.scalapb.grpc.ConcreteProtoFileDescriptorSupplier(pulumirpc.provider.ProviderProto.javaDescriptor)) + .addMethod(METHOD_GET_SCHEMA) + .addMethod(METHOD_CHECK_CONFIG) + .addMethod(METHOD_DIFF_CONFIG) + .addMethod(METHOD_CONFIGURE) + .addMethod(METHOD_INVOKE) + .addMethod(METHOD_STREAM_INVOKE) + .addMethod(METHOD_CALL) + .addMethod(METHOD_CHECK) + .addMethod(METHOD_DIFF) + .addMethod(METHOD_CREATE) + .addMethod(METHOD_READ) + .addMethod(METHOD_UPDATE) + .addMethod(METHOD_DELETE) + .addMethod(METHOD_CONSTRUCT) + .addMethod(METHOD_CANCEL) + .addMethod(METHOD_GET_PLUGIN_INFO) + .addMethod(METHOD_ATTACH) + .addMethod(METHOD_GET_MAPPING) + .addMethod(METHOD_GET_MAPPINGS) + .build() + + /** ResourceProvider is a service that understands how to create, read, update, or delete resources for types defined + * within a single package. It is driven by the overall planning engine in response to resource diffs. + */ + trait ResourceProvider extends _root_.scalapb.grpc.AbstractService { + override def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[ResourceProvider] = ResourceProvider + /** GetSchema fetches the schema for this resource provider. + */ + def getSchema(request: pulumirpc.provider.GetSchemaRequest): scala.concurrent.Future[pulumirpc.provider.GetSchemaResponse] + /** CheckConfig validates the configuration for this resource provider. + */ + def checkConfig(request: pulumirpc.provider.CheckRequest): scala.concurrent.Future[pulumirpc.provider.CheckResponse] + /** DiffConfig checks the impact a hypothetical change to this provider's configuration will have on the provider. + */ + def diffConfig(request: pulumirpc.provider.DiffRequest): scala.concurrent.Future[pulumirpc.provider.DiffResponse] + /** Configure configures the resource provider with "globals" that control its behavior. + */ + def configure(request: pulumirpc.provider.ConfigureRequest): scala.concurrent.Future[pulumirpc.provider.ConfigureResponse] + /** Invoke dynamically executes a built-in function in the provider. + */ + def invoke(request: pulumirpc.provider.InvokeRequest): scala.concurrent.Future[pulumirpc.provider.InvokeResponse] + /** StreamInvoke dynamically executes a built-in function in the provider, which returns a stream + * of responses. + */ + def streamInvoke(request: pulumirpc.provider.InvokeRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.InvokeResponse]): _root_.scala.Unit + /** Call dynamically executes a method in the provider associated with a component resource. + */ + def call(request: pulumirpc.provider.CallRequest): scala.concurrent.Future[pulumirpc.provider.CallResponse] + /** Check validates that the given property bag is valid for a resource of the given type and returns the inputs + * that should be passed to successive calls to Diff, Create, or Update for this resource. As a rule, the provider + * inputs returned by a call to Check should preserve the original representation of the properties as present in + * the program inputs. Though this rule is not required for correctness, violations thereof can negatively impact + * the end-user experience, as the provider inputs are using for detecting and rendering diffs. + */ + def check(request: pulumirpc.provider.CheckRequest): scala.concurrent.Future[pulumirpc.provider.CheckResponse] + /** Diff checks what impacts a hypothetical update will have on the resource's properties. + */ + def diff(request: pulumirpc.provider.DiffRequest): scala.concurrent.Future[pulumirpc.provider.DiffResponse] + /** Create allocates a new instance of the provided resource and returns its unique ID afterwards. (The input ID + * must be blank.) If this call fails, the resource must not have been created (i.e., it is "transactional"). + */ + def create(request: pulumirpc.provider.CreateRequest): scala.concurrent.Future[pulumirpc.provider.CreateResponse] + /** Read the current live state associated with a resource. Enough state must be include in the inputs to uniquely + * identify the resource; this is typically just the resource ID, but may also include some properties. + */ + def read(request: pulumirpc.provider.ReadRequest): scala.concurrent.Future[pulumirpc.provider.ReadResponse] + /** Update updates an existing resource with new values. + */ + def update(request: pulumirpc.provider.UpdateRequest): scala.concurrent.Future[pulumirpc.provider.UpdateResponse] + /** Delete tears down an existing resource with the given ID. If it fails, the resource is assumed to still exist. + */ + def delete(request: pulumirpc.provider.DeleteRequest): scala.concurrent.Future[com.google.protobuf.empty.Empty] + /** Construct creates a new instance of the provided component resource and returns its state. + */ + def construct(request: pulumirpc.provider.ConstructRequest): scala.concurrent.Future[pulumirpc.provider.ConstructResponse] + /** Cancel signals the provider to gracefully shut down and abort any ongoing resource operations. + * Operations aborted in this way will return an error (e.g., `Update` and `Create` will either return a + * creation error or an initialization error). Since Cancel is advisory and non-blocking, it is up + * to the host to decide how long to wait after Cancel is called before (e.g.) + * hard-closing any gRPC connection. + */ + def cancel(request: com.google.protobuf.empty.Empty): scala.concurrent.Future[com.google.protobuf.empty.Empty] + /** GetPluginInfo returns generic information about this plugin, like its version. + */ + def getPluginInfo(request: com.google.protobuf.empty.Empty): scala.concurrent.Future[pulumirpc.plugin.PluginInfo] + /** Attach sends the engine address to an already running plugin. + */ + def attach(request: pulumirpc.plugin.PluginAttach): scala.concurrent.Future[com.google.protobuf.empty.Empty] + /** GetMapping fetches the mapping for this resource provider, if any. A provider should return an empty + * response (not an error) if it doesn't have a mapping for the given key. + */ + def getMapping(request: pulumirpc.provider.GetMappingRequest): scala.concurrent.Future[pulumirpc.provider.GetMappingResponse] + /** GetMappings is an optional method that returns what mappings (if any) a provider supports. If a provider does not + * implement this method the engine falls back to the old behaviour of just calling GetMapping without a name. + * If this method is implemented than the engine will then call GetMapping only with the names returned from this method. + */ + def getMappings(request: pulumirpc.provider.GetMappingsRequest): scala.concurrent.Future[pulumirpc.provider.GetMappingsResponse] + } + + object ResourceProvider extends _root_.scalapb.grpc.ServiceCompanion[ResourceProvider] { + implicit def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[ResourceProvider] = this + def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.ServiceDescriptor = pulumirpc.provider.ProviderProto.scalaDescriptor.services(0) + def bindService(serviceImpl: ResourceProvider, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = + _root_.io.grpc.ServerServiceDefinition.builder(SERVICE) + .addMethod( + METHOD_GET_SCHEMA, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.GetSchemaRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.GetSchemaResponse]) => { + serviceImpl.getSchema(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_CHECK_CONFIG, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.CheckRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.CheckResponse]) => { + serviceImpl.checkConfig(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_DIFF_CONFIG, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.DiffRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.DiffResponse]) => { + serviceImpl.diffConfig(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_CONFIGURE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.ConfigureRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.ConfigureResponse]) => { + serviceImpl.configure(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_INVOKE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.InvokeRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.InvokeResponse]) => { + serviceImpl.invoke(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_STREAM_INVOKE, + _root_.io.grpc.stub.ServerCalls.asyncServerStreamingCall((request: pulumirpc.provider.InvokeRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.InvokeResponse]) => { + serviceImpl.streamInvoke(request, observer) + })) + .addMethod( + METHOD_CALL, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.CallRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.CallResponse]) => { + serviceImpl.call(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_CHECK, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.CheckRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.CheckResponse]) => { + serviceImpl.check(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_DIFF, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.DiffRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.DiffResponse]) => { + serviceImpl.diff(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_CREATE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.CreateRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.CreateResponse]) => { + serviceImpl.create(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_READ, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.ReadRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.ReadResponse]) => { + serviceImpl.read(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_UPDATE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.UpdateRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.UpdateResponse]) => { + serviceImpl.update(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_DELETE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.DeleteRequest, observer: _root_.io.grpc.stub.StreamObserver[com.google.protobuf.empty.Empty]) => { + serviceImpl.delete(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_CONSTRUCT, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.ConstructRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.ConstructResponse]) => { + serviceImpl.construct(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_CANCEL, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: com.google.protobuf.empty.Empty, observer: _root_.io.grpc.stub.StreamObserver[com.google.protobuf.empty.Empty]) => { + serviceImpl.cancel(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_GET_PLUGIN_INFO, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: com.google.protobuf.empty.Empty, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.plugin.PluginInfo]) => { + serviceImpl.getPluginInfo(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_ATTACH, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.plugin.PluginAttach, observer: _root_.io.grpc.stub.StreamObserver[com.google.protobuf.empty.Empty]) => { + serviceImpl.attach(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_GET_MAPPING, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.GetMappingRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.GetMappingResponse]) => { + serviceImpl.getMapping(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_GET_MAPPINGS, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.provider.GetMappingsRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.GetMappingsResponse]) => { + serviceImpl.getMappings(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .build() + } + + /** ResourceProvider is a service that understands how to create, read, update, or delete resources for types defined + * within a single package. It is driven by the overall planning engine in response to resource diffs. + */ + trait ResourceProviderBlockingClient { + def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[ResourceProvider] = ResourceProvider + /** GetSchema fetches the schema for this resource provider. + */ + def getSchema(request: pulumirpc.provider.GetSchemaRequest): pulumirpc.provider.GetSchemaResponse + /** CheckConfig validates the configuration for this resource provider. + */ + def checkConfig(request: pulumirpc.provider.CheckRequest): pulumirpc.provider.CheckResponse + /** DiffConfig checks the impact a hypothetical change to this provider's configuration will have on the provider. + */ + def diffConfig(request: pulumirpc.provider.DiffRequest): pulumirpc.provider.DiffResponse + /** Configure configures the resource provider with "globals" that control its behavior. + */ + def configure(request: pulumirpc.provider.ConfigureRequest): pulumirpc.provider.ConfigureResponse + /** Invoke dynamically executes a built-in function in the provider. + */ + def invoke(request: pulumirpc.provider.InvokeRequest): pulumirpc.provider.InvokeResponse + /** StreamInvoke dynamically executes a built-in function in the provider, which returns a stream + * of responses. + */ + def streamInvoke(request: pulumirpc.provider.InvokeRequest): scala.collection.Iterator[pulumirpc.provider.InvokeResponse] + /** Call dynamically executes a method in the provider associated with a component resource. + */ + def call(request: pulumirpc.provider.CallRequest): pulumirpc.provider.CallResponse + /** Check validates that the given property bag is valid for a resource of the given type and returns the inputs + * that should be passed to successive calls to Diff, Create, or Update for this resource. As a rule, the provider + * inputs returned by a call to Check should preserve the original representation of the properties as present in + * the program inputs. Though this rule is not required for correctness, violations thereof can negatively impact + * the end-user experience, as the provider inputs are using for detecting and rendering diffs. + */ + def check(request: pulumirpc.provider.CheckRequest): pulumirpc.provider.CheckResponse + /** Diff checks what impacts a hypothetical update will have on the resource's properties. + */ + def diff(request: pulumirpc.provider.DiffRequest): pulumirpc.provider.DiffResponse + /** Create allocates a new instance of the provided resource and returns its unique ID afterwards. (The input ID + * must be blank.) If this call fails, the resource must not have been created (i.e., it is "transactional"). + */ + def create(request: pulumirpc.provider.CreateRequest): pulumirpc.provider.CreateResponse + /** Read the current live state associated with a resource. Enough state must be include in the inputs to uniquely + * identify the resource; this is typically just the resource ID, but may also include some properties. + */ + def read(request: pulumirpc.provider.ReadRequest): pulumirpc.provider.ReadResponse + /** Update updates an existing resource with new values. + */ + def update(request: pulumirpc.provider.UpdateRequest): pulumirpc.provider.UpdateResponse + /** Delete tears down an existing resource with the given ID. If it fails, the resource is assumed to still exist. + */ + def delete(request: pulumirpc.provider.DeleteRequest): com.google.protobuf.empty.Empty + /** Construct creates a new instance of the provided component resource and returns its state. + */ + def construct(request: pulumirpc.provider.ConstructRequest): pulumirpc.provider.ConstructResponse + /** Cancel signals the provider to gracefully shut down and abort any ongoing resource operations. + * Operations aborted in this way will return an error (e.g., `Update` and `Create` will either return a + * creation error or an initialization error). Since Cancel is advisory and non-blocking, it is up + * to the host to decide how long to wait after Cancel is called before (e.g.) + * hard-closing any gRPC connection. + */ + def cancel(request: com.google.protobuf.empty.Empty): com.google.protobuf.empty.Empty + /** GetPluginInfo returns generic information about this plugin, like its version. + */ + def getPluginInfo(request: com.google.protobuf.empty.Empty): pulumirpc.plugin.PluginInfo + /** Attach sends the engine address to an already running plugin. + */ + def attach(request: pulumirpc.plugin.PluginAttach): com.google.protobuf.empty.Empty + /** GetMapping fetches the mapping for this resource provider, if any. A provider should return an empty + * response (not an error) if it doesn't have a mapping for the given key. + */ + def getMapping(request: pulumirpc.provider.GetMappingRequest): pulumirpc.provider.GetMappingResponse + /** GetMappings is an optional method that returns what mappings (if any) a provider supports. If a provider does not + * implement this method the engine falls back to the old behaviour of just calling GetMapping without a name. + * If this method is implemented than the engine will then call GetMapping only with the names returned from this method. + */ + def getMappings(request: pulumirpc.provider.GetMappingsRequest): pulumirpc.provider.GetMappingsResponse + } + + class ResourceProviderBlockingStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[ResourceProviderBlockingStub](channel, options) with ResourceProviderBlockingClient { + /** GetSchema fetches the schema for this resource provider. + */ + override def getSchema(request: pulumirpc.provider.GetSchemaRequest): pulumirpc.provider.GetSchemaResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GET_SCHEMA, options, request) + } + + /** CheckConfig validates the configuration for this resource provider. + */ + override def checkConfig(request: pulumirpc.provider.CheckRequest): pulumirpc.provider.CheckResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_CHECK_CONFIG, options, request) + } + + /** DiffConfig checks the impact a hypothetical change to this provider's configuration will have on the provider. + */ + override def diffConfig(request: pulumirpc.provider.DiffRequest): pulumirpc.provider.DiffResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_DIFF_CONFIG, options, request) + } + + /** Configure configures the resource provider with "globals" that control its behavior. + */ + override def configure(request: pulumirpc.provider.ConfigureRequest): pulumirpc.provider.ConfigureResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_CONFIGURE, options, request) + } + + /** Invoke dynamically executes a built-in function in the provider. + */ + override def invoke(request: pulumirpc.provider.InvokeRequest): pulumirpc.provider.InvokeResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_INVOKE, options, request) + } + + /** StreamInvoke dynamically executes a built-in function in the provider, which returns a stream + * of responses. + */ + override def streamInvoke(request: pulumirpc.provider.InvokeRequest): scala.collection.Iterator[pulumirpc.provider.InvokeResponse] = { + _root_.scalapb.grpc.ClientCalls.blockingServerStreamingCall(channel, METHOD_STREAM_INVOKE, options, request) + } + + /** Call dynamically executes a method in the provider associated with a component resource. + */ + override def call(request: pulumirpc.provider.CallRequest): pulumirpc.provider.CallResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_CALL, options, request) + } + + /** Check validates that the given property bag is valid for a resource of the given type and returns the inputs + * that should be passed to successive calls to Diff, Create, or Update for this resource. As a rule, the provider + * inputs returned by a call to Check should preserve the original representation of the properties as present in + * the program inputs. Though this rule is not required for correctness, violations thereof can negatively impact + * the end-user experience, as the provider inputs are using for detecting and rendering diffs. + */ + override def check(request: pulumirpc.provider.CheckRequest): pulumirpc.provider.CheckResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_CHECK, options, request) + } + + /** Diff checks what impacts a hypothetical update will have on the resource's properties. + */ + override def diff(request: pulumirpc.provider.DiffRequest): pulumirpc.provider.DiffResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_DIFF, options, request) + } + + /** Create allocates a new instance of the provided resource and returns its unique ID afterwards. (The input ID + * must be blank.) If this call fails, the resource must not have been created (i.e., it is "transactional"). + */ + override def create(request: pulumirpc.provider.CreateRequest): pulumirpc.provider.CreateResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_CREATE, options, request) + } + + /** Read the current live state associated with a resource. Enough state must be include in the inputs to uniquely + * identify the resource; this is typically just the resource ID, but may also include some properties. + */ + override def read(request: pulumirpc.provider.ReadRequest): pulumirpc.provider.ReadResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_READ, options, request) + } + + /** Update updates an existing resource with new values. + */ + override def update(request: pulumirpc.provider.UpdateRequest): pulumirpc.provider.UpdateResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_UPDATE, options, request) + } + + /** Delete tears down an existing resource with the given ID. If it fails, the resource is assumed to still exist. + */ + override def delete(request: pulumirpc.provider.DeleteRequest): com.google.protobuf.empty.Empty = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_DELETE, options, request) + } + + /** Construct creates a new instance of the provided component resource and returns its state. + */ + override def construct(request: pulumirpc.provider.ConstructRequest): pulumirpc.provider.ConstructResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_CONSTRUCT, options, request) + } + + /** Cancel signals the provider to gracefully shut down and abort any ongoing resource operations. + * Operations aborted in this way will return an error (e.g., `Update` and `Create` will either return a + * creation error or an initialization error). Since Cancel is advisory and non-blocking, it is up + * to the host to decide how long to wait after Cancel is called before (e.g.) + * hard-closing any gRPC connection. + */ + override def cancel(request: com.google.protobuf.empty.Empty): com.google.protobuf.empty.Empty = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_CANCEL, options, request) + } + + /** GetPluginInfo returns generic information about this plugin, like its version. + */ + override def getPluginInfo(request: com.google.protobuf.empty.Empty): pulumirpc.plugin.PluginInfo = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GET_PLUGIN_INFO, options, request) + } + + /** Attach sends the engine address to an already running plugin. + */ + override def attach(request: pulumirpc.plugin.PluginAttach): com.google.protobuf.empty.Empty = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_ATTACH, options, request) + } + + /** GetMapping fetches the mapping for this resource provider, if any. A provider should return an empty + * response (not an error) if it doesn't have a mapping for the given key. + */ + override def getMapping(request: pulumirpc.provider.GetMappingRequest): pulumirpc.provider.GetMappingResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GET_MAPPING, options, request) + } + + /** GetMappings is an optional method that returns what mappings (if any) a provider supports. If a provider does not + * implement this method the engine falls back to the old behaviour of just calling GetMapping without a name. + * If this method is implemented than the engine will then call GetMapping only with the names returned from this method. + */ + override def getMappings(request: pulumirpc.provider.GetMappingsRequest): pulumirpc.provider.GetMappingsResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GET_MAPPINGS, options, request) + } + + override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): ResourceProviderBlockingStub = new ResourceProviderBlockingStub(channel, options) + } + + class ResourceProviderStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[ResourceProviderStub](channel, options) with ResourceProvider { + /** GetSchema fetches the schema for this resource provider. + */ + override def getSchema(request: pulumirpc.provider.GetSchemaRequest): scala.concurrent.Future[pulumirpc.provider.GetSchemaResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GET_SCHEMA, options, request) + } + + /** CheckConfig validates the configuration for this resource provider. + */ + override def checkConfig(request: pulumirpc.provider.CheckRequest): scala.concurrent.Future[pulumirpc.provider.CheckResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_CHECK_CONFIG, options, request) + } + + /** DiffConfig checks the impact a hypothetical change to this provider's configuration will have on the provider. + */ + override def diffConfig(request: pulumirpc.provider.DiffRequest): scala.concurrent.Future[pulumirpc.provider.DiffResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_DIFF_CONFIG, options, request) + } + + /** Configure configures the resource provider with "globals" that control its behavior. + */ + override def configure(request: pulumirpc.provider.ConfigureRequest): scala.concurrent.Future[pulumirpc.provider.ConfigureResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_CONFIGURE, options, request) + } + + /** Invoke dynamically executes a built-in function in the provider. + */ + override def invoke(request: pulumirpc.provider.InvokeRequest): scala.concurrent.Future[pulumirpc.provider.InvokeResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_INVOKE, options, request) + } + + /** StreamInvoke dynamically executes a built-in function in the provider, which returns a stream + * of responses. + */ + override def streamInvoke(request: pulumirpc.provider.InvokeRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.InvokeResponse]): _root_.scala.Unit = { + _root_.scalapb.grpc.ClientCalls.asyncServerStreamingCall(channel, METHOD_STREAM_INVOKE, options, request, responseObserver) + } + + /** Call dynamically executes a method in the provider associated with a component resource. + */ + override def call(request: pulumirpc.provider.CallRequest): scala.concurrent.Future[pulumirpc.provider.CallResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_CALL, options, request) + } + + /** Check validates that the given property bag is valid for a resource of the given type and returns the inputs + * that should be passed to successive calls to Diff, Create, or Update for this resource. As a rule, the provider + * inputs returned by a call to Check should preserve the original representation of the properties as present in + * the program inputs. Though this rule is not required for correctness, violations thereof can negatively impact + * the end-user experience, as the provider inputs are using for detecting and rendering diffs. + */ + override def check(request: pulumirpc.provider.CheckRequest): scala.concurrent.Future[pulumirpc.provider.CheckResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_CHECK, options, request) + } + + /** Diff checks what impacts a hypothetical update will have on the resource's properties. + */ + override def diff(request: pulumirpc.provider.DiffRequest): scala.concurrent.Future[pulumirpc.provider.DiffResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_DIFF, options, request) + } + + /** Create allocates a new instance of the provided resource and returns its unique ID afterwards. (The input ID + * must be blank.) If this call fails, the resource must not have been created (i.e., it is "transactional"). + */ + override def create(request: pulumirpc.provider.CreateRequest): scala.concurrent.Future[pulumirpc.provider.CreateResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_CREATE, options, request) + } + + /** Read the current live state associated with a resource. Enough state must be include in the inputs to uniquely + * identify the resource; this is typically just the resource ID, but may also include some properties. + */ + override def read(request: pulumirpc.provider.ReadRequest): scala.concurrent.Future[pulumirpc.provider.ReadResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_READ, options, request) + } + + /** Update updates an existing resource with new values. + */ + override def update(request: pulumirpc.provider.UpdateRequest): scala.concurrent.Future[pulumirpc.provider.UpdateResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_UPDATE, options, request) + } + + /** Delete tears down an existing resource with the given ID. If it fails, the resource is assumed to still exist. + */ + override def delete(request: pulumirpc.provider.DeleteRequest): scala.concurrent.Future[com.google.protobuf.empty.Empty] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_DELETE, options, request) + } + + /** Construct creates a new instance of the provided component resource and returns its state. + */ + override def construct(request: pulumirpc.provider.ConstructRequest): scala.concurrent.Future[pulumirpc.provider.ConstructResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_CONSTRUCT, options, request) + } + + /** Cancel signals the provider to gracefully shut down and abort any ongoing resource operations. + * Operations aborted in this way will return an error (e.g., `Update` and `Create` will either return a + * creation error or an initialization error). Since Cancel is advisory and non-blocking, it is up + * to the host to decide how long to wait after Cancel is called before (e.g.) + * hard-closing any gRPC connection. + */ + override def cancel(request: com.google.protobuf.empty.Empty): scala.concurrent.Future[com.google.protobuf.empty.Empty] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_CANCEL, options, request) + } + + /** GetPluginInfo returns generic information about this plugin, like its version. + */ + override def getPluginInfo(request: com.google.protobuf.empty.Empty): scala.concurrent.Future[pulumirpc.plugin.PluginInfo] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GET_PLUGIN_INFO, options, request) + } + + /** Attach sends the engine address to an already running plugin. + */ + override def attach(request: pulumirpc.plugin.PluginAttach): scala.concurrent.Future[com.google.protobuf.empty.Empty] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_ATTACH, options, request) + } + + /** GetMapping fetches the mapping for this resource provider, if any. A provider should return an empty + * response (not an error) if it doesn't have a mapping for the given key. + */ + override def getMapping(request: pulumirpc.provider.GetMappingRequest): scala.concurrent.Future[pulumirpc.provider.GetMappingResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GET_MAPPING, options, request) + } + + /** GetMappings is an optional method that returns what mappings (if any) a provider supports. If a provider does not + * implement this method the engine falls back to the old behaviour of just calling GetMapping without a name. + * If this method is implemented than the engine will then call GetMapping only with the names returned from this method. + */ + override def getMappings(request: pulumirpc.provider.GetMappingsRequest): scala.concurrent.Future[pulumirpc.provider.GetMappingsResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GET_MAPPINGS, options, request) + } + + override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): ResourceProviderStub = new ResourceProviderStub(channel, options) + } + + object ResourceProviderStub extends _root_.io.grpc.stub.AbstractStub.StubFactory[ResourceProviderStub] { + override def newStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): ResourceProviderStub = new ResourceProviderStub(channel, options) + + implicit val stubFactory: _root_.io.grpc.stub.AbstractStub.StubFactory[ResourceProviderStub] = this + } + + def bindService(serviceImpl: ResourceProvider, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = ResourceProvider.bindService(serviceImpl, executionContext) + + def blockingStub(channel: _root_.io.grpc.Channel): ResourceProviderBlockingStub = new ResourceProviderBlockingStub(channel) + + def stub(channel: _root_.io.grpc.Channel): ResourceProviderStub = new ResourceProviderStub(channel) + + def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = pulumirpc.provider.ProviderProto.javaDescriptor.getServices().get(0) + +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/UpdateRequest.scala b/besom-rpc/src/main/scala/pulumirpc/provider/UpdateRequest.scala new file mode 100644 index 00000000..70dd862a --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/UpdateRequest.scala @@ -0,0 +1,340 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** NOTE: The partial-update-error equivalent of this message is `ErrorResourceInitFailed`. + * + * @param id + * the ID of the resource to update. + * @param urn + * the Pulumi URN for this resource. + * @param olds + * the old values of provider inputs for the resource to update. + * @param news + * the new values of provider inputs for the resource to update. + * @param timeout + * the update request timeout represented in seconds. + * @param ignoreChanges + * a set of property paths that should be treated as unchanged. + * @param preview + * true if this is a preview and the provider should not actually create the resource. + * @param oldInputs + * the old input values of the resource to diff. + */ +@SerialVersionUID(0L) +final case class UpdateRequest( + id: _root_.scala.Predef.String = "", + urn: _root_.scala.Predef.String = "", + olds: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + news: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + timeout: _root_.scala.Double = 0.0, + ignoreChanges: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + preview: _root_.scala.Boolean = false, + oldInputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[UpdateRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = id + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + if (olds.isDefined) { + val __value = olds.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + if (news.isDefined) { + val __value = news.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + + { + val __value = timeout + if (__value != 0.0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeDoubleSize(5, __value) + } + }; + ignoreChanges.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(6, __value) + } + + { + val __value = preview + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(7, __value) + } + }; + if (oldInputs.isDefined) { + val __value = oldInputs.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = id + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + olds.foreach { __v => + val __m = __v + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + news.foreach { __v => + val __m = __v + _output__.writeTag(4, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = timeout + if (__v != 0.0) { + _output__.writeDouble(5, __v) + } + }; + ignoreChanges.foreach { __v => + val __m = __v + _output__.writeString(6, __m) + }; + { + val __v = preview + if (__v != false) { + _output__.writeBool(7, __v) + } + }; + oldInputs.foreach { __v => + val __m = __v + _output__.writeTag(8, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withId(__v: _root_.scala.Predef.String): UpdateRequest = copy(id = __v) + def withUrn(__v: _root_.scala.Predef.String): UpdateRequest = copy(urn = __v) + def getOlds: com.google.protobuf.struct.Struct = olds.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearOlds: UpdateRequest = copy(olds = _root_.scala.None) + def withOlds(__v: com.google.protobuf.struct.Struct): UpdateRequest = copy(olds = Option(__v)) + def getNews: com.google.protobuf.struct.Struct = news.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearNews: UpdateRequest = copy(news = _root_.scala.None) + def withNews(__v: com.google.protobuf.struct.Struct): UpdateRequest = copy(news = Option(__v)) + def withTimeout(__v: _root_.scala.Double): UpdateRequest = copy(timeout = __v) + def clearIgnoreChanges = copy(ignoreChanges = _root_.scala.Seq.empty) + def addIgnoreChanges(__vs: _root_.scala.Predef.String *): UpdateRequest = addAllIgnoreChanges(__vs) + def addAllIgnoreChanges(__vs: Iterable[_root_.scala.Predef.String]): UpdateRequest = copy(ignoreChanges = ignoreChanges ++ __vs) + def withIgnoreChanges(__v: _root_.scala.Seq[_root_.scala.Predef.String]): UpdateRequest = copy(ignoreChanges = __v) + def withPreview(__v: _root_.scala.Boolean): UpdateRequest = copy(preview = __v) + def getOldInputs: com.google.protobuf.struct.Struct = oldInputs.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearOldInputs: UpdateRequest = copy(oldInputs = _root_.scala.None) + def withOldInputs(__v: com.google.protobuf.struct.Struct): UpdateRequest = copy(oldInputs = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = id + if (__t != "") __t else null + } + case 2 => { + val __t = urn + if (__t != "") __t else null + } + case 3 => olds.orNull + case 4 => news.orNull + case 5 => { + val __t = timeout + if (__t != 0.0) __t else null + } + case 6 => ignoreChanges + case 7 => { + val __t = preview + if (__t != false) __t else null + } + case 8 => oldInputs.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(id) + case 2 => _root_.scalapb.descriptors.PString(urn) + case 3 => olds.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 4 => news.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 5 => _root_.scalapb.descriptors.PDouble(timeout) + case 6 => _root_.scalapb.descriptors.PRepeated(ignoreChanges.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 7 => _root_.scalapb.descriptors.PBoolean(preview) + case 8 => oldInputs.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.UpdateRequest.type = pulumirpc.provider.UpdateRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.UpdateRequest]) +} + +object UpdateRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.UpdateRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.UpdateRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.UpdateRequest = { + var __id: _root_.scala.Predef.String = "" + var __urn: _root_.scala.Predef.String = "" + var __olds: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __news: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __timeout: _root_.scala.Double = 0.0 + val __ignoreChanges: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __preview: _root_.scala.Boolean = false + var __oldInputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __id = _input__.readStringRequireUtf8() + case 18 => + __urn = _input__.readStringRequireUtf8() + case 26 => + __olds = _root_.scala.Option(__olds.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 34 => + __news = _root_.scala.Option(__news.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 41 => + __timeout = _input__.readDouble() + case 50 => + __ignoreChanges += _input__.readStringRequireUtf8() + case 56 => + __preview = _input__.readBool() + case 66 => + __oldInputs = _root_.scala.Option(__oldInputs.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.UpdateRequest( + id = __id, + urn = __urn, + olds = __olds, + news = __news, + timeout = __timeout, + ignoreChanges = __ignoreChanges.result(), + preview = __preview, + oldInputs = __oldInputs, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.UpdateRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.UpdateRequest( + id = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + olds = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + news = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + timeout = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Double]).getOrElse(0.0), + ignoreChanges = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + preview = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + oldInputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(19) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(19) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 3 => __out = com.google.protobuf.struct.Struct + case 4 => __out = com.google.protobuf.struct.Struct + case 8 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.UpdateRequest( + id = "", + urn = "", + olds = _root_.scala.None, + news = _root_.scala.None, + timeout = 0.0, + ignoreChanges = _root_.scala.Seq.empty, + preview = false, + oldInputs = _root_.scala.None + ) + implicit class UpdateRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.UpdateRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.UpdateRequest](_l) { + def id: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.id)((c_, f_) => c_.copy(id = f_)) + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + def olds: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getOlds)((c_, f_) => c_.copy(olds = _root_.scala.Option(f_))) + def optionalOlds: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.olds)((c_, f_) => c_.copy(olds = f_)) + def news: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getNews)((c_, f_) => c_.copy(news = _root_.scala.Option(f_))) + def optionalNews: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.news)((c_, f_) => c_.copy(news = f_)) + def timeout: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Double] = field(_.timeout)((c_, f_) => c_.copy(timeout = f_)) + def ignoreChanges: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.ignoreChanges)((c_, f_) => c_.copy(ignoreChanges = f_)) + def preview: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.preview)((c_, f_) => c_.copy(preview = f_)) + def oldInputs: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getOldInputs)((c_, f_) => c_.copy(oldInputs = _root_.scala.Option(f_))) + def optionalOldInputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.oldInputs)((c_, f_) => c_.copy(oldInputs = f_)) + } + final val ID_FIELD_NUMBER = 1 + final val URN_FIELD_NUMBER = 2 + final val OLDS_FIELD_NUMBER = 3 + final val NEWS_FIELD_NUMBER = 4 + final val TIMEOUT_FIELD_NUMBER = 5 + final val IGNORECHANGES_FIELD_NUMBER = 6 + final val PREVIEW_FIELD_NUMBER = 7 + final val OLD_INPUTS_FIELD_NUMBER = 8 + def of( + id: _root_.scala.Predef.String, + urn: _root_.scala.Predef.String, + olds: _root_.scala.Option[com.google.protobuf.struct.Struct], + news: _root_.scala.Option[com.google.protobuf.struct.Struct], + timeout: _root_.scala.Double, + ignoreChanges: _root_.scala.Seq[_root_.scala.Predef.String], + preview: _root_.scala.Boolean, + oldInputs: _root_.scala.Option[com.google.protobuf.struct.Struct] + ): _root_.pulumirpc.provider.UpdateRequest = _root_.pulumirpc.provider.UpdateRequest( + id, + urn, + olds, + news, + timeout, + ignoreChanges, + preview, + oldInputs + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.UpdateRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/provider/UpdateResponse.scala b/besom-rpc/src/main/scala/pulumirpc/provider/UpdateResponse.scala new file mode 100644 index 00000000..8c96137b --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/provider/UpdateResponse.scala @@ -0,0 +1,123 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.provider + +/** @param properties + * any properties that were computed during updating. + */ +@SerialVersionUID(0L) +final case class UpdateResponse( + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[UpdateResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + if (properties.isDefined) { + val __value = properties.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + properties.foreach { __v => + val __m = __v + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def getProperties: com.google.protobuf.struct.Struct = properties.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearProperties: UpdateResponse = copy(properties = _root_.scala.None) + def withProperties(__v: com.google.protobuf.struct.Struct): UpdateResponse = copy(properties = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => properties.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => properties.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.provider.UpdateResponse.type = pulumirpc.provider.UpdateResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.UpdateResponse]) +} + +object UpdateResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider.UpdateResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.provider.UpdateResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.provider.UpdateResponse = { + var __properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __properties = _root_.scala.Option(__properties.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.provider.UpdateResponse( + properties = __properties, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.provider.UpdateResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.provider.UpdateResponse( + properties = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ProviderProto.javaDescriptor.getMessageTypes().get(20) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ProviderProto.scalaDescriptor.messages(20) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.provider.UpdateResponse( + properties = _root_.scala.None + ) + implicit class UpdateResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.provider.UpdateResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.provider.UpdateResponse](_l) { + def properties: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getProperties)((c_, f_) => c_.copy(properties = _root_.scala.Option(f_))) + def optionalProperties: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.properties)((c_, f_) => c_.copy(properties = f_)) + } + final val PROPERTIES_FIELD_NUMBER = 1 + def of( + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] + ): _root_.pulumirpc.provider.UpdateResponse = _root_.pulumirpc.provider.UpdateResponse( + properties + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.UpdateResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/ReadResourceRequest.scala b/besom-rpc/src/main/scala/pulumirpc/resource/ReadResourceRequest.scala new file mode 100644 index 00000000..80f7d23d --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/ReadResourceRequest.scala @@ -0,0 +1,676 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +/** ReadResourceRequest contains enough information to uniquely qualify and read a resource's state. + * + * @param id + * the ID of the resource to read. + * @param type + * the type of the resource object. + * @param name + * the name, for URN purposes, of the object. + * @param parent + * an optional parent URN that this child resource belongs to. + * @param properties + * optional state sufficient to uniquely identify the resource. + * @param dependencies + * a list of URNs that this read depends on, as observed by the language host. + * @param provider + * an optional reference to the provider to use for this read. + * @param version + * the version of the provider to use when servicing this request. + * @param acceptSecrets + * when true operations should return secrets as strongly typed. + * @param additionalSecretOutputs + * a list of output properties that should also be treated as secret, in addition to ones we detect. + * @param acceptResources + * when true operations should return resource references as strongly typed. + * @param pluginDownloadURL + * the server url of the provider to use when servicing this request. + * @param pluginChecksums + * a map of checksums of the provider to use when servicing this request. + * @param sourcePosition + * the optional source position of the user code that initiated the read. + */ +@SerialVersionUID(0L) +final case class ReadResourceRequest( + id: _root_.scala.Predef.String = "", + `type`: _root_.scala.Predef.String = "", + name: _root_.scala.Predef.String = "", + parent: _root_.scala.Predef.String = "", + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + dependencies: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + provider: _root_.scala.Predef.String = "", + version: _root_.scala.Predef.String = "", + acceptSecrets: _root_.scala.Boolean = false, + additionalSecretOutputs: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + acceptResources: _root_.scala.Boolean = false, + pluginDownloadURL: _root_.scala.Predef.String = "", + pluginChecksums: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] = _root_.scala.collection.immutable.Map.empty, + sourcePosition: _root_.scala.Option[pulumirpc.source.SourcePosition] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ReadResourceRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = id + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = `type` + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = name + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + + { + val __value = parent + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value) + } + }; + if (properties.isDefined) { + val __value = properties.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + dependencies.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(6, __value) + } + + { + val __value = provider + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(7, __value) + } + }; + + { + val __value = version + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(8, __value) + } + }; + + { + val __value = acceptSecrets + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(9, __value) + } + }; + additionalSecretOutputs.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(10, __value) + } + + { + val __value = acceptResources + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(12, __value) + } + }; + + { + val __value = pluginDownloadURL + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(13, __value) + } + }; + pluginChecksums.foreach { __item => + val __value = pulumirpc.resource.ReadResourceRequest._typemapper_pluginChecksums.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + if (sourcePosition.isDefined) { + val __value = sourcePosition.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = id + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = `type` + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = name + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + { + val __v = parent + if (!__v.isEmpty) { + _output__.writeString(4, __v) + } + }; + properties.foreach { __v => + val __m = __v + _output__.writeTag(5, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + dependencies.foreach { __v => + val __m = __v + _output__.writeString(6, __m) + }; + { + val __v = provider + if (!__v.isEmpty) { + _output__.writeString(7, __v) + } + }; + { + val __v = version + if (!__v.isEmpty) { + _output__.writeString(8, __v) + } + }; + { + val __v = acceptSecrets + if (__v != false) { + _output__.writeBool(9, __v) + } + }; + additionalSecretOutputs.foreach { __v => + val __m = __v + _output__.writeString(10, __m) + }; + { + val __v = acceptResources + if (__v != false) { + _output__.writeBool(12, __v) + } + }; + { + val __v = pluginDownloadURL + if (!__v.isEmpty) { + _output__.writeString(13, __v) + } + }; + sourcePosition.foreach { __v => + val __m = __v + _output__.writeTag(14, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + pluginChecksums.foreach { __v => + val __m = pulumirpc.resource.ReadResourceRequest._typemapper_pluginChecksums.toBase(__v) + _output__.writeTag(15, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withId(__v: _root_.scala.Predef.String): ReadResourceRequest = copy(id = __v) + def withType(__v: _root_.scala.Predef.String): ReadResourceRequest = copy(`type` = __v) + def withName(__v: _root_.scala.Predef.String): ReadResourceRequest = copy(name = __v) + def withParent(__v: _root_.scala.Predef.String): ReadResourceRequest = copy(parent = __v) + def getProperties: com.google.protobuf.struct.Struct = properties.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearProperties: ReadResourceRequest = copy(properties = _root_.scala.None) + def withProperties(__v: com.google.protobuf.struct.Struct): ReadResourceRequest = copy(properties = Option(__v)) + def clearDependencies = copy(dependencies = _root_.scala.Seq.empty) + def addDependencies(__vs: _root_.scala.Predef.String *): ReadResourceRequest = addAllDependencies(__vs) + def addAllDependencies(__vs: Iterable[_root_.scala.Predef.String]): ReadResourceRequest = copy(dependencies = dependencies ++ __vs) + def withDependencies(__v: _root_.scala.Seq[_root_.scala.Predef.String]): ReadResourceRequest = copy(dependencies = __v) + def withProvider(__v: _root_.scala.Predef.String): ReadResourceRequest = copy(provider = __v) + def withVersion(__v: _root_.scala.Predef.String): ReadResourceRequest = copy(version = __v) + def withAcceptSecrets(__v: _root_.scala.Boolean): ReadResourceRequest = copy(acceptSecrets = __v) + def clearAdditionalSecretOutputs = copy(additionalSecretOutputs = _root_.scala.Seq.empty) + def addAdditionalSecretOutputs(__vs: _root_.scala.Predef.String *): ReadResourceRequest = addAllAdditionalSecretOutputs(__vs) + def addAllAdditionalSecretOutputs(__vs: Iterable[_root_.scala.Predef.String]): ReadResourceRequest = copy(additionalSecretOutputs = additionalSecretOutputs ++ __vs) + def withAdditionalSecretOutputs(__v: _root_.scala.Seq[_root_.scala.Predef.String]): ReadResourceRequest = copy(additionalSecretOutputs = __v) + def withAcceptResources(__v: _root_.scala.Boolean): ReadResourceRequest = copy(acceptResources = __v) + def withPluginDownloadURL(__v: _root_.scala.Predef.String): ReadResourceRequest = copy(pluginDownloadURL = __v) + def clearPluginChecksums = copy(pluginChecksums = _root_.scala.collection.immutable.Map.empty) + def addPluginChecksums(__vs: (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString) *): ReadResourceRequest = addAllPluginChecksums(__vs) + def addAllPluginChecksums(__vs: Iterable[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]): ReadResourceRequest = copy(pluginChecksums = pluginChecksums ++ __vs) + def withPluginChecksums(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]): ReadResourceRequest = copy(pluginChecksums = __v) + def getSourcePosition: pulumirpc.source.SourcePosition = sourcePosition.getOrElse(pulumirpc.source.SourcePosition.defaultInstance) + def clearSourcePosition: ReadResourceRequest = copy(sourcePosition = _root_.scala.None) + def withSourcePosition(__v: pulumirpc.source.SourcePosition): ReadResourceRequest = copy(sourcePosition = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = id + if (__t != "") __t else null + } + case 2 => { + val __t = `type` + if (__t != "") __t else null + } + case 3 => { + val __t = name + if (__t != "") __t else null + } + case 4 => { + val __t = parent + if (__t != "") __t else null + } + case 5 => properties.orNull + case 6 => dependencies + case 7 => { + val __t = provider + if (__t != "") __t else null + } + case 8 => { + val __t = version + if (__t != "") __t else null + } + case 9 => { + val __t = acceptSecrets + if (__t != false) __t else null + } + case 10 => additionalSecretOutputs + case 12 => { + val __t = acceptResources + if (__t != false) __t else null + } + case 13 => { + val __t = pluginDownloadURL + if (__t != "") __t else null + } + case 15 => pluginChecksums.iterator.map(pulumirpc.resource.ReadResourceRequest._typemapper_pluginChecksums.toBase(_)).toSeq + case 14 => sourcePosition.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(id) + case 2 => _root_.scalapb.descriptors.PString(`type`) + case 3 => _root_.scalapb.descriptors.PString(name) + case 4 => _root_.scalapb.descriptors.PString(parent) + case 5 => properties.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 6 => _root_.scalapb.descriptors.PRepeated(dependencies.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 7 => _root_.scalapb.descriptors.PString(provider) + case 8 => _root_.scalapb.descriptors.PString(version) + case 9 => _root_.scalapb.descriptors.PBoolean(acceptSecrets) + case 10 => _root_.scalapb.descriptors.PRepeated(additionalSecretOutputs.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 12 => _root_.scalapb.descriptors.PBoolean(acceptResources) + case 13 => _root_.scalapb.descriptors.PString(pluginDownloadURL) + case 15 => _root_.scalapb.descriptors.PRepeated(pluginChecksums.iterator.map(pulumirpc.resource.ReadResourceRequest._typemapper_pluginChecksums.toBase(_).toPMessage).toVector) + case 14 => sourcePosition.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.ReadResourceRequest.type = pulumirpc.resource.ReadResourceRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ReadResourceRequest]) +} + +object ReadResourceRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.ReadResourceRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.ReadResourceRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.ReadResourceRequest = { + var __id: _root_.scala.Predef.String = "" + var __type: _root_.scala.Predef.String = "" + var __name: _root_.scala.Predef.String = "" + var __parent: _root_.scala.Predef.String = "" + var __properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + val __dependencies: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __provider: _root_.scala.Predef.String = "" + var __version: _root_.scala.Predef.String = "" + var __acceptSecrets: _root_.scala.Boolean = false + val __additionalSecretOutputs: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __acceptResources: _root_.scala.Boolean = false + var __pluginDownloadURL: _root_.scala.Predef.String = "" + val __pluginChecksums: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] + var __sourcePosition: _root_.scala.Option[pulumirpc.source.SourcePosition] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __id = _input__.readStringRequireUtf8() + case 18 => + __type = _input__.readStringRequireUtf8() + case 26 => + __name = _input__.readStringRequireUtf8() + case 34 => + __parent = _input__.readStringRequireUtf8() + case 42 => + __properties = _root_.scala.Option(__properties.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 50 => + __dependencies += _input__.readStringRequireUtf8() + case 58 => + __provider = _input__.readStringRequireUtf8() + case 66 => + __version = _input__.readStringRequireUtf8() + case 72 => + __acceptSecrets = _input__.readBool() + case 82 => + __additionalSecretOutputs += _input__.readStringRequireUtf8() + case 96 => + __acceptResources = _input__.readBool() + case 106 => + __pluginDownloadURL = _input__.readStringRequireUtf8() + case 122 => + __pluginChecksums += pulumirpc.resource.ReadResourceRequest._typemapper_pluginChecksums.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry](_input__)) + case 114 => + __sourcePosition = _root_.scala.Option(__sourcePosition.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.source.SourcePosition](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.ReadResourceRequest( + id = __id, + `type` = __type, + name = __name, + parent = __parent, + properties = __properties, + dependencies = __dependencies.result(), + provider = __provider, + version = __version, + acceptSecrets = __acceptSecrets, + additionalSecretOutputs = __additionalSecretOutputs.result(), + acceptResources = __acceptResources, + pluginDownloadURL = __pluginDownloadURL, + pluginChecksums = __pluginChecksums.result(), + sourcePosition = __sourcePosition, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.ReadResourceRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.ReadResourceRequest( + id = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + `type` = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + parent = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + properties = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + dependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + provider = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + version = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + acceptSecrets = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + additionalSecretOutputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + acceptResources = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + pluginDownloadURL = __fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + pluginChecksums = __fieldsMap.get(scalaDescriptor.findFieldByNumber(15).get).map(_.as[_root_.scala.Seq[pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.resource.ReadResourceRequest._typemapper_pluginChecksums.toCustom(_)).toMap, + sourcePosition = __fieldsMap.get(scalaDescriptor.findFieldByNumber(14).get).flatMap(_.as[_root_.scala.Option[pulumirpc.source.SourcePosition]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ResourceProto.javaDescriptor.getMessageTypes().get(2) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ResourceProto.scalaDescriptor.messages(2) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 5 => __out = com.google.protobuf.struct.Struct + case 15 => __out = pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry + case 14 => __out = pulumirpc.source.SourcePosition + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.resource.ReadResourceRequest( + id = "", + `type` = "", + name = "", + parent = "", + properties = _root_.scala.None, + dependencies = _root_.scala.Seq.empty, + provider = "", + version = "", + acceptSecrets = false, + additionalSecretOutputs = _root_.scala.Seq.empty, + acceptResources = false, + pluginDownloadURL = "", + pluginChecksums = _root_.scala.collection.immutable.Map.empty, + sourcePosition = _root_.scala.None + ) + @SerialVersionUID(0L) + final case class PluginChecksumsEntry( + key: _root_.scala.Predef.String = "", + value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PluginChecksumsEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeBytes(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): PluginChecksumsEntry = copy(key = __v) + def withValue(__v: _root_.com.google.protobuf.ByteString): PluginChecksumsEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PByteString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry.type = pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ReadResourceRequest.PluginChecksumsEntry]) + } + + object PluginChecksumsEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.ReadResourceRequest.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.ReadResourceRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry( + key = "", + value = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class PluginChecksumsEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = + _root_.scalapb.TypeMapper[pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)](__m => (__m.key, __m.value))(__p => pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry = _root_.pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ReadResourceRequest.PluginChecksumsEntry]) + } + + implicit class ReadResourceRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.ReadResourceRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.ReadResourceRequest](_l) { + def id: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.id)((c_, f_) => c_.copy(id = f_)) + def `type`: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.`type`)((c_, f_) => c_.copy(`type` = f_)) + def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_)) + def parent: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.parent)((c_, f_) => c_.copy(parent = f_)) + def properties: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getProperties)((c_, f_) => c_.copy(properties = _root_.scala.Option(f_))) + def optionalProperties: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.properties)((c_, f_) => c_.copy(properties = f_)) + def dependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.dependencies)((c_, f_) => c_.copy(dependencies = f_)) + def provider: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.provider)((c_, f_) => c_.copy(provider = f_)) + def version: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.version)((c_, f_) => c_.copy(version = f_)) + def acceptSecrets: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.acceptSecrets)((c_, f_) => c_.copy(acceptSecrets = f_)) + def additionalSecretOutputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.additionalSecretOutputs)((c_, f_) => c_.copy(additionalSecretOutputs = f_)) + def acceptResources: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.acceptResources)((c_, f_) => c_.copy(acceptResources = f_)) + def pluginDownloadURL: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.pluginDownloadURL)((c_, f_) => c_.copy(pluginDownloadURL = f_)) + def pluginChecksums: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = field(_.pluginChecksums)((c_, f_) => c_.copy(pluginChecksums = f_)) + def sourcePosition: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.source.SourcePosition] = field(_.getSourcePosition)((c_, f_) => c_.copy(sourcePosition = _root_.scala.Option(f_))) + def optionalSourcePosition: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.source.SourcePosition]] = field(_.sourcePosition)((c_, f_) => c_.copy(sourcePosition = f_)) + } + final val ID_FIELD_NUMBER = 1 + final val TYPE_FIELD_NUMBER = 2 + final val NAME_FIELD_NUMBER = 3 + final val PARENT_FIELD_NUMBER = 4 + final val PROPERTIES_FIELD_NUMBER = 5 + final val DEPENDENCIES_FIELD_NUMBER = 6 + final val PROVIDER_FIELD_NUMBER = 7 + final val VERSION_FIELD_NUMBER = 8 + final val ACCEPTSECRETS_FIELD_NUMBER = 9 + final val ADDITIONALSECRETOUTPUTS_FIELD_NUMBER = 10 + final val ACCEPTRESOURCES_FIELD_NUMBER = 12 + final val PLUGINDOWNLOADURL_FIELD_NUMBER = 13 + final val PLUGINCHECKSUMS_FIELD_NUMBER = 15 + final val SOURCEPOSITION_FIELD_NUMBER = 14 + @transient + private[resource] val _typemapper_pluginChecksums: _root_.scalapb.TypeMapper[pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.resource.ReadResourceRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]] + def of( + id: _root_.scala.Predef.String, + `type`: _root_.scala.Predef.String, + name: _root_.scala.Predef.String, + parent: _root_.scala.Predef.String, + properties: _root_.scala.Option[com.google.protobuf.struct.Struct], + dependencies: _root_.scala.Seq[_root_.scala.Predef.String], + provider: _root_.scala.Predef.String, + version: _root_.scala.Predef.String, + acceptSecrets: _root_.scala.Boolean, + additionalSecretOutputs: _root_.scala.Seq[_root_.scala.Predef.String], + acceptResources: _root_.scala.Boolean, + pluginDownloadURL: _root_.scala.Predef.String, + pluginChecksums: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString], + sourcePosition: _root_.scala.Option[pulumirpc.source.SourcePosition] + ): _root_.pulumirpc.resource.ReadResourceRequest = _root_.pulumirpc.resource.ReadResourceRequest( + id, + `type`, + name, + parent, + properties, + dependencies, + provider, + version, + acceptSecrets, + additionalSecretOutputs, + acceptResources, + pluginDownloadURL, + pluginChecksums, + sourcePosition + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ReadResourceRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/ReadResourceResponse.scala b/besom-rpc/src/main/scala/pulumirpc/resource/ReadResourceResponse.scala new file mode 100644 index 00000000..64bb6d5c --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/ReadResourceResponse.scala @@ -0,0 +1,157 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +/** ReadResourceResponse contains the result of reading a resource's state. + * + * @param urn + * the URN for this resource. + * @param properties + * the state of the resource read from the live environment. + */ +@SerialVersionUID(0L) +final case class ReadResourceResponse( + urn: _root_.scala.Predef.String = "", + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ReadResourceResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (properties.isDefined) { + val __value = properties.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + properties.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withUrn(__v: _root_.scala.Predef.String): ReadResourceResponse = copy(urn = __v) + def getProperties: com.google.protobuf.struct.Struct = properties.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearProperties: ReadResourceResponse = copy(properties = _root_.scala.None) + def withProperties(__v: com.google.protobuf.struct.Struct): ReadResourceResponse = copy(properties = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = urn + if (__t != "") __t else null + } + case 2 => properties.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(urn) + case 2 => properties.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.ReadResourceResponse.type = pulumirpc.resource.ReadResourceResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ReadResourceResponse]) +} + +object ReadResourceResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.ReadResourceResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.ReadResourceResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.ReadResourceResponse = { + var __urn: _root_.scala.Predef.String = "" + var __properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urn = _input__.readStringRequireUtf8() + case 18 => + __properties = _root_.scala.Option(__properties.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.ReadResourceResponse( + urn = __urn, + properties = __properties, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.ReadResourceResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.ReadResourceResponse( + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + properties = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ResourceProto.javaDescriptor.getMessageTypes().get(3) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ResourceProto.scalaDescriptor.messages(3) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.resource.ReadResourceResponse( + urn = "", + properties = _root_.scala.None + ) + implicit class ReadResourceResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.ReadResourceResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.ReadResourceResponse](_l) { + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + def properties: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getProperties)((c_, f_) => c_.copy(properties = _root_.scala.Option(f_))) + def optionalProperties: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.properties)((c_, f_) => c_.copy(properties = f_)) + } + final val URN_FIELD_NUMBER = 1 + final val PROPERTIES_FIELD_NUMBER = 2 + def of( + urn: _root_.scala.Predef.String, + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] + ): _root_.pulumirpc.resource.ReadResourceResponse = _root_.pulumirpc.resource.ReadResourceResponse( + urn, + properties + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ReadResourceResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/RegisterResourceOutputsRequest.scala b/besom-rpc/src/main/scala/pulumirpc/resource/RegisterResourceOutputsRequest.scala new file mode 100644 index 00000000..111aa7f6 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/RegisterResourceOutputsRequest.scala @@ -0,0 +1,157 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +/** RegisterResourceOutputsRequest adds extra resource outputs created by the program after registration has occurred. + * + * @param urn + * the URN for the resource to attach output properties to. + * @param outputs + * additional output properties to add to the existing resource. + */ +@SerialVersionUID(0L) +final case class RegisterResourceOutputsRequest( + urn: _root_.scala.Predef.String = "", + outputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RegisterResourceOutputsRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (outputs.isDefined) { + val __value = outputs.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + outputs.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withUrn(__v: _root_.scala.Predef.String): RegisterResourceOutputsRequest = copy(urn = __v) + def getOutputs: com.google.protobuf.struct.Struct = outputs.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearOutputs: RegisterResourceOutputsRequest = copy(outputs = _root_.scala.None) + def withOutputs(__v: com.google.protobuf.struct.Struct): RegisterResourceOutputsRequest = copy(outputs = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = urn + if (__t != "") __t else null + } + case 2 => outputs.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(urn) + case 2 => outputs.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.RegisterResourceOutputsRequest.type = pulumirpc.resource.RegisterResourceOutputsRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RegisterResourceOutputsRequest]) +} + +object RegisterResourceOutputsRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceOutputsRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceOutputsRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.RegisterResourceOutputsRequest = { + var __urn: _root_.scala.Predef.String = "" + var __outputs: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urn = _input__.readStringRequireUtf8() + case 18 => + __outputs = _root_.scala.Option(__outputs.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.RegisterResourceOutputsRequest( + urn = __urn, + outputs = __outputs, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.RegisterResourceOutputsRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.RegisterResourceOutputsRequest( + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + outputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ResourceProto.javaDescriptor.getMessageTypes().get(6) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ResourceProto.scalaDescriptor.messages(6) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = com.google.protobuf.struct.Struct + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.resource.RegisterResourceOutputsRequest( + urn = "", + outputs = _root_.scala.None + ) + implicit class RegisterResourceOutputsRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceOutputsRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.RegisterResourceOutputsRequest](_l) { + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + def outputs: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getOutputs)((c_, f_) => c_.copy(outputs = _root_.scala.Option(f_))) + def optionalOutputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.outputs)((c_, f_) => c_.copy(outputs = f_)) + } + final val URN_FIELD_NUMBER = 1 + final val OUTPUTS_FIELD_NUMBER = 2 + def of( + urn: _root_.scala.Predef.String, + outputs: _root_.scala.Option[com.google.protobuf.struct.Struct] + ): _root_.pulumirpc.resource.RegisterResourceOutputsRequest = _root_.pulumirpc.resource.RegisterResourceOutputsRequest( + urn, + outputs + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RegisterResourceOutputsRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/RegisterResourceRequest.scala b/besom-rpc/src/main/scala/pulumirpc/resource/RegisterResourceRequest.scala new file mode 100644 index 00000000..faae2d78 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/RegisterResourceRequest.scala @@ -0,0 +1,1823 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +/** RegisterResourceRequest contains information about a resource object that was newly allocated. + * + * @param type + * the type of the object allocated. + * @param name + * the name, for URN purposes, of the object. + * @param parent + * an optional parent URN that this child resource belongs to. + * @param custom + * true if the resource is a custom, managed by a plugin's CRUD operations. + * @param object + * an object produced by the interpreter/source. + * @param protect + * true if the resource should be marked protected. + * @param dependencies + * a list of URNs that this resource depends on, as observed by the language host. + * @param provider + * an optional reference to the provider to manage this resource's CRUD operations. + * @param propertyDependencies + * a map from property keys to the dependencies of the property. + * @param deleteBeforeReplace + * true if this resource should be deleted before replacement. + * @param version + * the version of the provider to use when servicing this request. + * @param ignoreChanges + * a list of property selectors to ignore during updates. + * @param acceptSecrets + * when true operations should return secrets as strongly typed. + * @param additionalSecretOutputs + * a list of output properties that should also be treated as secret, in addition to ones we detect. + * @param aliasURNs + * a list of additional URNs that should be considered the same. + * @param importId + * if set, this resource's state should be imported from the given ID. + * @param customTimeouts + * ability to pass a custom Timeout block. + * @param deleteBeforeReplaceDefined + * true if the deleteBeforeReplace property should be treated as defined even if it is false. + * @param supportsPartialValues + * true if the request is from an SDK that supports partially-known properties during preview. + * @param remote + * true if the resource is a plugin-managed component resource. + * @param acceptResources + * when true operations should return resource references as strongly typed. + * @param providers + * an optional reference to the provider map to manage this resource's CRUD operations. + * @param replaceOnChanges + * a list of properties that if changed should force a replacement. + * @param pluginDownloadURL + * the server URL of the provider to use when servicing this request. + * @param pluginChecksums + * a map of checksums expected for the provider plugin. + * @param retainOnDelete + * if true the engine will not call the resource providers delete method for this resource. + * @param aliases + * a list of additional aliases that should be considered the same. + * @param deletedWith + * if set the engine will not call the resource providers delete method for this resource when specified resource is deleted. + * @param aliasSpecs + * Indicates that alias specs are specified correctly according to the spec. + * Older versions of the Node.js SDK did not send alias specs correctly. + * If this is not set to true and the engine detects the request is from the + * Node.js runtime, the engine will transform incorrect alias specs into + * correct ones. + * Other SDKs that are correctly specifying alias specs could set this to + * true, but it's not necessary. + * @param sourcePosition + * the optional source position of the user code that initiated the register. + * @param transforms + * a list of transforms to apply to the resource before registering it. + * @param supportsResultReporting + * true if the request is from an SDK that supports the result field in the response. + */ +@SerialVersionUID(0L) +final case class RegisterResourceRequest( + `type`: _root_.scala.Predef.String = "", + name: _root_.scala.Predef.String = "", + parent: _root_.scala.Predef.String = "", + custom: _root_.scala.Boolean = false, + `object`: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + protect: _root_.scala.Boolean = false, + dependencies: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + provider: _root_.scala.Predef.String = "", + propertyDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies] = _root_.scala.collection.immutable.Map.empty, + deleteBeforeReplace: _root_.scala.Boolean = false, + version: _root_.scala.Predef.String = "", + ignoreChanges: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + acceptSecrets: _root_.scala.Boolean = false, + additionalSecretOutputs: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + aliasURNs: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + importId: _root_.scala.Predef.String = "", + customTimeouts: _root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts] = _root_.scala.None, + deleteBeforeReplaceDefined: _root_.scala.Boolean = false, + supportsPartialValues: _root_.scala.Boolean = false, + remote: _root_.scala.Boolean = false, + acceptResources: _root_.scala.Boolean = false, + providers: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty, + replaceOnChanges: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + pluginDownloadURL: _root_.scala.Predef.String = "", + pluginChecksums: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] = _root_.scala.collection.immutable.Map.empty, + retainOnDelete: _root_.scala.Boolean = false, + aliases: _root_.scala.Seq[pulumirpc.alias.Alias] = _root_.scala.Seq.empty, + deletedWith: _root_.scala.Predef.String = "", + aliasSpecs: _root_.scala.Boolean = false, + sourcePosition: _root_.scala.Option[pulumirpc.source.SourcePosition] = _root_.scala.None, + transforms: _root_.scala.Seq[pulumirpc.callback.Callback] = _root_.scala.Seq.empty, + supportsResultReporting: _root_.scala.Boolean = false, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RegisterResourceRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = `type` + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = name + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = parent + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + + { + val __value = custom + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(4, __value) + } + }; + if (`object`.isDefined) { + val __value = `object`.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + + { + val __value = protect + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(6, __value) + } + }; + dependencies.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(7, __value) + } + + { + val __value = provider + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(8, __value) + } + }; + propertyDependencies.foreach { __item => + val __value = pulumirpc.resource.RegisterResourceRequest._typemapper_propertyDependencies.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = deleteBeforeReplace + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(10, __value) + } + }; + + { + val __value = version + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(11, __value) + } + }; + ignoreChanges.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(12, __value) + } + + { + val __value = acceptSecrets + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(13, __value) + } + }; + additionalSecretOutputs.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(14, __value) + } + aliasURNs.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(15, __value) + } + + { + val __value = importId + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(16, __value) + } + }; + if (customTimeouts.isDefined) { + val __value = customTimeouts.get + __size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + + { + val __value = deleteBeforeReplaceDefined + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(18, __value) + } + }; + + { + val __value = supportsPartialValues + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(19, __value) + } + }; + + { + val __value = remote + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(20, __value) + } + }; + + { + val __value = acceptResources + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(21, __value) + } + }; + providers.foreach { __item => + val __value = pulumirpc.resource.RegisterResourceRequest._typemapper_providers.toBase(__item) + __size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + replaceOnChanges.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(23, __value) + } + + { + val __value = pluginDownloadURL + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(24, __value) + } + }; + pluginChecksums.foreach { __item => + val __value = pulumirpc.resource.RegisterResourceRequest._typemapper_pluginChecksums.toBase(__item) + __size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = retainOnDelete + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(25, __value) + } + }; + aliases.foreach { __item => + val __value = __item + __size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = deletedWith + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(27, __value) + } + }; + + { + val __value = aliasSpecs + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(28, __value) + } + }; + if (sourcePosition.isDefined) { + val __value = sourcePosition.get + __size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + transforms.foreach { __item => + val __value = __item + __size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = supportsResultReporting + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(32, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = `type` + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = name + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = parent + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + { + val __v = custom + if (__v != false) { + _output__.writeBool(4, __v) + } + }; + `object`.foreach { __v => + val __m = __v + _output__.writeTag(5, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = protect + if (__v != false) { + _output__.writeBool(6, __v) + } + }; + dependencies.foreach { __v => + val __m = __v + _output__.writeString(7, __m) + }; + { + val __v = provider + if (!__v.isEmpty) { + _output__.writeString(8, __v) + } + }; + propertyDependencies.foreach { __v => + val __m = pulumirpc.resource.RegisterResourceRequest._typemapper_propertyDependencies.toBase(__v) + _output__.writeTag(9, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = deleteBeforeReplace + if (__v != false) { + _output__.writeBool(10, __v) + } + }; + { + val __v = version + if (!__v.isEmpty) { + _output__.writeString(11, __v) + } + }; + ignoreChanges.foreach { __v => + val __m = __v + _output__.writeString(12, __m) + }; + { + val __v = acceptSecrets + if (__v != false) { + _output__.writeBool(13, __v) + } + }; + additionalSecretOutputs.foreach { __v => + val __m = __v + _output__.writeString(14, __m) + }; + aliasURNs.foreach { __v => + val __m = __v + _output__.writeString(15, __m) + }; + { + val __v = importId + if (!__v.isEmpty) { + _output__.writeString(16, __v) + } + }; + customTimeouts.foreach { __v => + val __m = __v + _output__.writeTag(17, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = deleteBeforeReplaceDefined + if (__v != false) { + _output__.writeBool(18, __v) + } + }; + { + val __v = supportsPartialValues + if (__v != false) { + _output__.writeBool(19, __v) + } + }; + { + val __v = remote + if (__v != false) { + _output__.writeBool(20, __v) + } + }; + { + val __v = acceptResources + if (__v != false) { + _output__.writeBool(21, __v) + } + }; + providers.foreach { __v => + val __m = pulumirpc.resource.RegisterResourceRequest._typemapper_providers.toBase(__v) + _output__.writeTag(22, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + replaceOnChanges.foreach { __v => + val __m = __v + _output__.writeString(23, __m) + }; + { + val __v = pluginDownloadURL + if (!__v.isEmpty) { + _output__.writeString(24, __v) + } + }; + { + val __v = retainOnDelete + if (__v != false) { + _output__.writeBool(25, __v) + } + }; + aliases.foreach { __v => + val __m = __v + _output__.writeTag(26, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = deletedWith + if (!__v.isEmpty) { + _output__.writeString(27, __v) + } + }; + { + val __v = aliasSpecs + if (__v != false) { + _output__.writeBool(28, __v) + } + }; + sourcePosition.foreach { __v => + val __m = __v + _output__.writeTag(29, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + pluginChecksums.foreach { __v => + val __m = pulumirpc.resource.RegisterResourceRequest._typemapper_pluginChecksums.toBase(__v) + _output__.writeTag(30, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + transforms.foreach { __v => + val __m = __v + _output__.writeTag(31, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = supportsResultReporting + if (__v != false) { + _output__.writeBool(32, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withType(__v: _root_.scala.Predef.String): RegisterResourceRequest = copy(`type` = __v) + def withName(__v: _root_.scala.Predef.String): RegisterResourceRequest = copy(name = __v) + def withParent(__v: _root_.scala.Predef.String): RegisterResourceRequest = copy(parent = __v) + def withCustom(__v: _root_.scala.Boolean): RegisterResourceRequest = copy(custom = __v) + def getObject: com.google.protobuf.struct.Struct = `object`.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearObject: RegisterResourceRequest = copy(`object` = _root_.scala.None) + def withObject(__v: com.google.protobuf.struct.Struct): RegisterResourceRequest = copy(`object` = Option(__v)) + def withProtect(__v: _root_.scala.Boolean): RegisterResourceRequest = copy(protect = __v) + def clearDependencies = copy(dependencies = _root_.scala.Seq.empty) + def addDependencies(__vs: _root_.scala.Predef.String *): RegisterResourceRequest = addAllDependencies(__vs) + def addAllDependencies(__vs: Iterable[_root_.scala.Predef.String]): RegisterResourceRequest = copy(dependencies = dependencies ++ __vs) + def withDependencies(__v: _root_.scala.Seq[_root_.scala.Predef.String]): RegisterResourceRequest = copy(dependencies = __v) + def withProvider(__v: _root_.scala.Predef.String): RegisterResourceRequest = copy(provider = __v) + def clearPropertyDependencies = copy(propertyDependencies = _root_.scala.collection.immutable.Map.empty) + def addPropertyDependencies(__vs: (_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies) *): RegisterResourceRequest = addAllPropertyDependencies(__vs) + def addAllPropertyDependencies(__vs: Iterable[(_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies)]): RegisterResourceRequest = copy(propertyDependencies = propertyDependencies ++ __vs) + def withPropertyDependencies(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies]): RegisterResourceRequest = copy(propertyDependencies = __v) + def withDeleteBeforeReplace(__v: _root_.scala.Boolean): RegisterResourceRequest = copy(deleteBeforeReplace = __v) + def withVersion(__v: _root_.scala.Predef.String): RegisterResourceRequest = copy(version = __v) + def clearIgnoreChanges = copy(ignoreChanges = _root_.scala.Seq.empty) + def addIgnoreChanges(__vs: _root_.scala.Predef.String *): RegisterResourceRequest = addAllIgnoreChanges(__vs) + def addAllIgnoreChanges(__vs: Iterable[_root_.scala.Predef.String]): RegisterResourceRequest = copy(ignoreChanges = ignoreChanges ++ __vs) + def withIgnoreChanges(__v: _root_.scala.Seq[_root_.scala.Predef.String]): RegisterResourceRequest = copy(ignoreChanges = __v) + def withAcceptSecrets(__v: _root_.scala.Boolean): RegisterResourceRequest = copy(acceptSecrets = __v) + def clearAdditionalSecretOutputs = copy(additionalSecretOutputs = _root_.scala.Seq.empty) + def addAdditionalSecretOutputs(__vs: _root_.scala.Predef.String *): RegisterResourceRequest = addAllAdditionalSecretOutputs(__vs) + def addAllAdditionalSecretOutputs(__vs: Iterable[_root_.scala.Predef.String]): RegisterResourceRequest = copy(additionalSecretOutputs = additionalSecretOutputs ++ __vs) + def withAdditionalSecretOutputs(__v: _root_.scala.Seq[_root_.scala.Predef.String]): RegisterResourceRequest = copy(additionalSecretOutputs = __v) + def clearAliasURNs = copy(aliasURNs = _root_.scala.Seq.empty) + def addAliasURNs(__vs: _root_.scala.Predef.String *): RegisterResourceRequest = addAllAliasURNs(__vs) + def addAllAliasURNs(__vs: Iterable[_root_.scala.Predef.String]): RegisterResourceRequest = copy(aliasURNs = aliasURNs ++ __vs) + def withAliasURNs(__v: _root_.scala.Seq[_root_.scala.Predef.String]): RegisterResourceRequest = copy(aliasURNs = __v) + def withImportId(__v: _root_.scala.Predef.String): RegisterResourceRequest = copy(importId = __v) + def getCustomTimeouts: pulumirpc.resource.RegisterResourceRequest.CustomTimeouts = customTimeouts.getOrElse(pulumirpc.resource.RegisterResourceRequest.CustomTimeouts.defaultInstance) + def clearCustomTimeouts: RegisterResourceRequest = copy(customTimeouts = _root_.scala.None) + def withCustomTimeouts(__v: pulumirpc.resource.RegisterResourceRequest.CustomTimeouts): RegisterResourceRequest = copy(customTimeouts = Option(__v)) + def withDeleteBeforeReplaceDefined(__v: _root_.scala.Boolean): RegisterResourceRequest = copy(deleteBeforeReplaceDefined = __v) + def withSupportsPartialValues(__v: _root_.scala.Boolean): RegisterResourceRequest = copy(supportsPartialValues = __v) + def withRemote(__v: _root_.scala.Boolean): RegisterResourceRequest = copy(remote = __v) + def withAcceptResources(__v: _root_.scala.Boolean): RegisterResourceRequest = copy(acceptResources = __v) + def clearProviders = copy(providers = _root_.scala.collection.immutable.Map.empty) + def addProviders(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): RegisterResourceRequest = addAllProviders(__vs) + def addAllProviders(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): RegisterResourceRequest = copy(providers = providers ++ __vs) + def withProviders(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): RegisterResourceRequest = copy(providers = __v) + def clearReplaceOnChanges = copy(replaceOnChanges = _root_.scala.Seq.empty) + def addReplaceOnChanges(__vs: _root_.scala.Predef.String *): RegisterResourceRequest = addAllReplaceOnChanges(__vs) + def addAllReplaceOnChanges(__vs: Iterable[_root_.scala.Predef.String]): RegisterResourceRequest = copy(replaceOnChanges = replaceOnChanges ++ __vs) + def withReplaceOnChanges(__v: _root_.scala.Seq[_root_.scala.Predef.String]): RegisterResourceRequest = copy(replaceOnChanges = __v) + def withPluginDownloadURL(__v: _root_.scala.Predef.String): RegisterResourceRequest = copy(pluginDownloadURL = __v) + def clearPluginChecksums = copy(pluginChecksums = _root_.scala.collection.immutable.Map.empty) + def addPluginChecksums(__vs: (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString) *): RegisterResourceRequest = addAllPluginChecksums(__vs) + def addAllPluginChecksums(__vs: Iterable[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]): RegisterResourceRequest = copy(pluginChecksums = pluginChecksums ++ __vs) + def withPluginChecksums(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]): RegisterResourceRequest = copy(pluginChecksums = __v) + def withRetainOnDelete(__v: _root_.scala.Boolean): RegisterResourceRequest = copy(retainOnDelete = __v) + def clearAliases = copy(aliases = _root_.scala.Seq.empty) + def addAliases(__vs: pulumirpc.alias.Alias *): RegisterResourceRequest = addAllAliases(__vs) + def addAllAliases(__vs: Iterable[pulumirpc.alias.Alias]): RegisterResourceRequest = copy(aliases = aliases ++ __vs) + def withAliases(__v: _root_.scala.Seq[pulumirpc.alias.Alias]): RegisterResourceRequest = copy(aliases = __v) + def withDeletedWith(__v: _root_.scala.Predef.String): RegisterResourceRequest = copy(deletedWith = __v) + def withAliasSpecs(__v: _root_.scala.Boolean): RegisterResourceRequest = copy(aliasSpecs = __v) + def getSourcePosition: pulumirpc.source.SourcePosition = sourcePosition.getOrElse(pulumirpc.source.SourcePosition.defaultInstance) + def clearSourcePosition: RegisterResourceRequest = copy(sourcePosition = _root_.scala.None) + def withSourcePosition(__v: pulumirpc.source.SourcePosition): RegisterResourceRequest = copy(sourcePosition = Option(__v)) + def clearTransforms = copy(transforms = _root_.scala.Seq.empty) + def addTransforms(__vs: pulumirpc.callback.Callback *): RegisterResourceRequest = addAllTransforms(__vs) + def addAllTransforms(__vs: Iterable[pulumirpc.callback.Callback]): RegisterResourceRequest = copy(transforms = transforms ++ __vs) + def withTransforms(__v: _root_.scala.Seq[pulumirpc.callback.Callback]): RegisterResourceRequest = copy(transforms = __v) + def withSupportsResultReporting(__v: _root_.scala.Boolean): RegisterResourceRequest = copy(supportsResultReporting = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = `type` + if (__t != "") __t else null + } + case 2 => { + val __t = name + if (__t != "") __t else null + } + case 3 => { + val __t = parent + if (__t != "") __t else null + } + case 4 => { + val __t = custom + if (__t != false) __t else null + } + case 5 => `object`.orNull + case 6 => { + val __t = protect + if (__t != false) __t else null + } + case 7 => dependencies + case 8 => { + val __t = provider + if (__t != "") __t else null + } + case 9 => propertyDependencies.iterator.map(pulumirpc.resource.RegisterResourceRequest._typemapper_propertyDependencies.toBase(_)).toSeq + case 10 => { + val __t = deleteBeforeReplace + if (__t != false) __t else null + } + case 11 => { + val __t = version + if (__t != "") __t else null + } + case 12 => ignoreChanges + case 13 => { + val __t = acceptSecrets + if (__t != false) __t else null + } + case 14 => additionalSecretOutputs + case 15 => aliasURNs + case 16 => { + val __t = importId + if (__t != "") __t else null + } + case 17 => customTimeouts.orNull + case 18 => { + val __t = deleteBeforeReplaceDefined + if (__t != false) __t else null + } + case 19 => { + val __t = supportsPartialValues + if (__t != false) __t else null + } + case 20 => { + val __t = remote + if (__t != false) __t else null + } + case 21 => { + val __t = acceptResources + if (__t != false) __t else null + } + case 22 => providers.iterator.map(pulumirpc.resource.RegisterResourceRequest._typemapper_providers.toBase(_)).toSeq + case 23 => replaceOnChanges + case 24 => { + val __t = pluginDownloadURL + if (__t != "") __t else null + } + case 30 => pluginChecksums.iterator.map(pulumirpc.resource.RegisterResourceRequest._typemapper_pluginChecksums.toBase(_)).toSeq + case 25 => { + val __t = retainOnDelete + if (__t != false) __t else null + } + case 26 => aliases + case 27 => { + val __t = deletedWith + if (__t != "") __t else null + } + case 28 => { + val __t = aliasSpecs + if (__t != false) __t else null + } + case 29 => sourcePosition.orNull + case 31 => transforms + case 32 => { + val __t = supportsResultReporting + if (__t != false) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(`type`) + case 2 => _root_.scalapb.descriptors.PString(name) + case 3 => _root_.scalapb.descriptors.PString(parent) + case 4 => _root_.scalapb.descriptors.PBoolean(custom) + case 5 => `object`.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 6 => _root_.scalapb.descriptors.PBoolean(protect) + case 7 => _root_.scalapb.descriptors.PRepeated(dependencies.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 8 => _root_.scalapb.descriptors.PString(provider) + case 9 => _root_.scalapb.descriptors.PRepeated(propertyDependencies.iterator.map(pulumirpc.resource.RegisterResourceRequest._typemapper_propertyDependencies.toBase(_).toPMessage).toVector) + case 10 => _root_.scalapb.descriptors.PBoolean(deleteBeforeReplace) + case 11 => _root_.scalapb.descriptors.PString(version) + case 12 => _root_.scalapb.descriptors.PRepeated(ignoreChanges.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 13 => _root_.scalapb.descriptors.PBoolean(acceptSecrets) + case 14 => _root_.scalapb.descriptors.PRepeated(additionalSecretOutputs.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 15 => _root_.scalapb.descriptors.PRepeated(aliasURNs.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 16 => _root_.scalapb.descriptors.PString(importId) + case 17 => customTimeouts.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 18 => _root_.scalapb.descriptors.PBoolean(deleteBeforeReplaceDefined) + case 19 => _root_.scalapb.descriptors.PBoolean(supportsPartialValues) + case 20 => _root_.scalapb.descriptors.PBoolean(remote) + case 21 => _root_.scalapb.descriptors.PBoolean(acceptResources) + case 22 => _root_.scalapb.descriptors.PRepeated(providers.iterator.map(pulumirpc.resource.RegisterResourceRequest._typemapper_providers.toBase(_).toPMessage).toVector) + case 23 => _root_.scalapb.descriptors.PRepeated(replaceOnChanges.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 24 => _root_.scalapb.descriptors.PString(pluginDownloadURL) + case 30 => _root_.scalapb.descriptors.PRepeated(pluginChecksums.iterator.map(pulumirpc.resource.RegisterResourceRequest._typemapper_pluginChecksums.toBase(_).toPMessage).toVector) + case 25 => _root_.scalapb.descriptors.PBoolean(retainOnDelete) + case 26 => _root_.scalapb.descriptors.PRepeated(aliases.iterator.map(_.toPMessage).toVector) + case 27 => _root_.scalapb.descriptors.PString(deletedWith) + case 28 => _root_.scalapb.descriptors.PBoolean(aliasSpecs) + case 29 => sourcePosition.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 31 => _root_.scalapb.descriptors.PRepeated(transforms.iterator.map(_.toPMessage).toVector) + case 32 => _root_.scalapb.descriptors.PBoolean(supportsResultReporting) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.RegisterResourceRequest.type = pulumirpc.resource.RegisterResourceRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RegisterResourceRequest]) +} + +object RegisterResourceRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.RegisterResourceRequest = { + var __type: _root_.scala.Predef.String = "" + var __name: _root_.scala.Predef.String = "" + var __parent: _root_.scala.Predef.String = "" + var __custom: _root_.scala.Boolean = false + var __object: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __protect: _root_.scala.Boolean = false + val __dependencies: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __provider: _root_.scala.Predef.String = "" + val __propertyDependencies: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies] + var __deleteBeforeReplace: _root_.scala.Boolean = false + var __version: _root_.scala.Predef.String = "" + val __ignoreChanges: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __acceptSecrets: _root_.scala.Boolean = false + val __additionalSecretOutputs: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + val __aliasURNs: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __importId: _root_.scala.Predef.String = "" + var __customTimeouts: _root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts] = _root_.scala.None + var __deleteBeforeReplaceDefined: _root_.scala.Boolean = false + var __supportsPartialValues: _root_.scala.Boolean = false + var __remote: _root_.scala.Boolean = false + var __acceptResources: _root_.scala.Boolean = false + val __providers: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.scala.Predef.String), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.scala.Predef.String] + val __replaceOnChanges: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __pluginDownloadURL: _root_.scala.Predef.String = "" + val __pluginChecksums: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] + var __retainOnDelete: _root_.scala.Boolean = false + val __aliases: _root_.scala.collection.immutable.VectorBuilder[pulumirpc.alias.Alias] = new _root_.scala.collection.immutable.VectorBuilder[pulumirpc.alias.Alias] + var __deletedWith: _root_.scala.Predef.String = "" + var __aliasSpecs: _root_.scala.Boolean = false + var __sourcePosition: _root_.scala.Option[pulumirpc.source.SourcePosition] = _root_.scala.None + val __transforms: _root_.scala.collection.immutable.VectorBuilder[pulumirpc.callback.Callback] = new _root_.scala.collection.immutable.VectorBuilder[pulumirpc.callback.Callback] + var __supportsResultReporting: _root_.scala.Boolean = false + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __type = _input__.readStringRequireUtf8() + case 18 => + __name = _input__.readStringRequireUtf8() + case 26 => + __parent = _input__.readStringRequireUtf8() + case 32 => + __custom = _input__.readBool() + case 42 => + __object = _root_.scala.Option(__object.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 48 => + __protect = _input__.readBool() + case 58 => + __dependencies += _input__.readStringRequireUtf8() + case 66 => + __provider = _input__.readStringRequireUtf8() + case 74 => + __propertyDependencies += pulumirpc.resource.RegisterResourceRequest._typemapper_propertyDependencies.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry](_input__)) + case 80 => + __deleteBeforeReplace = _input__.readBool() + case 90 => + __version = _input__.readStringRequireUtf8() + case 98 => + __ignoreChanges += _input__.readStringRequireUtf8() + case 104 => + __acceptSecrets = _input__.readBool() + case 114 => + __additionalSecretOutputs += _input__.readStringRequireUtf8() + case 122 => + __aliasURNs += _input__.readStringRequireUtf8() + case 130 => + __importId = _input__.readStringRequireUtf8() + case 138 => + __customTimeouts = _root_.scala.Option(__customTimeouts.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 144 => + __deleteBeforeReplaceDefined = _input__.readBool() + case 152 => + __supportsPartialValues = _input__.readBool() + case 160 => + __remote = _input__.readBool() + case 168 => + __acceptResources = _input__.readBool() + case 178 => + __providers += pulumirpc.resource.RegisterResourceRequest._typemapper_providers.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.RegisterResourceRequest.ProvidersEntry](_input__)) + case 186 => + __replaceOnChanges += _input__.readStringRequireUtf8() + case 194 => + __pluginDownloadURL = _input__.readStringRequireUtf8() + case 242 => + __pluginChecksums += pulumirpc.resource.RegisterResourceRequest._typemapper_pluginChecksums.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry](_input__)) + case 200 => + __retainOnDelete = _input__.readBool() + case 210 => + __aliases += _root_.scalapb.LiteParser.readMessage[pulumirpc.alias.Alias](_input__) + case 218 => + __deletedWith = _input__.readStringRequireUtf8() + case 224 => + __aliasSpecs = _input__.readBool() + case 234 => + __sourcePosition = _root_.scala.Option(__sourcePosition.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.source.SourcePosition](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 250 => + __transforms += _root_.scalapb.LiteParser.readMessage[pulumirpc.callback.Callback](_input__) + case 256 => + __supportsResultReporting = _input__.readBool() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.RegisterResourceRequest( + `type` = __type, + name = __name, + parent = __parent, + custom = __custom, + `object` = __object, + protect = __protect, + dependencies = __dependencies.result(), + provider = __provider, + propertyDependencies = __propertyDependencies.result(), + deleteBeforeReplace = __deleteBeforeReplace, + version = __version, + ignoreChanges = __ignoreChanges.result(), + acceptSecrets = __acceptSecrets, + additionalSecretOutputs = __additionalSecretOutputs.result(), + aliasURNs = __aliasURNs.result(), + importId = __importId, + customTimeouts = __customTimeouts, + deleteBeforeReplaceDefined = __deleteBeforeReplaceDefined, + supportsPartialValues = __supportsPartialValues, + remote = __remote, + acceptResources = __acceptResources, + providers = __providers.result(), + replaceOnChanges = __replaceOnChanges.result(), + pluginDownloadURL = __pluginDownloadURL, + pluginChecksums = __pluginChecksums.result(), + retainOnDelete = __retainOnDelete, + aliases = __aliases.result(), + deletedWith = __deletedWith, + aliasSpecs = __aliasSpecs, + sourcePosition = __sourcePosition, + transforms = __transforms.result(), + supportsResultReporting = __supportsResultReporting, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.RegisterResourceRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.RegisterResourceRequest( + `type` = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + parent = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + custom = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + `object` = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + protect = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + dependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + provider = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + propertyDependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Seq[pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.resource.RegisterResourceRequest._typemapper_propertyDependencies.toCustom(_)).toMap, + deleteBeforeReplace = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + version = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + ignoreChanges = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + acceptSecrets = __fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + additionalSecretOutputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(14).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + aliasURNs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(15).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + importId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(16).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + customTimeouts = __fieldsMap.get(scalaDescriptor.findFieldByNumber(17).get).flatMap(_.as[_root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts]]), + deleteBeforeReplaceDefined = __fieldsMap.get(scalaDescriptor.findFieldByNumber(18).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + supportsPartialValues = __fieldsMap.get(scalaDescriptor.findFieldByNumber(19).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + remote = __fieldsMap.get(scalaDescriptor.findFieldByNumber(20).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + acceptResources = __fieldsMap.get(scalaDescriptor.findFieldByNumber(21).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + providers = __fieldsMap.get(scalaDescriptor.findFieldByNumber(22).get).map(_.as[_root_.scala.Seq[pulumirpc.resource.RegisterResourceRequest.ProvidersEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.resource.RegisterResourceRequest._typemapper_providers.toCustom(_)).toMap, + replaceOnChanges = __fieldsMap.get(scalaDescriptor.findFieldByNumber(23).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + pluginDownloadURL = __fieldsMap.get(scalaDescriptor.findFieldByNumber(24).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + pluginChecksums = __fieldsMap.get(scalaDescriptor.findFieldByNumber(30).get).map(_.as[_root_.scala.Seq[pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.resource.RegisterResourceRequest._typemapper_pluginChecksums.toCustom(_)).toMap, + retainOnDelete = __fieldsMap.get(scalaDescriptor.findFieldByNumber(25).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + aliases = __fieldsMap.get(scalaDescriptor.findFieldByNumber(26).get).map(_.as[_root_.scala.Seq[pulumirpc.alias.Alias]]).getOrElse(_root_.scala.Seq.empty), + deletedWith = __fieldsMap.get(scalaDescriptor.findFieldByNumber(27).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + aliasSpecs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(28).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + sourcePosition = __fieldsMap.get(scalaDescriptor.findFieldByNumber(29).get).flatMap(_.as[_root_.scala.Option[pulumirpc.source.SourcePosition]]), + transforms = __fieldsMap.get(scalaDescriptor.findFieldByNumber(31).get).map(_.as[_root_.scala.Seq[pulumirpc.callback.Callback]]).getOrElse(_root_.scala.Seq.empty), + supportsResultReporting = __fieldsMap.get(scalaDescriptor.findFieldByNumber(32).get).map(_.as[_root_.scala.Boolean]).getOrElse(false) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ResourceProto.javaDescriptor.getMessageTypes().get(4) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ResourceProto.scalaDescriptor.messages(4) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 5 => __out = com.google.protobuf.struct.Struct + case 9 => __out = pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry + case 17 => __out = pulumirpc.resource.RegisterResourceRequest.CustomTimeouts + case 22 => __out = pulumirpc.resource.RegisterResourceRequest.ProvidersEntry + case 30 => __out = pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry + case 26 => __out = pulumirpc.alias.Alias + case 29 => __out = pulumirpc.source.SourcePosition + case 31 => __out = pulumirpc.callback.Callback + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.resource.RegisterResourceRequest.PropertyDependencies, + _root_.pulumirpc.resource.RegisterResourceRequest.CustomTimeouts, + _root_.pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry, + _root_.pulumirpc.resource.RegisterResourceRequest.ProvidersEntry, + _root_.pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.resource.RegisterResourceRequest( + `type` = "", + name = "", + parent = "", + custom = false, + `object` = _root_.scala.None, + protect = false, + dependencies = _root_.scala.Seq.empty, + provider = "", + propertyDependencies = _root_.scala.collection.immutable.Map.empty, + deleteBeforeReplace = false, + version = "", + ignoreChanges = _root_.scala.Seq.empty, + acceptSecrets = false, + additionalSecretOutputs = _root_.scala.Seq.empty, + aliasURNs = _root_.scala.Seq.empty, + importId = "", + customTimeouts = _root_.scala.None, + deleteBeforeReplaceDefined = false, + supportsPartialValues = false, + remote = false, + acceptResources = false, + providers = _root_.scala.collection.immutable.Map.empty, + replaceOnChanges = _root_.scala.Seq.empty, + pluginDownloadURL = "", + pluginChecksums = _root_.scala.collection.immutable.Map.empty, + retainOnDelete = false, + aliases = _root_.scala.Seq.empty, + deletedWith = "", + aliasSpecs = false, + sourcePosition = _root_.scala.None, + transforms = _root_.scala.Seq.empty, + supportsResultReporting = false + ) + /** PropertyDependencies describes the resources that a particular property depends on. + * + * @param urns + * A list of URNs this property depends on. + */ + @SerialVersionUID(0L) + final case class PropertyDependencies( + urns: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PropertyDependencies] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + urns.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + urns.foreach { __v => + val __m = __v + _output__.writeString(1, __m) + }; + unknownFields.writeTo(_output__) + } + def clearUrns = copy(urns = _root_.scala.Seq.empty) + def addUrns(__vs: _root_.scala.Predef.String *): PropertyDependencies = addAllUrns(__vs) + def addAllUrns(__vs: Iterable[_root_.scala.Predef.String]): PropertyDependencies = copy(urns = urns ++ __vs) + def withUrns(__v: _root_.scala.Seq[_root_.scala.Predef.String]): PropertyDependencies = copy(urns = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => urns + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(urns.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.RegisterResourceRequest.PropertyDependencies.type = pulumirpc.resource.RegisterResourceRequest.PropertyDependencies + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RegisterResourceRequest.PropertyDependencies]) + } + + object PropertyDependencies extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceRequest.PropertyDependencies] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceRequest.PropertyDependencies] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.RegisterResourceRequest.PropertyDependencies = { + val __urns: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urns += _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.RegisterResourceRequest.PropertyDependencies( + urns = __urns.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.RegisterResourceRequest.PropertyDependencies] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.RegisterResourceRequest.PropertyDependencies( + urns = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.RegisterResourceRequest.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.RegisterResourceRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.resource.RegisterResourceRequest.PropertyDependencies( + urns = _root_.scala.Seq.empty + ) + implicit class PropertyDependenciesLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies](_l) { + def urns: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.urns)((c_, f_) => c_.copy(urns = f_)) + } + final val URNS_FIELD_NUMBER = 1 + def of( + urns: _root_.scala.Seq[_root_.scala.Predef.String] + ): _root_.pulumirpc.resource.RegisterResourceRequest.PropertyDependencies = _root_.pulumirpc.resource.RegisterResourceRequest.PropertyDependencies( + urns + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RegisterResourceRequest.PropertyDependencies]) + } + + /** CustomTimeouts allows a user to be able to create a set of custom timeout parameters. + * + * @param create + * The create resource timeout represented as a string e.g. 5m. + * @param update + * The update resource timeout represented as a string e.g. 5m. + * @param delete + * The delete resource timeout represented as a string e.g. 5m. + */ + @SerialVersionUID(0L) + final case class CustomTimeouts( + create: _root_.scala.Predef.String = "", + update: _root_.scala.Predef.String = "", + delete: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[CustomTimeouts] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = create + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = update + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = delete + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = create + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = update + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = delete + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withCreate(__v: _root_.scala.Predef.String): CustomTimeouts = copy(create = __v) + def withUpdate(__v: _root_.scala.Predef.String): CustomTimeouts = copy(update = __v) + def withDelete(__v: _root_.scala.Predef.String): CustomTimeouts = copy(delete = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = create + if (__t != "") __t else null + } + case 2 => { + val __t = update + if (__t != "") __t else null + } + case 3 => { + val __t = delete + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(create) + case 2 => _root_.scalapb.descriptors.PString(update) + case 3 => _root_.scalapb.descriptors.PString(delete) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.RegisterResourceRequest.CustomTimeouts.type = pulumirpc.resource.RegisterResourceRequest.CustomTimeouts + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RegisterResourceRequest.CustomTimeouts]) + } + + object CustomTimeouts extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.RegisterResourceRequest.CustomTimeouts = { + var __create: _root_.scala.Predef.String = "" + var __update: _root_.scala.Predef.String = "" + var __delete: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __create = _input__.readStringRequireUtf8() + case 18 => + __update = _input__.readStringRequireUtf8() + case 26 => + __delete = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.RegisterResourceRequest.CustomTimeouts( + create = __create, + update = __update, + delete = __delete, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.RegisterResourceRequest.CustomTimeouts( + create = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + update = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + delete = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.RegisterResourceRequest.javaDescriptor.getNestedTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.RegisterResourceRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.resource.RegisterResourceRequest.CustomTimeouts( + create = "", + update = "", + delete = "" + ) + implicit class CustomTimeoutsLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceRequest.CustomTimeouts]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.RegisterResourceRequest.CustomTimeouts](_l) { + def create: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.create)((c_, f_) => c_.copy(create = f_)) + def update: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.update)((c_, f_) => c_.copy(update = f_)) + def delete: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.delete)((c_, f_) => c_.copy(delete = f_)) + } + final val CREATE_FIELD_NUMBER = 1 + final val UPDATE_FIELD_NUMBER = 2 + final val DELETE_FIELD_NUMBER = 3 + def of( + create: _root_.scala.Predef.String, + update: _root_.scala.Predef.String, + delete: _root_.scala.Predef.String + ): _root_.pulumirpc.resource.RegisterResourceRequest.CustomTimeouts = _root_.pulumirpc.resource.RegisterResourceRequest.CustomTimeouts( + create, + update, + delete + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RegisterResourceRequest.CustomTimeouts]) + } + + @SerialVersionUID(0L) + final case class PropertyDependenciesEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.PropertyDependencies] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PropertyDependenciesEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (value.isDefined) { + val __value = value.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + value.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): PropertyDependenciesEntry = copy(key = __v) + def getValue: pulumirpc.resource.RegisterResourceRequest.PropertyDependencies = value.getOrElse(pulumirpc.resource.RegisterResourceRequest.PropertyDependencies.defaultInstance) + def clearValue: PropertyDependenciesEntry = copy(value = _root_.scala.None) + def withValue(__v: pulumirpc.resource.RegisterResourceRequest.PropertyDependencies): PropertyDependenciesEntry = copy(value = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => value.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => value.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry.type = pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RegisterResourceRequest.PropertyDependenciesEntry]) + } + + object PropertyDependenciesEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.PropertyDependencies] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _root_.scala.Option(__value.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.RegisterResourceRequest.PropertyDependencies](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.PropertyDependencies]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.RegisterResourceRequest.javaDescriptor.getNestedTypes().get(2) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.RegisterResourceRequest.scalaDescriptor.nestedMessages(2) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = pulumirpc.resource.RegisterResourceRequest.PropertyDependencies + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry( + key = "", + value = _root_.scala.None + ) + implicit class PropertyDependenciesEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies] = field(_.getValue)((c_, f_) => c_.copy(value = _root_.scala.Option(f_))) + def optionalValue: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.PropertyDependencies]] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies)] = + _root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies)](__m => (__m.key, __m.getValue))(__p => pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry(__p._1, Some(__p._2))) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.PropertyDependencies] + ): _root_.pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry = _root_.pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RegisterResourceRequest.PropertyDependenciesEntry]) + } + + @SerialVersionUID(0L) + final case class ProvidersEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ProvidersEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): ProvidersEntry = copy(key = __v) + def withValue(__v: _root_.scala.Predef.String): ProvidersEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.RegisterResourceRequest.ProvidersEntry.type = pulumirpc.resource.RegisterResourceRequest.ProvidersEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RegisterResourceRequest.ProvidersEntry]) + } + + object ProvidersEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceRequest.ProvidersEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceRequest.ProvidersEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.RegisterResourceRequest.ProvidersEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.RegisterResourceRequest.ProvidersEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.RegisterResourceRequest.ProvidersEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.RegisterResourceRequest.ProvidersEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.RegisterResourceRequest.javaDescriptor.getNestedTypes().get(3) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.RegisterResourceRequest.scalaDescriptor.nestedMessages(3) + 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) + lazy val defaultInstance = pulumirpc.resource.RegisterResourceRequest.ProvidersEntry( + key = "", + value = "" + ) + implicit class ProvidersEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceRequest.ProvidersEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.RegisterResourceRequest.ProvidersEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceRequest.ProvidersEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = + _root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceRequest.ProvidersEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => pulumirpc.resource.RegisterResourceRequest.ProvidersEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Predef.String + ): _root_.pulumirpc.resource.RegisterResourceRequest.ProvidersEntry = _root_.pulumirpc.resource.RegisterResourceRequest.ProvidersEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RegisterResourceRequest.ProvidersEntry]) + } + + @SerialVersionUID(0L) + final case class PluginChecksumsEntry( + key: _root_.scala.Predef.String = "", + value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PluginChecksumsEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeBytes(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): PluginChecksumsEntry = copy(key = __v) + def withValue(__v: _root_.com.google.protobuf.ByteString): PluginChecksumsEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PByteString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry.type = pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RegisterResourceRequest.PluginChecksumsEntry]) + } + + object PluginChecksumsEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.RegisterResourceRequest.javaDescriptor.getNestedTypes().get(4) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.RegisterResourceRequest.scalaDescriptor.nestedMessages(4) + 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) + lazy val defaultInstance = pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry( + key = "", + value = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class PluginChecksumsEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = + _root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)](__m => (__m.key, __m.value))(__p => pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry = _root_.pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RegisterResourceRequest.PluginChecksumsEntry]) + } + + implicit class RegisterResourceRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.RegisterResourceRequest](_l) { + def `type`: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.`type`)((c_, f_) => c_.copy(`type` = f_)) + def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_)) + def parent: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.parent)((c_, f_) => c_.copy(parent = f_)) + def custom: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.custom)((c_, f_) => c_.copy(custom = f_)) + def `object`: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getObject)((c_, f_) => c_.copy(`object` = _root_.scala.Option(f_))) + def optionalObject: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.`object`)((c_, f_) => c_.copy(`object` = f_)) + def protect: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.protect)((c_, f_) => c_.copy(protect = f_)) + def dependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.dependencies)((c_, f_) => c_.copy(dependencies = f_)) + def provider: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.provider)((c_, f_) => c_.copy(provider = f_)) + def propertyDependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies]] = field(_.propertyDependencies)((c_, f_) => c_.copy(propertyDependencies = f_)) + def deleteBeforeReplace: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.deleteBeforeReplace)((c_, f_) => c_.copy(deleteBeforeReplace = f_)) + def version: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.version)((c_, f_) => c_.copy(version = f_)) + def ignoreChanges: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.ignoreChanges)((c_, f_) => c_.copy(ignoreChanges = f_)) + def acceptSecrets: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.acceptSecrets)((c_, f_) => c_.copy(acceptSecrets = f_)) + def additionalSecretOutputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.additionalSecretOutputs)((c_, f_) => c_.copy(additionalSecretOutputs = f_)) + def aliasURNs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.aliasURNs)((c_, f_) => c_.copy(aliasURNs = f_)) + def importId: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.importId)((c_, f_) => c_.copy(importId = f_)) + def customTimeouts: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceRequest.CustomTimeouts] = field(_.getCustomTimeouts)((c_, f_) => c_.copy(customTimeouts = _root_.scala.Option(f_))) + def optionalCustomTimeouts: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts]] = field(_.customTimeouts)((c_, f_) => c_.copy(customTimeouts = f_)) + def deleteBeforeReplaceDefined: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.deleteBeforeReplaceDefined)((c_, f_) => c_.copy(deleteBeforeReplaceDefined = f_)) + def supportsPartialValues: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.supportsPartialValues)((c_, f_) => c_.copy(supportsPartialValues = f_)) + def remote: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.remote)((c_, f_) => c_.copy(remote = f_)) + def acceptResources: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.acceptResources)((c_, f_) => c_.copy(acceptResources = f_)) + def providers: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.providers)((c_, f_) => c_.copy(providers = f_)) + def replaceOnChanges: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.replaceOnChanges)((c_, f_) => c_.copy(replaceOnChanges = f_)) + def pluginDownloadURL: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.pluginDownloadURL)((c_, f_) => c_.copy(pluginDownloadURL = f_)) + def pluginChecksums: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = field(_.pluginChecksums)((c_, f_) => c_.copy(pluginChecksums = f_)) + def retainOnDelete: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.retainOnDelete)((c_, f_) => c_.copy(retainOnDelete = f_)) + def aliases: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[pulumirpc.alias.Alias]] = field(_.aliases)((c_, f_) => c_.copy(aliases = f_)) + def deletedWith: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.deletedWith)((c_, f_) => c_.copy(deletedWith = f_)) + def aliasSpecs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.aliasSpecs)((c_, f_) => c_.copy(aliasSpecs = f_)) + def sourcePosition: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.source.SourcePosition] = field(_.getSourcePosition)((c_, f_) => c_.copy(sourcePosition = _root_.scala.Option(f_))) + def optionalSourcePosition: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.source.SourcePosition]] = field(_.sourcePosition)((c_, f_) => c_.copy(sourcePosition = f_)) + def transforms: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[pulumirpc.callback.Callback]] = field(_.transforms)((c_, f_) => c_.copy(transforms = f_)) + def supportsResultReporting: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.supportsResultReporting)((c_, f_) => c_.copy(supportsResultReporting = f_)) + } + final val TYPE_FIELD_NUMBER = 1 + final val NAME_FIELD_NUMBER = 2 + final val PARENT_FIELD_NUMBER = 3 + final val CUSTOM_FIELD_NUMBER = 4 + final val OBJECT_FIELD_NUMBER = 5 + final val PROTECT_FIELD_NUMBER = 6 + final val DEPENDENCIES_FIELD_NUMBER = 7 + final val PROVIDER_FIELD_NUMBER = 8 + final val PROPERTYDEPENDENCIES_FIELD_NUMBER = 9 + final val DELETEBEFOREREPLACE_FIELD_NUMBER = 10 + final val VERSION_FIELD_NUMBER = 11 + final val IGNORECHANGES_FIELD_NUMBER = 12 + final val ACCEPTSECRETS_FIELD_NUMBER = 13 + final val ADDITIONALSECRETOUTPUTS_FIELD_NUMBER = 14 + final val ALIASURNS_FIELD_NUMBER = 15 + final val IMPORTID_FIELD_NUMBER = 16 + final val CUSTOMTIMEOUTS_FIELD_NUMBER = 17 + final val DELETEBEFOREREPLACEDEFINED_FIELD_NUMBER = 18 + final val SUPPORTSPARTIALVALUES_FIELD_NUMBER = 19 + final val REMOTE_FIELD_NUMBER = 20 + final val ACCEPTRESOURCES_FIELD_NUMBER = 21 + final val PROVIDERS_FIELD_NUMBER = 22 + final val REPLACEONCHANGES_FIELD_NUMBER = 23 + final val PLUGINDOWNLOADURL_FIELD_NUMBER = 24 + final val PLUGINCHECKSUMS_FIELD_NUMBER = 30 + final val RETAINONDELETE_FIELD_NUMBER = 25 + final val ALIASES_FIELD_NUMBER = 26 + final val DELETEDWITH_FIELD_NUMBER = 27 + final val ALIASSPECS_FIELD_NUMBER = 28 + final val SOURCEPOSITION_FIELD_NUMBER = 29 + final val TRANSFORMS_FIELD_NUMBER = 31 + final val SUPPORTSRESULTREPORTING_FIELD_NUMBER = 32 + @transient + private[resource] val _typemapper_propertyDependencies: _root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceRequest.PropertyDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies)]] + @transient + private[resource] val _typemapper_providers: _root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceRequest.ProvidersEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceRequest.ProvidersEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]] + @transient + private[resource] val _typemapper_pluginChecksums: _root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]] + def of( + `type`: _root_.scala.Predef.String, + name: _root_.scala.Predef.String, + parent: _root_.scala.Predef.String, + custom: _root_.scala.Boolean, + `object`: _root_.scala.Option[com.google.protobuf.struct.Struct], + protect: _root_.scala.Boolean, + dependencies: _root_.scala.Seq[_root_.scala.Predef.String], + provider: _root_.scala.Predef.String, + propertyDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceRequest.PropertyDependencies], + deleteBeforeReplace: _root_.scala.Boolean, + version: _root_.scala.Predef.String, + ignoreChanges: _root_.scala.Seq[_root_.scala.Predef.String], + acceptSecrets: _root_.scala.Boolean, + additionalSecretOutputs: _root_.scala.Seq[_root_.scala.Predef.String], + aliasURNs: _root_.scala.Seq[_root_.scala.Predef.String], + importId: _root_.scala.Predef.String, + customTimeouts: _root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts], + deleteBeforeReplaceDefined: _root_.scala.Boolean, + supportsPartialValues: _root_.scala.Boolean, + remote: _root_.scala.Boolean, + acceptResources: _root_.scala.Boolean, + providers: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String], + replaceOnChanges: _root_.scala.Seq[_root_.scala.Predef.String], + pluginDownloadURL: _root_.scala.Predef.String, + pluginChecksums: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString], + retainOnDelete: _root_.scala.Boolean, + aliases: _root_.scala.Seq[pulumirpc.alias.Alias], + deletedWith: _root_.scala.Predef.String, + aliasSpecs: _root_.scala.Boolean, + sourcePosition: _root_.scala.Option[pulumirpc.source.SourcePosition], + transforms: _root_.scala.Seq[pulumirpc.callback.Callback], + supportsResultReporting: _root_.scala.Boolean + ): _root_.pulumirpc.resource.RegisterResourceRequest = _root_.pulumirpc.resource.RegisterResourceRequest( + `type`, + name, + parent, + custom, + `object`, + protect, + dependencies, + provider, + propertyDependencies, + deleteBeforeReplace, + version, + ignoreChanges, + acceptSecrets, + additionalSecretOutputs, + aliasURNs, + importId, + customTimeouts, + deleteBeforeReplaceDefined, + supportsPartialValues, + remote, + acceptResources, + providers, + replaceOnChanges, + pluginDownloadURL, + pluginChecksums, + retainOnDelete, + aliases, + deletedWith, + aliasSpecs, + sourcePosition, + transforms, + supportsResultReporting + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RegisterResourceRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/RegisterResourceResponse.scala b/besom-rpc/src/main/scala/pulumirpc/resource/RegisterResourceResponse.scala new file mode 100644 index 00000000..ee0c8bc7 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/RegisterResourceResponse.scala @@ -0,0 +1,579 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +/** RegisterResourceResponse is returned by the engine after a resource has finished being initialized. It includes the + * auto-assigned URN, the provider-assigned ID, and any other properties initialized by the engine. + * + * @param urn + * the URN assigned by the engine. + * @param id + * the unique ID assigned by the provider. + * @param object + * the resulting object properties, including provider defaults. + * @param stable + * if true, the object's state is stable and may be trusted not to change. + * @param stables + * an optional list of guaranteed-stable properties. + * @param propertyDependencies + * a map from property keys to the dependencies of the property. + * @param result + * the reason, whether the resource registration was successful, failed, or skipped. + */ +@SerialVersionUID(0L) +final case class RegisterResourceResponse( + urn: _root_.scala.Predef.String = "", + id: _root_.scala.Predef.String = "", + `object`: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + stable: _root_.scala.Boolean = false, + stables: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + propertyDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies] = _root_.scala.collection.immutable.Map.empty, + result: pulumirpc.resource.Result = pulumirpc.resource.Result.SUCCESS, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RegisterResourceResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = urn + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = id + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + if (`object`.isDefined) { + val __value = `object`.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + + { + val __value = stable + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(4, __value) + } + }; + stables.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(5, __value) + } + propertyDependencies.foreach { __item => + val __value = pulumirpc.resource.RegisterResourceResponse._typemapper_propertyDependencies.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = result.value + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(7, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = urn + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = id + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + `object`.foreach { __v => + val __m = __v + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = stable + if (__v != false) { + _output__.writeBool(4, __v) + } + }; + stables.foreach { __v => + val __m = __v + _output__.writeString(5, __m) + }; + propertyDependencies.foreach { __v => + val __m = pulumirpc.resource.RegisterResourceResponse._typemapper_propertyDependencies.toBase(__v) + _output__.writeTag(6, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = result.value + if (__v != 0) { + _output__.writeEnum(7, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withUrn(__v: _root_.scala.Predef.String): RegisterResourceResponse = copy(urn = __v) + def withId(__v: _root_.scala.Predef.String): RegisterResourceResponse = copy(id = __v) + def getObject: com.google.protobuf.struct.Struct = `object`.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearObject: RegisterResourceResponse = copy(`object` = _root_.scala.None) + def withObject(__v: com.google.protobuf.struct.Struct): RegisterResourceResponse = copy(`object` = Option(__v)) + def withStable(__v: _root_.scala.Boolean): RegisterResourceResponse = copy(stable = __v) + def clearStables = copy(stables = _root_.scala.Seq.empty) + def addStables(__vs: _root_.scala.Predef.String *): RegisterResourceResponse = addAllStables(__vs) + def addAllStables(__vs: Iterable[_root_.scala.Predef.String]): RegisterResourceResponse = copy(stables = stables ++ __vs) + def withStables(__v: _root_.scala.Seq[_root_.scala.Predef.String]): RegisterResourceResponse = copy(stables = __v) + def clearPropertyDependencies = copy(propertyDependencies = _root_.scala.collection.immutable.Map.empty) + def addPropertyDependencies(__vs: (_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies) *): RegisterResourceResponse = addAllPropertyDependencies(__vs) + def addAllPropertyDependencies(__vs: Iterable[(_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies)]): RegisterResourceResponse = copy(propertyDependencies = propertyDependencies ++ __vs) + def withPropertyDependencies(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies]): RegisterResourceResponse = copy(propertyDependencies = __v) + def withResult(__v: pulumirpc.resource.Result): RegisterResourceResponse = copy(result = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = urn + if (__t != "") __t else null + } + case 2 => { + val __t = id + if (__t != "") __t else null + } + case 3 => `object`.orNull + case 4 => { + val __t = stable + if (__t != false) __t else null + } + case 5 => stables + case 6 => propertyDependencies.iterator.map(pulumirpc.resource.RegisterResourceResponse._typemapper_propertyDependencies.toBase(_)).toSeq + case 7 => { + val __t = result.javaValueDescriptor + if (__t.getNumber() != 0) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(urn) + case 2 => _root_.scalapb.descriptors.PString(id) + case 3 => `object`.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 4 => _root_.scalapb.descriptors.PBoolean(stable) + case 5 => _root_.scalapb.descriptors.PRepeated(stables.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 6 => _root_.scalapb.descriptors.PRepeated(propertyDependencies.iterator.map(pulumirpc.resource.RegisterResourceResponse._typemapper_propertyDependencies.toBase(_).toPMessage).toVector) + case 7 => _root_.scalapb.descriptors.PEnum(result.scalaValueDescriptor) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.RegisterResourceResponse.type = pulumirpc.resource.RegisterResourceResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RegisterResourceResponse]) +} + +object RegisterResourceResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.RegisterResourceResponse = { + var __urn: _root_.scala.Predef.String = "" + var __id: _root_.scala.Predef.String = "" + var __object: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __stable: _root_.scala.Boolean = false + val __stables: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + val __propertyDependencies: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies] + var __result: pulumirpc.resource.Result = pulumirpc.resource.Result.SUCCESS + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urn = _input__.readStringRequireUtf8() + case 18 => + __id = _input__.readStringRequireUtf8() + case 26 => + __object = _root_.scala.Option(__object.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 32 => + __stable = _input__.readBool() + case 42 => + __stables += _input__.readStringRequireUtf8() + case 50 => + __propertyDependencies += pulumirpc.resource.RegisterResourceResponse._typemapper_propertyDependencies.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry](_input__)) + case 56 => + __result = pulumirpc.resource.Result.fromValue(_input__.readEnum()) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.RegisterResourceResponse( + urn = __urn, + id = __id, + `object` = __object, + stable = __stable, + stables = __stables.result(), + propertyDependencies = __propertyDependencies.result(), + result = __result, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.RegisterResourceResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.RegisterResourceResponse( + urn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + id = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + `object` = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + stable = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + stables = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + propertyDependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Seq[pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.resource.RegisterResourceResponse._typemapper_propertyDependencies.toCustom(_)).toMap, + result = pulumirpc.resource.Result.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(pulumirpc.resource.Result.SUCCESS.scalaValueDescriptor).number) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ResourceProto.javaDescriptor.getMessageTypes().get(5) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ResourceProto.scalaDescriptor.messages(5) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 3 => __out = com.google.protobuf.struct.Struct + case 6 => __out = pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.resource.RegisterResourceResponse.PropertyDependencies, + _root_.pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 7 => pulumirpc.resource.Result + } + } + lazy val defaultInstance = pulumirpc.resource.RegisterResourceResponse( + urn = "", + id = "", + `object` = _root_.scala.None, + stable = false, + stables = _root_.scala.Seq.empty, + propertyDependencies = _root_.scala.collection.immutable.Map.empty, + result = pulumirpc.resource.Result.SUCCESS + ) + /** PropertyDependencies describes the resources that a particular property depends on. + * + * @param urns + * A list of URNs this property depends on. + */ + @SerialVersionUID(0L) + final case class PropertyDependencies( + urns: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PropertyDependencies] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + urns.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + urns.foreach { __v => + val __m = __v + _output__.writeString(1, __m) + }; + unknownFields.writeTo(_output__) + } + def clearUrns = copy(urns = _root_.scala.Seq.empty) + def addUrns(__vs: _root_.scala.Predef.String *): PropertyDependencies = addAllUrns(__vs) + def addAllUrns(__vs: Iterable[_root_.scala.Predef.String]): PropertyDependencies = copy(urns = urns ++ __vs) + def withUrns(__v: _root_.scala.Seq[_root_.scala.Predef.String]): PropertyDependencies = copy(urns = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => urns + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(urns.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.RegisterResourceResponse.PropertyDependencies.type = pulumirpc.resource.RegisterResourceResponse.PropertyDependencies + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RegisterResourceResponse.PropertyDependencies]) + } + + object PropertyDependencies extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceResponse.PropertyDependencies] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceResponse.PropertyDependencies] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.RegisterResourceResponse.PropertyDependencies = { + val __urns: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urns += _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.RegisterResourceResponse.PropertyDependencies( + urns = __urns.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.RegisterResourceResponse.PropertyDependencies] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.RegisterResourceResponse.PropertyDependencies( + urns = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.RegisterResourceResponse.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.RegisterResourceResponse.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.resource.RegisterResourceResponse.PropertyDependencies( + urns = _root_.scala.Seq.empty + ) + implicit class PropertyDependenciesLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies](_l) { + def urns: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.urns)((c_, f_) => c_.copy(urns = f_)) + } + final val URNS_FIELD_NUMBER = 1 + def of( + urns: _root_.scala.Seq[_root_.scala.Predef.String] + ): _root_.pulumirpc.resource.RegisterResourceResponse.PropertyDependencies = _root_.pulumirpc.resource.RegisterResourceResponse.PropertyDependencies( + urns + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RegisterResourceResponse.PropertyDependencies]) + } + + @SerialVersionUID(0L) + final case class PropertyDependenciesEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Option[pulumirpc.resource.RegisterResourceResponse.PropertyDependencies] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PropertyDependenciesEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (value.isDefined) { + val __value = value.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + value.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): PropertyDependenciesEntry = copy(key = __v) + def getValue: pulumirpc.resource.RegisterResourceResponse.PropertyDependencies = value.getOrElse(pulumirpc.resource.RegisterResourceResponse.PropertyDependencies.defaultInstance) + def clearValue: PropertyDependenciesEntry = copy(value = _root_.scala.None) + def withValue(__v: pulumirpc.resource.RegisterResourceResponse.PropertyDependencies): PropertyDependenciesEntry = copy(value = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => value.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => value.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry.type = pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.RegisterResourceResponse.PropertyDependenciesEntry]) + } + + object PropertyDependenciesEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Option[pulumirpc.resource.RegisterResourceResponse.PropertyDependencies] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _root_.scala.Option(__value.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.RegisterResourceResponse.PropertyDependencies](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[pulumirpc.resource.RegisterResourceResponse.PropertyDependencies]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.RegisterResourceResponse.javaDescriptor.getNestedTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.RegisterResourceResponse.scalaDescriptor.nestedMessages(1) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = pulumirpc.resource.RegisterResourceResponse.PropertyDependencies + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry( + key = "", + value = _root_.scala.None + ) + implicit class PropertyDependenciesEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies] = field(_.getValue)((c_, f_) => c_.copy(value = _root_.scala.Option(f_))) + def optionalValue: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.resource.RegisterResourceResponse.PropertyDependencies]] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies)] = + _root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies)](__m => (__m.key, __m.getValue))(__p => pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry(__p._1, Some(__p._2))) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Option[pulumirpc.resource.RegisterResourceResponse.PropertyDependencies] + ): _root_.pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry = _root_.pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RegisterResourceResponse.PropertyDependenciesEntry]) + } + + implicit class RegisterResourceResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.RegisterResourceResponse](_l) { + def urn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.urn)((c_, f_) => c_.copy(urn = f_)) + def id: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.id)((c_, f_) => c_.copy(id = f_)) + def `object`: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getObject)((c_, f_) => c_.copy(`object` = _root_.scala.Option(f_))) + def optionalObject: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.`object`)((c_, f_) => c_.copy(`object` = f_)) + def stable: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.stable)((c_, f_) => c_.copy(stable = f_)) + def stables: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.stables)((c_, f_) => c_.copy(stables = f_)) + def propertyDependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies]] = field(_.propertyDependencies)((c_, f_) => c_.copy(propertyDependencies = f_)) + def result: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.Result] = field(_.result)((c_, f_) => c_.copy(result = f_)) + } + final val URN_FIELD_NUMBER = 1 + final val ID_FIELD_NUMBER = 2 + final val OBJECT_FIELD_NUMBER = 3 + final val STABLE_FIELD_NUMBER = 4 + final val STABLES_FIELD_NUMBER = 5 + final val PROPERTYDEPENDENCIES_FIELD_NUMBER = 6 + final val RESULT_FIELD_NUMBER = 7 + @transient + private[resource] val _typemapper_propertyDependencies: _root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.resource.RegisterResourceResponse.PropertyDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies)]] + def of( + urn: _root_.scala.Predef.String, + id: _root_.scala.Predef.String, + `object`: _root_.scala.Option[com.google.protobuf.struct.Struct], + stable: _root_.scala.Boolean, + stables: _root_.scala.Seq[_root_.scala.Predef.String], + propertyDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.RegisterResourceResponse.PropertyDependencies], + result: pulumirpc.resource.Result + ): _root_.pulumirpc.resource.RegisterResourceResponse = _root_.pulumirpc.resource.RegisterResourceResponse( + urn, + id, + `object`, + stable, + stables, + propertyDependencies, + result + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.RegisterResourceResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/ResourceCallRequest.scala b/besom-rpc/src/main/scala/pulumirpc/resource/ResourceCallRequest.scala new file mode 100644 index 00000000..5cc69a1c --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/ResourceCallRequest.scala @@ -0,0 +1,752 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +/** @param tok + * the function token to invoke. + * @param args + * the arguments for the function invocation. + * @param argDependencies + * a map from argument keys to the dependencies of the argument. + * @param provider + * an optional reference to the provider to use for this invoke. + * @param version + * the version of the provider to use when servicing this request. + * @param pluginDownloadURL + * the pluginDownloadURL of the provider to use when servicing this request. + * @param pluginChecksums + * a map of checksums of the provider to use when servicing this request. + * @param sourcePosition + * the optional source position of the user code that initiated the call. + */ +@SerialVersionUID(0L) +final case class ResourceCallRequest( + tok: _root_.scala.Predef.String = "", + args: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + argDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies] = _root_.scala.collection.immutable.Map.empty, + provider: _root_.scala.Predef.String = "", + version: _root_.scala.Predef.String = "", + pluginDownloadURL: _root_.scala.Predef.String = "", + pluginChecksums: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] = _root_.scala.collection.immutable.Map.empty, + sourcePosition: _root_.scala.Option[pulumirpc.source.SourcePosition] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ResourceCallRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = tok + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (args.isDefined) { + val __value = args.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + argDependencies.foreach { __item => + val __value = pulumirpc.resource.ResourceCallRequest._typemapper_argDependencies.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = provider + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value) + } + }; + + { + val __value = version + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(5, __value) + } + }; + + { + val __value = pluginDownloadURL + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(13, __value) + } + }; + pluginChecksums.foreach { __item => + val __value = pulumirpc.resource.ResourceCallRequest._typemapper_pluginChecksums.toBase(__item) + __size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + if (sourcePosition.isDefined) { + val __value = sourcePosition.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = tok + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + args.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + argDependencies.foreach { __v => + val __m = pulumirpc.resource.ResourceCallRequest._typemapper_argDependencies.toBase(__v) + _output__.writeTag(3, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = provider + if (!__v.isEmpty) { + _output__.writeString(4, __v) + } + }; + { + val __v = version + if (!__v.isEmpty) { + _output__.writeString(5, __v) + } + }; + { + val __v = pluginDownloadURL + if (!__v.isEmpty) { + _output__.writeString(13, __v) + } + }; + sourcePosition.foreach { __v => + val __m = __v + _output__.writeTag(15, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + pluginChecksums.foreach { __v => + val __m = pulumirpc.resource.ResourceCallRequest._typemapper_pluginChecksums.toBase(__v) + _output__.writeTag(16, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withTok(__v: _root_.scala.Predef.String): ResourceCallRequest = copy(tok = __v) + def getArgs: com.google.protobuf.struct.Struct = args.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearArgs: ResourceCallRequest = copy(args = _root_.scala.None) + def withArgs(__v: com.google.protobuf.struct.Struct): ResourceCallRequest = copy(args = Option(__v)) + def clearArgDependencies = copy(argDependencies = _root_.scala.collection.immutable.Map.empty) + def addArgDependencies(__vs: (_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies) *): ResourceCallRequest = addAllArgDependencies(__vs) + def addAllArgDependencies(__vs: Iterable[(_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies)]): ResourceCallRequest = copy(argDependencies = argDependencies ++ __vs) + def withArgDependencies(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies]): ResourceCallRequest = copy(argDependencies = __v) + def withProvider(__v: _root_.scala.Predef.String): ResourceCallRequest = copy(provider = __v) + def withVersion(__v: _root_.scala.Predef.String): ResourceCallRequest = copy(version = __v) + def withPluginDownloadURL(__v: _root_.scala.Predef.String): ResourceCallRequest = copy(pluginDownloadURL = __v) + def clearPluginChecksums = copy(pluginChecksums = _root_.scala.collection.immutable.Map.empty) + def addPluginChecksums(__vs: (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString) *): ResourceCallRequest = addAllPluginChecksums(__vs) + def addAllPluginChecksums(__vs: Iterable[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]): ResourceCallRequest = copy(pluginChecksums = pluginChecksums ++ __vs) + def withPluginChecksums(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]): ResourceCallRequest = copy(pluginChecksums = __v) + def getSourcePosition: pulumirpc.source.SourcePosition = sourcePosition.getOrElse(pulumirpc.source.SourcePosition.defaultInstance) + def clearSourcePosition: ResourceCallRequest = copy(sourcePosition = _root_.scala.None) + def withSourcePosition(__v: pulumirpc.source.SourcePosition): ResourceCallRequest = copy(sourcePosition = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = tok + if (__t != "") __t else null + } + case 2 => args.orNull + case 3 => argDependencies.iterator.map(pulumirpc.resource.ResourceCallRequest._typemapper_argDependencies.toBase(_)).toSeq + case 4 => { + val __t = provider + if (__t != "") __t else null + } + case 5 => { + val __t = version + if (__t != "") __t else null + } + case 13 => { + val __t = pluginDownloadURL + if (__t != "") __t else null + } + case 16 => pluginChecksums.iterator.map(pulumirpc.resource.ResourceCallRequest._typemapper_pluginChecksums.toBase(_)).toSeq + case 15 => sourcePosition.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(tok) + case 2 => args.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 3 => _root_.scalapb.descriptors.PRepeated(argDependencies.iterator.map(pulumirpc.resource.ResourceCallRequest._typemapper_argDependencies.toBase(_).toPMessage).toVector) + case 4 => _root_.scalapb.descriptors.PString(provider) + case 5 => _root_.scalapb.descriptors.PString(version) + case 13 => _root_.scalapb.descriptors.PString(pluginDownloadURL) + case 16 => _root_.scalapb.descriptors.PRepeated(pluginChecksums.iterator.map(pulumirpc.resource.ResourceCallRequest._typemapper_pluginChecksums.toBase(_).toPMessage).toVector) + case 15 => sourcePosition.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.ResourceCallRequest.type = pulumirpc.resource.ResourceCallRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ResourceCallRequest]) +} + +object ResourceCallRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.ResourceCallRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.ResourceCallRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.ResourceCallRequest = { + var __tok: _root_.scala.Predef.String = "" + var __args: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + val __argDependencies: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies] + var __provider: _root_.scala.Predef.String = "" + var __version: _root_.scala.Predef.String = "" + var __pluginDownloadURL: _root_.scala.Predef.String = "" + val __pluginChecksums: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] + var __sourcePosition: _root_.scala.Option[pulumirpc.source.SourcePosition] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __tok = _input__.readStringRequireUtf8() + case 18 => + __args = _root_.scala.Option(__args.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 26 => + __argDependencies += pulumirpc.resource.ResourceCallRequest._typemapper_argDependencies.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry](_input__)) + case 34 => + __provider = _input__.readStringRequireUtf8() + case 42 => + __version = _input__.readStringRequireUtf8() + case 106 => + __pluginDownloadURL = _input__.readStringRequireUtf8() + case 130 => + __pluginChecksums += pulumirpc.resource.ResourceCallRequest._typemapper_pluginChecksums.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry](_input__)) + case 122 => + __sourcePosition = _root_.scala.Option(__sourcePosition.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.source.SourcePosition](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.ResourceCallRequest( + tok = __tok, + args = __args, + argDependencies = __argDependencies.result(), + provider = __provider, + version = __version, + pluginDownloadURL = __pluginDownloadURL, + pluginChecksums = __pluginChecksums.result(), + sourcePosition = __sourcePosition, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.ResourceCallRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.ResourceCallRequest( + tok = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + args = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + argDependencies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.resource.ResourceCallRequest._typemapper_argDependencies.toCustom(_)).toMap, + provider = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + version = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + pluginDownloadURL = __fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + pluginChecksums = __fieldsMap.get(scalaDescriptor.findFieldByNumber(16).get).map(_.as[_root_.scala.Seq[pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.resource.ResourceCallRequest._typemapper_pluginChecksums.toCustom(_)).toMap, + sourcePosition = __fieldsMap.get(scalaDescriptor.findFieldByNumber(15).get).flatMap(_.as[_root_.scala.Option[pulumirpc.source.SourcePosition]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ResourceProto.javaDescriptor.getMessageTypes().get(8) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ResourceProto.scalaDescriptor.messages(8) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = com.google.protobuf.struct.Struct + case 3 => __out = pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry + case 16 => __out = pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry + case 15 => __out = pulumirpc.source.SourcePosition + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.resource.ResourceCallRequest.ArgumentDependencies, + _root_.pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry, + _root_.pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.resource.ResourceCallRequest( + tok = "", + args = _root_.scala.None, + argDependencies = _root_.scala.collection.immutable.Map.empty, + provider = "", + version = "", + pluginDownloadURL = "", + pluginChecksums = _root_.scala.collection.immutable.Map.empty, + sourcePosition = _root_.scala.None + ) + /** ArgumentDependencies describes the resources that a particular argument depends on. + * + * @param urns + * A list of URNs this argument depends on. + */ + @SerialVersionUID(0L) + final case class ArgumentDependencies( + urns: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ArgumentDependencies] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + urns.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + urns.foreach { __v => + val __m = __v + _output__.writeString(1, __m) + }; + unknownFields.writeTo(_output__) + } + def clearUrns = copy(urns = _root_.scala.Seq.empty) + def addUrns(__vs: _root_.scala.Predef.String *): ArgumentDependencies = addAllUrns(__vs) + def addAllUrns(__vs: Iterable[_root_.scala.Predef.String]): ArgumentDependencies = copy(urns = urns ++ __vs) + def withUrns(__v: _root_.scala.Seq[_root_.scala.Predef.String]): ArgumentDependencies = copy(urns = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => urns + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(urns.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.ResourceCallRequest.ArgumentDependencies.type = pulumirpc.resource.ResourceCallRequest.ArgumentDependencies + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ResourceCallRequest.ArgumentDependencies]) + } + + object ArgumentDependencies extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.ResourceCallRequest.ArgumentDependencies] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.ResourceCallRequest.ArgumentDependencies] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.ResourceCallRequest.ArgumentDependencies = { + val __urns: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __urns += _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.ResourceCallRequest.ArgumentDependencies( + urns = __urns.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.ResourceCallRequest.ArgumentDependencies] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.ResourceCallRequest.ArgumentDependencies( + urns = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.ResourceCallRequest.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.ResourceCallRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.resource.ResourceCallRequest.ArgumentDependencies( + urns = _root_.scala.Seq.empty + ) + implicit class ArgumentDependenciesLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies](_l) { + def urns: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.urns)((c_, f_) => c_.copy(urns = f_)) + } + final val URNS_FIELD_NUMBER = 1 + def of( + urns: _root_.scala.Seq[_root_.scala.Predef.String] + ): _root_.pulumirpc.resource.ResourceCallRequest.ArgumentDependencies = _root_.pulumirpc.resource.ResourceCallRequest.ArgumentDependencies( + urns + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ResourceCallRequest.ArgumentDependencies]) + } + + @SerialVersionUID(0L) + final case class ArgDependenciesEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Option[pulumirpc.resource.ResourceCallRequest.ArgumentDependencies] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ArgDependenciesEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (value.isDefined) { + val __value = value.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + value.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): ArgDependenciesEntry = copy(key = __v) + def getValue: pulumirpc.resource.ResourceCallRequest.ArgumentDependencies = value.getOrElse(pulumirpc.resource.ResourceCallRequest.ArgumentDependencies.defaultInstance) + def clearValue: ArgDependenciesEntry = copy(value = _root_.scala.None) + def withValue(__v: pulumirpc.resource.ResourceCallRequest.ArgumentDependencies): ArgDependenciesEntry = copy(value = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => value.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => value.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry.type = pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ResourceCallRequest.ArgDependenciesEntry]) + } + + object ArgDependenciesEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Option[pulumirpc.resource.ResourceCallRequest.ArgumentDependencies] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _root_.scala.Option(__value.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.ResourceCallRequest.ArgumentDependencies](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[pulumirpc.resource.ResourceCallRequest.ArgumentDependencies]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.ResourceCallRequest.javaDescriptor.getNestedTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.ResourceCallRequest.scalaDescriptor.nestedMessages(1) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = pulumirpc.resource.ResourceCallRequest.ArgumentDependencies + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry( + key = "", + value = _root_.scala.None + ) + implicit class ArgDependenciesEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies] = field(_.getValue)((c_, f_) => c_.copy(value = _root_.scala.Option(f_))) + def optionalValue: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.resource.ResourceCallRequest.ArgumentDependencies]] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies)] = + _root_.scalapb.TypeMapper[pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies)](__m => (__m.key, __m.getValue))(__p => pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry(__p._1, Some(__p._2))) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Option[pulumirpc.resource.ResourceCallRequest.ArgumentDependencies] + ): _root_.pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry = _root_.pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ResourceCallRequest.ArgDependenciesEntry]) + } + + @SerialVersionUID(0L) + final case class PluginChecksumsEntry( + key: _root_.scala.Predef.String = "", + value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PluginChecksumsEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeBytes(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): PluginChecksumsEntry = copy(key = __v) + def withValue(__v: _root_.com.google.protobuf.ByteString): PluginChecksumsEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PByteString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry.type = pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ResourceCallRequest.PluginChecksumsEntry]) + } + + object PluginChecksumsEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.ResourceCallRequest.javaDescriptor.getNestedTypes().get(2) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.ResourceCallRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry( + key = "", + value = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class PluginChecksumsEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = + _root_.scalapb.TypeMapper[pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)](__m => (__m.key, __m.value))(__p => pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry = _root_.pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ResourceCallRequest.PluginChecksumsEntry]) + } + + implicit class ResourceCallRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.ResourceCallRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.ResourceCallRequest](_l) { + def tok: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.tok)((c_, f_) => c_.copy(tok = f_)) + def args: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getArgs)((c_, f_) => c_.copy(args = _root_.scala.Option(f_))) + def optionalArgs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.args)((c_, f_) => c_.copy(args = f_)) + def argDependencies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies]] = field(_.argDependencies)((c_, f_) => c_.copy(argDependencies = f_)) + def provider: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.provider)((c_, f_) => c_.copy(provider = f_)) + def version: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.version)((c_, f_) => c_.copy(version = f_)) + def pluginDownloadURL: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.pluginDownloadURL)((c_, f_) => c_.copy(pluginDownloadURL = f_)) + def pluginChecksums: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = field(_.pluginChecksums)((c_, f_) => c_.copy(pluginChecksums = f_)) + def sourcePosition: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.source.SourcePosition] = field(_.getSourcePosition)((c_, f_) => c_.copy(sourcePosition = _root_.scala.Option(f_))) + def optionalSourcePosition: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.source.SourcePosition]] = field(_.sourcePosition)((c_, f_) => c_.copy(sourcePosition = f_)) + } + final val TOK_FIELD_NUMBER = 1 + final val ARGS_FIELD_NUMBER = 2 + final val ARGDEPENDENCIES_FIELD_NUMBER = 3 + final val PROVIDER_FIELD_NUMBER = 4 + final val VERSION_FIELD_NUMBER = 5 + final val PLUGINDOWNLOADURL_FIELD_NUMBER = 13 + final val PLUGINCHECKSUMS_FIELD_NUMBER = 16 + final val SOURCEPOSITION_FIELD_NUMBER = 15 + @transient + private[resource] val _typemapper_argDependencies: _root_.scalapb.TypeMapper[pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.resource.ResourceCallRequest.ArgDependenciesEntry, (_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies)]] + @transient + private[resource] val _typemapper_pluginChecksums: _root_.scalapb.TypeMapper[pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.resource.ResourceCallRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]] + def of( + tok: _root_.scala.Predef.String, + args: _root_.scala.Option[com.google.protobuf.struct.Struct], + argDependencies: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, pulumirpc.resource.ResourceCallRequest.ArgumentDependencies], + provider: _root_.scala.Predef.String, + version: _root_.scala.Predef.String, + pluginDownloadURL: _root_.scala.Predef.String, + pluginChecksums: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString], + sourcePosition: _root_.scala.Option[pulumirpc.source.SourcePosition] + ): _root_.pulumirpc.resource.ResourceCallRequest = _root_.pulumirpc.resource.ResourceCallRequest( + tok, + args, + argDependencies, + provider, + version, + pluginDownloadURL, + pluginChecksums, + sourcePosition + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ResourceCallRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/ResourceInvokeRequest.scala b/besom-rpc/src/main/scala/pulumirpc/resource/ResourceInvokeRequest.scala new file mode 100644 index 00000000..feefdcbf --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/ResourceInvokeRequest.scala @@ -0,0 +1,492 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +/** @param tok + * the function token to invoke. + * @param args + * the arguments for the function invocation. + * @param provider + * an optional reference to the provider version to use for this invoke. + * @param version + * the version of the provider to use when servicing this request. + * @param acceptResources + * when true operations should return resource references as strongly typed. + * @param pluginDownloadURL + * an optional reference to the provider url to use for this invoke. + * @param pluginChecksums + * a map of checksums expected for the provider plugin. + * @param sourcePosition + * the optional source position of the user code that initiated the invoke. + */ +@SerialVersionUID(0L) +final case class ResourceInvokeRequest( + tok: _root_.scala.Predef.String = "", + args: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + provider: _root_.scala.Predef.String = "", + version: _root_.scala.Predef.String = "", + acceptResources: _root_.scala.Boolean = false, + pluginDownloadURL: _root_.scala.Predef.String = "", + pluginChecksums: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] = _root_.scala.collection.immutable.Map.empty, + sourcePosition: _root_.scala.Option[pulumirpc.source.SourcePosition] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ResourceInvokeRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = tok + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + if (args.isDefined) { + val __value = args.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + + { + val __value = provider + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + }; + + { + val __value = version + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value) + } + }; + + { + val __value = acceptResources + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(5, __value) + } + }; + + { + val __value = pluginDownloadURL + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(6, __value) + } + }; + pluginChecksums.foreach { __item => + val __value = pulumirpc.resource.ResourceInvokeRequest._typemapper_pluginChecksums.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + if (sourcePosition.isDefined) { + val __value = sourcePosition.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = tok + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + args.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = provider + if (!__v.isEmpty) { + _output__.writeString(3, __v) + } + }; + { + val __v = version + if (!__v.isEmpty) { + _output__.writeString(4, __v) + } + }; + { + val __v = acceptResources + if (__v != false) { + _output__.writeBool(5, __v) + } + }; + { + val __v = pluginDownloadURL + if (!__v.isEmpty) { + _output__.writeString(6, __v) + } + }; + sourcePosition.foreach { __v => + val __m = __v + _output__.writeTag(7, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + pluginChecksums.foreach { __v => + val __m = pulumirpc.resource.ResourceInvokeRequest._typemapper_pluginChecksums.toBase(__v) + _output__.writeTag(8, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withTok(__v: _root_.scala.Predef.String): ResourceInvokeRequest = copy(tok = __v) + def getArgs: com.google.protobuf.struct.Struct = args.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearArgs: ResourceInvokeRequest = copy(args = _root_.scala.None) + def withArgs(__v: com.google.protobuf.struct.Struct): ResourceInvokeRequest = copy(args = Option(__v)) + def withProvider(__v: _root_.scala.Predef.String): ResourceInvokeRequest = copy(provider = __v) + def withVersion(__v: _root_.scala.Predef.String): ResourceInvokeRequest = copy(version = __v) + def withAcceptResources(__v: _root_.scala.Boolean): ResourceInvokeRequest = copy(acceptResources = __v) + def withPluginDownloadURL(__v: _root_.scala.Predef.String): ResourceInvokeRequest = copy(pluginDownloadURL = __v) + def clearPluginChecksums = copy(pluginChecksums = _root_.scala.collection.immutable.Map.empty) + def addPluginChecksums(__vs: (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString) *): ResourceInvokeRequest = addAllPluginChecksums(__vs) + def addAllPluginChecksums(__vs: Iterable[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]): ResourceInvokeRequest = copy(pluginChecksums = pluginChecksums ++ __vs) + def withPluginChecksums(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]): ResourceInvokeRequest = copy(pluginChecksums = __v) + def getSourcePosition: pulumirpc.source.SourcePosition = sourcePosition.getOrElse(pulumirpc.source.SourcePosition.defaultInstance) + def clearSourcePosition: ResourceInvokeRequest = copy(sourcePosition = _root_.scala.None) + def withSourcePosition(__v: pulumirpc.source.SourcePosition): ResourceInvokeRequest = copy(sourcePosition = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = tok + if (__t != "") __t else null + } + case 2 => args.orNull + case 3 => { + val __t = provider + if (__t != "") __t else null + } + case 4 => { + val __t = version + if (__t != "") __t else null + } + case 5 => { + val __t = acceptResources + if (__t != false) __t else null + } + case 6 => { + val __t = pluginDownloadURL + if (__t != "") __t else null + } + case 8 => pluginChecksums.iterator.map(pulumirpc.resource.ResourceInvokeRequest._typemapper_pluginChecksums.toBase(_)).toSeq + case 7 => sourcePosition.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(tok) + case 2 => args.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 3 => _root_.scalapb.descriptors.PString(provider) + case 4 => _root_.scalapb.descriptors.PString(version) + case 5 => _root_.scalapb.descriptors.PBoolean(acceptResources) + case 6 => _root_.scalapb.descriptors.PString(pluginDownloadURL) + case 8 => _root_.scalapb.descriptors.PRepeated(pluginChecksums.iterator.map(pulumirpc.resource.ResourceInvokeRequest._typemapper_pluginChecksums.toBase(_).toPMessage).toVector) + case 7 => sourcePosition.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.ResourceInvokeRequest.type = pulumirpc.resource.ResourceInvokeRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ResourceInvokeRequest]) +} + +object ResourceInvokeRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.ResourceInvokeRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.ResourceInvokeRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.ResourceInvokeRequest = { + var __tok: _root_.scala.Predef.String = "" + var __args: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __provider: _root_.scala.Predef.String = "" + var __version: _root_.scala.Predef.String = "" + var __acceptResources: _root_.scala.Boolean = false + var __pluginDownloadURL: _root_.scala.Predef.String = "" + val __pluginChecksums: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] + var __sourcePosition: _root_.scala.Option[pulumirpc.source.SourcePosition] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __tok = _input__.readStringRequireUtf8() + case 18 => + __args = _root_.scala.Option(__args.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 26 => + __provider = _input__.readStringRequireUtf8() + case 34 => + __version = _input__.readStringRequireUtf8() + case 40 => + __acceptResources = _input__.readBool() + case 50 => + __pluginDownloadURL = _input__.readStringRequireUtf8() + case 66 => + __pluginChecksums += pulumirpc.resource.ResourceInvokeRequest._typemapper_pluginChecksums.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry](_input__)) + case 58 => + __sourcePosition = _root_.scala.Option(__sourcePosition.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.source.SourcePosition](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.ResourceInvokeRequest( + tok = __tok, + args = __args, + provider = __provider, + version = __version, + acceptResources = __acceptResources, + pluginDownloadURL = __pluginDownloadURL, + pluginChecksums = __pluginChecksums.result(), + sourcePosition = __sourcePosition, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.ResourceInvokeRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.ResourceInvokeRequest( + tok = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + args = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + provider = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + version = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + acceptResources = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + pluginDownloadURL = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + pluginChecksums = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Seq[pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.resource.ResourceInvokeRequest._typemapper_pluginChecksums.toCustom(_)).toMap, + sourcePosition = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).flatMap(_.as[_root_.scala.Option[pulumirpc.source.SourcePosition]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ResourceProto.javaDescriptor.getMessageTypes().get(7) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ResourceProto.scalaDescriptor.messages(7) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 2 => __out = com.google.protobuf.struct.Struct + case 8 => __out = pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry + case 7 => __out = pulumirpc.source.SourcePosition + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.resource.ResourceInvokeRequest( + tok = "", + args = _root_.scala.None, + provider = "", + version = "", + acceptResources = false, + pluginDownloadURL = "", + pluginChecksums = _root_.scala.collection.immutable.Map.empty, + sourcePosition = _root_.scala.None + ) + @SerialVersionUID(0L) + final case class PluginChecksumsEntry( + key: _root_.scala.Predef.String = "", + value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PluginChecksumsEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeBytes(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): PluginChecksumsEntry = copy(key = __v) + def withValue(__v: _root_.com.google.protobuf.ByteString): PluginChecksumsEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PByteString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry.type = pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.ResourceInvokeRequest.PluginChecksumsEntry]) + } + + object PluginChecksumsEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.ResourceInvokeRequest.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.ResourceInvokeRequest.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry( + key = "", + value = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class PluginChecksumsEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = + _root_.scalapb.TypeMapper[pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)](__m => (__m.key, __m.value))(__p => pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry = _root_.pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ResourceInvokeRequest.PluginChecksumsEntry]) + } + + implicit class ResourceInvokeRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.ResourceInvokeRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.ResourceInvokeRequest](_l) { + def tok: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.tok)((c_, f_) => c_.copy(tok = f_)) + def args: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getArgs)((c_, f_) => c_.copy(args = _root_.scala.Option(f_))) + def optionalArgs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.args)((c_, f_) => c_.copy(args = f_)) + def provider: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.provider)((c_, f_) => c_.copy(provider = f_)) + def version: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.version)((c_, f_) => c_.copy(version = f_)) + def acceptResources: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.acceptResources)((c_, f_) => c_.copy(acceptResources = f_)) + def pluginDownloadURL: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.pluginDownloadURL)((c_, f_) => c_.copy(pluginDownloadURL = f_)) + def pluginChecksums: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = field(_.pluginChecksums)((c_, f_) => c_.copy(pluginChecksums = f_)) + def sourcePosition: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.source.SourcePosition] = field(_.getSourcePosition)((c_, f_) => c_.copy(sourcePosition = _root_.scala.Option(f_))) + def optionalSourcePosition: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.source.SourcePosition]] = field(_.sourcePosition)((c_, f_) => c_.copy(sourcePosition = f_)) + } + final val TOK_FIELD_NUMBER = 1 + final val ARGS_FIELD_NUMBER = 2 + final val PROVIDER_FIELD_NUMBER = 3 + final val VERSION_FIELD_NUMBER = 4 + final val ACCEPTRESOURCES_FIELD_NUMBER = 5 + final val PLUGINDOWNLOADURL_FIELD_NUMBER = 6 + final val PLUGINCHECKSUMS_FIELD_NUMBER = 8 + final val SOURCEPOSITION_FIELD_NUMBER = 7 + @transient + private[resource] val _typemapper_pluginChecksums: _root_.scalapb.TypeMapper[pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.resource.ResourceInvokeRequest.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]] + def of( + tok: _root_.scala.Predef.String, + args: _root_.scala.Option[com.google.protobuf.struct.Struct], + provider: _root_.scala.Predef.String, + version: _root_.scala.Predef.String, + acceptResources: _root_.scala.Boolean, + pluginDownloadURL: _root_.scala.Predef.String, + pluginChecksums: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString], + sourcePosition: _root_.scala.Option[pulumirpc.source.SourcePosition] + ): _root_.pulumirpc.resource.ResourceInvokeRequest = _root_.pulumirpc.resource.ResourceInvokeRequest( + tok, + args, + provider, + version, + acceptResources, + pluginDownloadURL, + pluginChecksums, + sourcePosition + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.ResourceInvokeRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/ResourceMonitorGrpc.scala b/besom-rpc/src/main/scala/pulumirpc/resource/ResourceMonitorGrpc.scala new file mode 100644 index 00000000..e808be3e --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/ResourceMonitorGrpc.scala @@ -0,0 +1,273 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + + +object ResourceMonitorGrpc { + val METHOD_SUPPORTS_FEATURE: _root_.io.grpc.MethodDescriptor[pulumirpc.resource.SupportsFeatureRequest, pulumirpc.resource.SupportsFeatureResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceMonitor", "SupportsFeature")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.resource.SupportsFeatureRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.resource.SupportsFeatureResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.resource.ResourceProto.javaDescriptor.getServices().get(0).getMethods().get(0))) + .build() + + val METHOD_INVOKE: _root_.io.grpc.MethodDescriptor[pulumirpc.resource.ResourceInvokeRequest, pulumirpc.provider.InvokeResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceMonitor", "Invoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.resource.ResourceInvokeRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.InvokeResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.resource.ResourceProto.javaDescriptor.getServices().get(0).getMethods().get(1))) + .build() + + val METHOD_STREAM_INVOKE: _root_.io.grpc.MethodDescriptor[pulumirpc.resource.ResourceInvokeRequest, pulumirpc.provider.InvokeResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceMonitor", "StreamInvoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.resource.ResourceInvokeRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.InvokeResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.resource.ResourceProto.javaDescriptor.getServices().get(0).getMethods().get(2))) + .build() + + val METHOD_CALL: _root_.io.grpc.MethodDescriptor[pulumirpc.resource.ResourceCallRequest, pulumirpc.provider.CallResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceMonitor", "Call")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.resource.ResourceCallRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.provider.CallResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.resource.ResourceProto.javaDescriptor.getServices().get(0).getMethods().get(3))) + .build() + + val METHOD_READ_RESOURCE: _root_.io.grpc.MethodDescriptor[pulumirpc.resource.ReadResourceRequest, pulumirpc.resource.ReadResourceResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceMonitor", "ReadResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.resource.ReadResourceRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.resource.ReadResourceResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.resource.ResourceProto.javaDescriptor.getServices().get(0).getMethods().get(4))) + .build() + + val METHOD_REGISTER_RESOURCE: _root_.io.grpc.MethodDescriptor[pulumirpc.resource.RegisterResourceRequest, pulumirpc.resource.RegisterResourceResponse] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceMonitor", "RegisterResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.resource.RegisterResourceRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.resource.RegisterResourceResponse]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.resource.ResourceProto.javaDescriptor.getServices().get(0).getMethods().get(5))) + .build() + + val METHOD_REGISTER_RESOURCE_OUTPUTS: _root_.io.grpc.MethodDescriptor[pulumirpc.resource.RegisterResourceOutputsRequest, com.google.protobuf.empty.Empty] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceMonitor", "RegisterResourceOutputs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.resource.RegisterResourceOutputsRequest]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[com.google.protobuf.empty.Empty]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.resource.ResourceProto.javaDescriptor.getServices().get(0).getMethods().get(6))) + .build() + + val METHOD_REGISTER_STACK_TRANSFORM: _root_.io.grpc.MethodDescriptor[pulumirpc.callback.Callback, com.google.protobuf.empty.Empty] = + _root_.io.grpc.MethodDescriptor.newBuilder() + .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("pulumirpc.ResourceMonitor", "RegisterStackTransform")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[pulumirpc.callback.Callback]) + .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[com.google.protobuf.empty.Empty]) + .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(pulumirpc.resource.ResourceProto.javaDescriptor.getServices().get(0).getMethods().get(7))) + .build() + + val SERVICE: _root_.io.grpc.ServiceDescriptor = + _root_.io.grpc.ServiceDescriptor.newBuilder("pulumirpc.ResourceMonitor") + .setSchemaDescriptor(new _root_.scalapb.grpc.ConcreteProtoFileDescriptorSupplier(pulumirpc.resource.ResourceProto.javaDescriptor)) + .addMethod(METHOD_SUPPORTS_FEATURE) + .addMethod(METHOD_INVOKE) + .addMethod(METHOD_STREAM_INVOKE) + .addMethod(METHOD_CALL) + .addMethod(METHOD_READ_RESOURCE) + .addMethod(METHOD_REGISTER_RESOURCE) + .addMethod(METHOD_REGISTER_RESOURCE_OUTPUTS) + .addMethod(METHOD_REGISTER_STACK_TRANSFORM) + .build() + + /** ResourceMonitor is the interface a source uses to talk back to the planning monitor orchestrating the execution. + */ + trait ResourceMonitor extends _root_.scalapb.grpc.AbstractService { + override def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[ResourceMonitor] = ResourceMonitor + def supportsFeature(request: pulumirpc.resource.SupportsFeatureRequest): scala.concurrent.Future[pulumirpc.resource.SupportsFeatureResponse] + def invoke(request: pulumirpc.resource.ResourceInvokeRequest): scala.concurrent.Future[pulumirpc.provider.InvokeResponse] + def streamInvoke(request: pulumirpc.resource.ResourceInvokeRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.InvokeResponse]): _root_.scala.Unit + def call(request: pulumirpc.resource.ResourceCallRequest): scala.concurrent.Future[pulumirpc.provider.CallResponse] + def readResource(request: pulumirpc.resource.ReadResourceRequest): scala.concurrent.Future[pulumirpc.resource.ReadResourceResponse] + def registerResource(request: pulumirpc.resource.RegisterResourceRequest): scala.concurrent.Future[pulumirpc.resource.RegisterResourceResponse] + def registerResourceOutputs(request: pulumirpc.resource.RegisterResourceOutputsRequest): scala.concurrent.Future[com.google.protobuf.empty.Empty] + def registerStackTransform(request: pulumirpc.callback.Callback): scala.concurrent.Future[com.google.protobuf.empty.Empty] + } + + object ResourceMonitor extends _root_.scalapb.grpc.ServiceCompanion[ResourceMonitor] { + implicit def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[ResourceMonitor] = this + def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = pulumirpc.resource.ResourceProto.javaDescriptor.getServices().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.ServiceDescriptor = pulumirpc.resource.ResourceProto.scalaDescriptor.services(0) + def bindService(serviceImpl: ResourceMonitor, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = + _root_.io.grpc.ServerServiceDefinition.builder(SERVICE) + .addMethod( + METHOD_SUPPORTS_FEATURE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.resource.SupportsFeatureRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.resource.SupportsFeatureResponse]) => { + serviceImpl.supportsFeature(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_INVOKE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.resource.ResourceInvokeRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.InvokeResponse]) => { + serviceImpl.invoke(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_STREAM_INVOKE, + _root_.io.grpc.stub.ServerCalls.asyncServerStreamingCall((request: pulumirpc.resource.ResourceInvokeRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.InvokeResponse]) => { + serviceImpl.streamInvoke(request, observer) + })) + .addMethod( + METHOD_CALL, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.resource.ResourceCallRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.CallResponse]) => { + serviceImpl.call(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_READ_RESOURCE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.resource.ReadResourceRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.resource.ReadResourceResponse]) => { + serviceImpl.readResource(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_REGISTER_RESOURCE, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.resource.RegisterResourceRequest, observer: _root_.io.grpc.stub.StreamObserver[pulumirpc.resource.RegisterResourceResponse]) => { + serviceImpl.registerResource(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_REGISTER_RESOURCE_OUTPUTS, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.resource.RegisterResourceOutputsRequest, observer: _root_.io.grpc.stub.StreamObserver[com.google.protobuf.empty.Empty]) => { + serviceImpl.registerResourceOutputs(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .addMethod( + METHOD_REGISTER_STACK_TRANSFORM, + _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: pulumirpc.callback.Callback, observer: _root_.io.grpc.stub.StreamObserver[com.google.protobuf.empty.Empty]) => { + serviceImpl.registerStackTransform(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))( + executionContext) + })) + .build() + } + + /** ResourceMonitor is the interface a source uses to talk back to the planning monitor orchestrating the execution. + */ + trait ResourceMonitorBlockingClient { + def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[ResourceMonitor] = ResourceMonitor + def supportsFeature(request: pulumirpc.resource.SupportsFeatureRequest): pulumirpc.resource.SupportsFeatureResponse + def invoke(request: pulumirpc.resource.ResourceInvokeRequest): pulumirpc.provider.InvokeResponse + def streamInvoke(request: pulumirpc.resource.ResourceInvokeRequest): scala.collection.Iterator[pulumirpc.provider.InvokeResponse] + def call(request: pulumirpc.resource.ResourceCallRequest): pulumirpc.provider.CallResponse + def readResource(request: pulumirpc.resource.ReadResourceRequest): pulumirpc.resource.ReadResourceResponse + def registerResource(request: pulumirpc.resource.RegisterResourceRequest): pulumirpc.resource.RegisterResourceResponse + def registerResourceOutputs(request: pulumirpc.resource.RegisterResourceOutputsRequest): com.google.protobuf.empty.Empty + def registerStackTransform(request: pulumirpc.callback.Callback): com.google.protobuf.empty.Empty + } + + class ResourceMonitorBlockingStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[ResourceMonitorBlockingStub](channel, options) with ResourceMonitorBlockingClient { + override def supportsFeature(request: pulumirpc.resource.SupportsFeatureRequest): pulumirpc.resource.SupportsFeatureResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_SUPPORTS_FEATURE, options, request) + } + + override def invoke(request: pulumirpc.resource.ResourceInvokeRequest): pulumirpc.provider.InvokeResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_INVOKE, options, request) + } + + override def streamInvoke(request: pulumirpc.resource.ResourceInvokeRequest): scala.collection.Iterator[pulumirpc.provider.InvokeResponse] = { + _root_.scalapb.grpc.ClientCalls.blockingServerStreamingCall(channel, METHOD_STREAM_INVOKE, options, request) + } + + override def call(request: pulumirpc.resource.ResourceCallRequest): pulumirpc.provider.CallResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_CALL, options, request) + } + + override def readResource(request: pulumirpc.resource.ReadResourceRequest): pulumirpc.resource.ReadResourceResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_READ_RESOURCE, options, request) + } + + override def registerResource(request: pulumirpc.resource.RegisterResourceRequest): pulumirpc.resource.RegisterResourceResponse = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_REGISTER_RESOURCE, options, request) + } + + override def registerResourceOutputs(request: pulumirpc.resource.RegisterResourceOutputsRequest): com.google.protobuf.empty.Empty = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_REGISTER_RESOURCE_OUTPUTS, options, request) + } + + override def registerStackTransform(request: pulumirpc.callback.Callback): com.google.protobuf.empty.Empty = { + _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_REGISTER_STACK_TRANSFORM, options, request) + } + + override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): ResourceMonitorBlockingStub = new ResourceMonitorBlockingStub(channel, options) + } + + class ResourceMonitorStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[ResourceMonitorStub](channel, options) with ResourceMonitor { + override def supportsFeature(request: pulumirpc.resource.SupportsFeatureRequest): scala.concurrent.Future[pulumirpc.resource.SupportsFeatureResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_SUPPORTS_FEATURE, options, request) + } + + override def invoke(request: pulumirpc.resource.ResourceInvokeRequest): scala.concurrent.Future[pulumirpc.provider.InvokeResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_INVOKE, options, request) + } + + override def streamInvoke(request: pulumirpc.resource.ResourceInvokeRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.InvokeResponse]): _root_.scala.Unit = { + _root_.scalapb.grpc.ClientCalls.asyncServerStreamingCall(channel, METHOD_STREAM_INVOKE, options, request, responseObserver) + } + + override def call(request: pulumirpc.resource.ResourceCallRequest): scala.concurrent.Future[pulumirpc.provider.CallResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_CALL, options, request) + } + + override def readResource(request: pulumirpc.resource.ReadResourceRequest): scala.concurrent.Future[pulumirpc.resource.ReadResourceResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_READ_RESOURCE, options, request) + } + + override def registerResource(request: pulumirpc.resource.RegisterResourceRequest): scala.concurrent.Future[pulumirpc.resource.RegisterResourceResponse] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_REGISTER_RESOURCE, options, request) + } + + override def registerResourceOutputs(request: pulumirpc.resource.RegisterResourceOutputsRequest): scala.concurrent.Future[com.google.protobuf.empty.Empty] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_REGISTER_RESOURCE_OUTPUTS, options, request) + } + + override def registerStackTransform(request: pulumirpc.callback.Callback): scala.concurrent.Future[com.google.protobuf.empty.Empty] = { + _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_REGISTER_STACK_TRANSFORM, options, request) + } + + override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): ResourceMonitorStub = new ResourceMonitorStub(channel, options) + } + + object ResourceMonitorStub extends _root_.io.grpc.stub.AbstractStub.StubFactory[ResourceMonitorStub] { + override def newStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): ResourceMonitorStub = new ResourceMonitorStub(channel, options) + + implicit val stubFactory: _root_.io.grpc.stub.AbstractStub.StubFactory[ResourceMonitorStub] = this + } + + def bindService(serviceImpl: ResourceMonitor, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = ResourceMonitor.bindService(serviceImpl, executionContext) + + def blockingStub(channel: _root_.io.grpc.Channel): ResourceMonitorBlockingStub = new ResourceMonitorBlockingStub(channel) + + def stub(channel: _root_.io.grpc.Channel): ResourceMonitorStub = new ResourceMonitorStub(channel) + + def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = pulumirpc.resource.ResourceProto.javaDescriptor.getServices().get(0) + +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/ResourceProto.scala b/besom-rpc/src/main/scala/pulumirpc/resource/ResourceProto.scala new file mode 100644 index 00000000..6e69086a --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/ResourceProto.scala @@ -0,0 +1,172 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +object ResourceProto extends _root_.scalapb.GeneratedFileObject { + lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq( + com.google.protobuf.empty.EmptyProto, + com.google.protobuf.struct.StructProto, + pulumirpc.provider.ProviderProto, + pulumirpc.alias.AliasProto, + pulumirpc.source.SourceProto, + pulumirpc.callback.CallbackProto + ) + lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + pulumirpc.resource.SupportsFeatureRequest, + pulumirpc.resource.SupportsFeatureResponse, + pulumirpc.resource.ReadResourceRequest, + pulumirpc.resource.ReadResourceResponse, + pulumirpc.resource.RegisterResourceRequest, + pulumirpc.resource.RegisterResourceResponse, + pulumirpc.resource.RegisterResourceOutputsRequest, + pulumirpc.resource.ResourceInvokeRequest, + pulumirpc.resource.ResourceCallRequest, + pulumirpc.resource.TransformResourceOptions, + pulumirpc.resource.TransformRequest, + pulumirpc.resource.TransformResponse + ) + private lazy val ProtoBytes: _root_.scala.Array[Byte] = + scalapb.Encoding.fromBase64(scala.collection.immutable.Seq( + """ChVwdWx1bWkvcmVzb3VyY2UucHJvdG8SCXB1bHVtaXJwYxobZ29vZ2xlL3Byb3RvYnVmL2VtcHR5LnByb3RvGhxnb29nbGUvc + HJvdG9idWYvc3RydWN0LnByb3RvGhVwdWx1bWkvcHJvdmlkZXIucHJvdG8aEnB1bHVtaS9hbGlhcy5wcm90bxoTcHVsdW1pL3Nvd + XJjZS5wcm90bxoVcHVsdW1pL2NhbGxiYWNrLnByb3RvIjEKFlN1cHBvcnRzRmVhdHVyZVJlcXVlc3QSFwoCaWQYASABKAlCB+I/B + BICaWRSAmlkIkoKF1N1cHBvcnRzRmVhdHVyZVJlc3BvbnNlEi8KCmhhc1N1cHBvcnQYASABKAhCD+I/DBIKaGFzU3VwcG9ydFIKa + GFzU3VwcG9ydCKzBwoTUmVhZFJlc291cmNlUmVxdWVzdBIXCgJpZBgBIAEoCUIH4j8EEgJpZFICaWQSHQoEdHlwZRgCIAEoCUIJ4 + j8GEgR0eXBlUgR0eXBlEh0KBG5hbWUYAyABKAlCCeI/BhIEbmFtZVIEbmFtZRIjCgZwYXJlbnQYBCABKAlCC+I/CBIGcGFyZW50U + gZwYXJlbnQSSAoKcHJvcGVydGllcxgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RCD+I/DBIKcHJvcGVydGllc1IKcHJvc + GVydGllcxI1CgxkZXBlbmRlbmNpZXMYBiADKAlCEeI/DhIMZGVwZW5kZW5jaWVzUgxkZXBlbmRlbmNpZXMSKQoIcHJvdmlkZXIYB + yABKAlCDeI/ChIIcHJvdmlkZXJSCHByb3ZpZGVyEiYKB3ZlcnNpb24YCCABKAlCDOI/CRIHdmVyc2lvblIHdmVyc2lvbhI4Cg1hY + 2NlcHRTZWNyZXRzGAkgASgIQhLiPw8SDWFjY2VwdFNlY3JldHNSDWFjY2VwdFNlY3JldHMSVgoXYWRkaXRpb25hbFNlY3JldE91d + HB1dHMYCiADKAlCHOI/GRIXYWRkaXRpb25hbFNlY3JldE91dHB1dHNSF2FkZGl0aW9uYWxTZWNyZXRPdXRwdXRzEj4KD2FjY2Vwd + FJlc291cmNlcxgMIAEoCEIU4j8REg9hY2NlcHRSZXNvdXJjZXNSD2FjY2VwdFJlc291cmNlcxJEChFwbHVnaW5Eb3dubG9hZFVST + BgNIAEoCUIW4j8TEhFwbHVnaW5Eb3dubG9hZFVSTFIRcGx1Z2luRG93bmxvYWRVUkwScwoPcGx1Z2luQ2hlY2tzdW1zGA8gAygLM + jMucHVsdW1pcnBjLlJlYWRSZXNvdXJjZVJlcXVlc3QuUGx1Z2luQ2hlY2tzdW1zRW50cnlCFOI/ERIPcGx1Z2luQ2hlY2tzdW1zU + g9wbHVnaW5DaGVja3N1bXMSVgoOc291cmNlUG9zaXRpb24YDiABKAsyGS5wdWx1bWlycGMuU291cmNlUG9zaXRpb25CE+I/EBIOc + 291cmNlUG9zaXRpb25SDnNvdXJjZVBvc2l0aW9uGlgKFFBsdWdpbkNoZWNrc3Vtc0VudHJ5EhoKA2tleRgBIAEoCUII4j8FEgNrZ + XlSA2tleRIgCgV2YWx1ZRgCIAEoDEIK4j8HEgV2YWx1ZVIFdmFsdWU6AjgBSgQICxAMUgdhbGlhc2VzInwKFFJlYWRSZXNvdXJjZ + VJlc3BvbnNlEhoKA3VybhgBIAEoCUII4j8FEgN1cm5SA3VybhJICgpwcm9wZXJ0aWVzGAIgASgLMhcuZ29vZ2xlLnByb3RvYnVmL + lN0cnVjdEIP4j8MEgpwcm9wZXJ0aWVzUgpwcm9wZXJ0aWVzIswUChdSZWdpc3RlclJlc291cmNlUmVxdWVzdBIdCgR0eXBlGAEgA + SgJQgniPwYSBHR5cGVSBHR5cGUSHQoEbmFtZRgCIAEoCUIJ4j8GEgRuYW1lUgRuYW1lEiMKBnBhcmVudBgDIAEoCUIL4j8IEgZwY + XJlbnRSBnBhcmVudBIjCgZjdXN0b20YBCABKAhCC+I/CBIGY3VzdG9tUgZjdXN0b20SPAoGb2JqZWN0GAUgASgLMhcuZ29vZ2xlL + nByb3RvYnVmLlN0cnVjdEIL4j8IEgZvYmplY3RSBm9iamVjdBImCgdwcm90ZWN0GAYgASgIQgziPwkSB3Byb3RlY3RSB3Byb3RlY + 3QSNQoMZGVwZW5kZW5jaWVzGAcgAygJQhHiPw4SDGRlcGVuZGVuY2llc1IMZGVwZW5kZW5jaWVzEikKCHByb3ZpZGVyGAggASgJQ + g3iPwoSCHByb3ZpZGVyUghwcm92aWRlchKLAQoUcHJvcGVydHlEZXBlbmRlbmNpZXMYCSADKAsyPC5wdWx1bWlycGMuUmVnaXN0Z + XJSZXNvdXJjZVJlcXVlc3QuUHJvcGVydHlEZXBlbmRlbmNpZXNFbnRyeUIZ4j8WEhRwcm9wZXJ0eURlcGVuZGVuY2llc1IUcHJvc + GVydHlEZXBlbmRlbmNpZXMSSgoTZGVsZXRlQmVmb3JlUmVwbGFjZRgKIAEoCEIY4j8VEhNkZWxldGVCZWZvcmVSZXBsYWNlUhNkZ + WxldGVCZWZvcmVSZXBsYWNlEiYKB3ZlcnNpb24YCyABKAlCDOI/CRIHdmVyc2lvblIHdmVyc2lvbhI4Cg1pZ25vcmVDaGFuZ2VzG + AwgAygJQhLiPw8SDWlnbm9yZUNoYW5nZXNSDWlnbm9yZUNoYW5nZXMSOAoNYWNjZXB0U2VjcmV0cxgNIAEoCEIS4j8PEg1hY2Nlc + HRTZWNyZXRzUg1hY2NlcHRTZWNyZXRzElYKF2FkZGl0aW9uYWxTZWNyZXRPdXRwdXRzGA4gAygJQhziPxkSF2FkZGl0aW9uYWxTZ + WNyZXRPdXRwdXRzUhdhZGRpdGlvbmFsU2VjcmV0T3V0cHV0cxIsCglhbGlhc1VSTnMYDyADKAlCDuI/CxIJYWxpYXNVUk5zUglhb + Glhc1VSTnMSKQoIaW1wb3J0SWQYECABKAlCDeI/ChIIaW1wb3J0SWRSCGltcG9ydElkEm4KDmN1c3RvbVRpbWVvdXRzGBEgASgLM + jEucHVsdW1pcnBjLlJlZ2lzdGVyUmVzb3VyY2VSZXF1ZXN0LkN1c3RvbVRpbWVvdXRzQhPiPxASDmN1c3RvbVRpbWVvdXRzUg5jd + XN0b21UaW1lb3V0cxJfChpkZWxldGVCZWZvcmVSZXBsYWNlRGVmaW5lZBgSIAEoCEIf4j8cEhpkZWxldGVCZWZvcmVSZXBsYWNlR + GVmaW5lZFIaZGVsZXRlQmVmb3JlUmVwbGFjZURlZmluZWQSUAoVc3VwcG9ydHNQYXJ0aWFsVmFsdWVzGBMgASgIQhriPxcSFXN1c + HBvcnRzUGFydGlhbFZhbHVlc1IVc3VwcG9ydHNQYXJ0aWFsVmFsdWVzEiMKBnJlbW90ZRgUIAEoCEIL4j8IEgZyZW1vdGVSBnJlb + W90ZRI+Cg9hY2NlcHRSZXNvdXJjZXMYFSABKAhCFOI/ERIPYWNjZXB0UmVzb3VyY2VzUg9hY2NlcHRSZXNvdXJjZXMSXwoJcHJvd + mlkZXJzGBYgAygLMjEucHVsdW1pcnBjLlJlZ2lzdGVyUmVzb3VyY2VSZXF1ZXN0LlByb3ZpZGVyc0VudHJ5Qg7iPwsSCXByb3ZpZ + GVyc1IJcHJvdmlkZXJzEkEKEHJlcGxhY2VPbkNoYW5nZXMYFyADKAlCFeI/EhIQcmVwbGFjZU9uQ2hhbmdlc1IQcmVwbGFjZU9uQ + 2hhbmdlcxJEChFwbHVnaW5Eb3dubG9hZFVSTBgYIAEoCUIW4j8TEhFwbHVnaW5Eb3dubG9hZFVSTFIRcGx1Z2luRG93bmxvYWRVU + kwSdwoPcGx1Z2luQ2hlY2tzdW1zGB4gAygLMjcucHVsdW1pcnBjLlJlZ2lzdGVyUmVzb3VyY2VSZXF1ZXN0LlBsdWdpbkNoZWNrc + 3Vtc0VudHJ5QhTiPxESD3BsdWdpbkNoZWNrc3Vtc1IPcGx1Z2luQ2hlY2tzdW1zEjsKDnJldGFpbk9uRGVsZXRlGBkgASgIQhPiP + xASDnJldGFpbk9uRGVsZXRlUg5yZXRhaW5PbkRlbGV0ZRI4CgdhbGlhc2VzGBogAygLMhAucHVsdW1pcnBjLkFsaWFzQgziPwkSB + 2FsaWFzZXNSB2FsaWFzZXMSMgoLZGVsZXRlZFdpdGgYGyABKAlCEOI/DRILZGVsZXRlZFdpdGhSC2RlbGV0ZWRXaXRoEi8KCmFsa + WFzU3BlY3MYHCABKAhCD+I/DBIKYWxpYXNTcGVjc1IKYWxpYXNTcGVjcxJWCg5zb3VyY2VQb3NpdGlvbhgdIAEoCzIZLnB1bHVta + XJwYy5Tb3VyY2VQb3NpdGlvbkIT4j8QEg5zb3VyY2VQb3NpdGlvblIOc291cmNlUG9zaXRpb24SRAoKdHJhbnNmb3JtcxgfIAMoC + zITLnB1bHVtaXJwYy5DYWxsYmFja0IP4j8MEgp0cmFuc2Zvcm1zUgp0cmFuc2Zvcm1zElYKF3N1cHBvcnRzUmVzdWx0UmVwb3J0a + W5nGCAgASgIQhziPxkSF3N1cHBvcnRzUmVzdWx0UmVwb3J0aW5nUhdzdXBwb3J0c1Jlc3VsdFJlcG9ydGluZxo1ChRQcm9wZXJ0e + URlcGVuZGVuY2llcxIdCgR1cm5zGAEgAygJQgniPwYSBHVybnNSBHVybnMafwoOQ3VzdG9tVGltZW91dHMSIwoGY3JlYXRlGAEgA + SgJQgviPwgSBmNyZWF0ZVIGY3JlYXRlEiMKBnVwZGF0ZRgCIAEoCUIL4j8IEgZ1cGRhdGVSBnVwZGF0ZRIjCgZkZWxldGUYAyABK + AlCC+I/CBIGZGVsZXRlUgZkZWxldGUalgEKGVByb3BlcnR5RGVwZW5kZW5jaWVzRW50cnkSGgoDa2V5GAEgASgJQgjiPwUSA2tle + VIDa2V5ElkKBXZhbHVlGAIgASgLMjcucHVsdW1pcnBjLlJlZ2lzdGVyUmVzb3VyY2VSZXF1ZXN0LlByb3BlcnR5RGVwZW5kZW5ja + WVzQgriPwcSBXZhbHVlUgV2YWx1ZToCOAEaUgoOUHJvdmlkZXJzRW50cnkSGgoDa2V5GAEgASgJQgjiPwUSA2tleVIDa2V5EiAKB + XZhbHVlGAIgASgJQgriPwcSBXZhbHVlUgV2YWx1ZToCOAEaWAoUUGx1Z2luQ2hlY2tzdW1zRW50cnkSGgoDa2V5GAEgASgJQgjiP + wUSA2tleVIDa2V5EiAKBXZhbHVlGAIgASgMQgriPwcSBXZhbHVlUgV2YWx1ZToCOAEi8gQKGFJlZ2lzdGVyUmVzb3VyY2VSZXNwb + 25zZRIaCgN1cm4YASABKAlCCOI/BRIDdXJuUgN1cm4SFwoCaWQYAiABKAlCB+I/BBICaWRSAmlkEjwKBm9iamVjdBgDIAEoCzIXL + mdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RCC+I/CBIGb2JqZWN0UgZvYmplY3QSIwoGc3RhYmxlGAQgASgIQgviPwgSBnN0YWJsZVIGc + 3RhYmxlEiYKB3N0YWJsZXMYBSADKAlCDOI/CRIHc3RhYmxlc1IHc3RhYmxlcxKMAQoUcHJvcGVydHlEZXBlbmRlbmNpZXMYBiADK + AsyPS5wdWx1bWlycGMuUmVnaXN0ZXJSZXNvdXJjZVJlc3BvbnNlLlByb3BlcnR5RGVwZW5kZW5jaWVzRW50cnlCGeI/FhIUcHJvc + GVydHlEZXBlbmRlbmNpZXNSFHByb3BlcnR5RGVwZW5kZW5jaWVzEjYKBnJlc3VsdBgHIAEoDjIRLnB1bHVtaXJwYy5SZXN1bHRCC + +I/CBIGcmVzdWx0UgZyZXN1bHQaNQoUUHJvcGVydHlEZXBlbmRlbmNpZXMSHQoEdXJucxgBIAMoCUIJ4j8GEgR1cm5zUgR1cm5zG + pcBChlQcm9wZXJ0eURlcGVuZGVuY2llc0VudHJ5EhoKA2tleRgBIAEoCUII4j8FEgNrZXlSA2tleRJaCgV2YWx1ZRgCIAEoCzI4L + nB1bHVtaXJwYy5SZWdpc3RlclJlc291cmNlUmVzcG9uc2UuUHJvcGVydHlEZXBlbmRlbmNpZXNCCuI/BxIFdmFsdWVSBXZhbHVlO + gI4ASJ9Ch5SZWdpc3RlclJlc291cmNlT3V0cHV0c1JlcXVlc3QSGgoDdXJuGAEgASgJQgjiPwUSA3VyblIDdXJuEj8KB291dHB1d + HMYAiABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0QgziPwkSB291dHB1dHNSB291dHB1dHMi7QQKFVJlc291cmNlSW52b2tlU + mVxdWVzdBIaCgN0b2sYASABKAlCCOI/BRIDdG9rUgN0b2sSNgoEYXJncxgCIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RCC + eI/BhIEYXJnc1IEYXJncxIpCghwcm92aWRlchgDIAEoCUIN4j8KEghwcm92aWRlclIIcHJvdmlkZXISJgoHdmVyc2lvbhgEIAEoC + UIM4j8JEgd2ZXJzaW9uUgd2ZXJzaW9uEj4KD2FjY2VwdFJlc291cmNlcxgFIAEoCEIU4j8REg9hY2NlcHRSZXNvdXJjZXNSD2FjY + 2VwdFJlc291cmNlcxJEChFwbHVnaW5Eb3dubG9hZFVSTBgGIAEoCUIW4j8TEhFwbHVnaW5Eb3dubG9hZFVSTFIRcGx1Z2luRG93b + mxvYWRVUkwSdQoPcGx1Z2luQ2hlY2tzdW1zGAggAygLMjUucHVsdW1pcnBjLlJlc291cmNlSW52b2tlUmVxdWVzdC5QbHVnaW5Da + GVja3N1bXNFbnRyeUIU4j8REg9wbHVnaW5DaGVja3N1bXNSD3BsdWdpbkNoZWNrc3VtcxJWCg5zb3VyY2VQb3NpdGlvbhgHIAEoC + zIZLnB1bHVtaXJwYy5Tb3VyY2VQb3NpdGlvbkIT4j8QEg5zb3VyY2VQb3NpdGlvblIOc291cmNlUG9zaXRpb24aWAoUUGx1Z2luQ + 2hlY2tzdW1zRW50cnkSGgoDa2V5GAEgASgJQgjiPwUSA2tleVIDa2V5EiAKBXZhbHVlGAIgASgMQgriPwcSBXZhbHVlUgV2YWx1Z + ToCOAEi8AcKE1Jlc291cmNlQ2FsbFJlcXVlc3QSGgoDdG9rGAEgASgJQgjiPwUSA3Rva1IDdG9rEjYKBGFyZ3MYAiABKAsyFy5nb + 29nbGUucHJvdG9idWYuU3RydWN0QgniPwYSBGFyZ3NSBGFyZ3MScwoPYXJnRGVwZW5kZW5jaWVzGAMgAygLMjMucHVsdW1pcnBjL + lJlc291cmNlQ2FsbFJlcXVlc3QuQXJnRGVwZW5kZW5jaWVzRW50cnlCFOI/ERIPYXJnRGVwZW5kZW5jaWVzUg9hcmdEZXBlbmRlb + mNpZXMSKQoIcHJvdmlkZXIYBCABKAlCDeI/ChIIcHJvdmlkZXJSCHByb3ZpZGVyEiYKB3ZlcnNpb24YBSABKAlCDOI/CRIHdmVyc + 2lvblIHdmVyc2lvbhJEChFwbHVnaW5Eb3dubG9hZFVSTBgNIAEoCUIW4j8TEhFwbHVnaW5Eb3dubG9hZFVSTFIRcGx1Z2luRG93b + mxvYWRVUkwScwoPcGx1Z2luQ2hlY2tzdW1zGBAgAygLMjMucHVsdW1pcnBjLlJlc291cmNlQ2FsbFJlcXVlc3QuUGx1Z2luQ2hlY + 2tzdW1zRW50cnlCFOI/ERIPcGx1Z2luQ2hlY2tzdW1zUg9wbHVnaW5DaGVja3N1bXMSVgoOc291cmNlUG9zaXRpb24YDyABKAsyG + S5wdWx1bWlycGMuU291cmNlUG9zaXRpb25CE+I/EBIOc291cmNlUG9zaXRpb25SDnNvdXJjZVBvc2l0aW9uGjUKFEFyZ3VtZW50R + GVwZW5kZW5jaWVzEh0KBHVybnMYASADKAlCCeI/BhIEdXJuc1IEdXJucxqNAQoUQXJnRGVwZW5kZW5jaWVzRW50cnkSGgoDa2V5G + AEgASgJQgjiPwUSA2tleVIDa2V5ElUKBXZhbHVlGAIgASgLMjMucHVsdW1pcnBjLlJlc291cmNlQ2FsbFJlcXVlc3QuQXJndW1lb + nREZXBlbmRlbmNpZXNCCuI/BxIFdmFsdWVSBXZhbHVlOgI4ARpYChRQbHVnaW5DaGVja3N1bXNFbnRyeRIaCgNrZXkYASABKAlCC + OI/BRIDa2V5UgNrZXkSIAoFdmFsdWUYAiABKAxCCuI/BxIFdmFsdWVSBXZhbHVlOgI4AUoECAYQB0oECAcQCEoECAgQCUoECAkQC + koECAoQC0oECAsQDEoECAwQDUoECA4QD1IHcHJvamVjdFIFc3RhY2tSBmNvbmZpZ1IQY29uZmlnU2VjcmV0S2V5c1IGZHJ5UnVuU + ghwYXJhbGxlbFIPbW9uaXRvckVuZHBvaW50Ugxvcmdhbml6YXRpb24i/QkKGFRyYW5zZm9ybVJlc291cmNlT3B0aW9ucxItCgpkZ + XBlbmRzX29uGAEgAygJQg7iPwsSCWRlcGVuZHNPblIJZGVwZW5kc09uEiYKB3Byb3RlY3QYAiABKAhCDOI/CRIHcHJvdGVjdFIHc + HJvdGVjdBI5Cg5pZ25vcmVfY2hhbmdlcxgDIAMoCUIS4j8PEg1pZ25vcmVDaGFuZ2VzUg1pZ25vcmVDaGFuZ2VzEkMKEnJlcGxhY + 2Vfb25fY2hhbmdlcxgEIAMoCUIV4j8SEhByZXBsYWNlT25DaGFuZ2VzUhByZXBsYWNlT25DaGFuZ2VzEiYKB3ZlcnNpb24YBSABK + AlCDOI/CRIHdmVyc2lvblIHdmVyc2lvbhI4CgdhbGlhc2VzGAYgAygLMhAucHVsdW1pcnBjLkFsaWFzQgziPwkSB2FsaWFzZXNSB + 2FsaWFzZXMSKQoIcHJvdmlkZXIYByABKAlCDeI/ChIIcHJvdmlkZXJSCHByb3ZpZGVyEm8KD2N1c3RvbV90aW1lb3V0cxgIIAEoC + zIxLnB1bHVtaXJwYy5SZWdpc3RlclJlc291cmNlUmVxdWVzdC5DdXN0b21UaW1lb3V0c0IT4j8QEg5jdXN0b21UaW1lb3V0c1IOY + 3VzdG9tVGltZW91dHMSRgoTcGx1Z2luX2Rvd25sb2FkX3VybBgJIAEoCUIW4j8TEhFwbHVnaW5Eb3dubG9hZFVybFIRcGx1Z2luR + G93bmxvYWRVcmwSPQoQcmV0YWluX29uX2RlbGV0ZRgKIAEoCEIT4j8QEg5yZXRhaW5PbkRlbGV0ZVIOcmV0YWluT25EZWxldGUSM + woMZGVsZXRlZF93aXRoGAsgASgJQhDiPw0SC2RlbGV0ZWRXaXRoUgtkZWxldGVkV2l0aBJRChVkZWxldGVfYmVmb3JlX3JlcGxhY + 2UYDCABKAhCGOI/FRITZGVsZXRlQmVmb3JlUmVwbGFjZUgAUhNkZWxldGVCZWZvcmVSZXBsYWNliAEBElgKGWFkZGl0aW9uYWxfc + 2VjcmV0X291dHB1dHMYDSADKAlCHOI/GRIXYWRkaXRpb25hbFNlY3JldE91dHB1dHNSF2FkZGl0aW9uYWxTZWNyZXRPdXRwdXRzE + mAKCXByb3ZpZGVycxgOIAMoCzIyLnB1bHVtaXJwYy5UcmFuc2Zvcm1SZXNvdXJjZU9wdGlvbnMuUHJvdmlkZXJzRW50cnlCDuI/C + xIJcHJvdmlkZXJzUglwcm92aWRlcnMSeQoQcGx1Z2luX2NoZWNrc3VtcxgPIAMoCzI4LnB1bHVtaXJwYy5UcmFuc2Zvcm1SZXNvd + XJjZU9wdGlvbnMuUGx1Z2luQ2hlY2tzdW1zRW50cnlCFOI/ERIPcGx1Z2luQ2hlY2tzdW1zUg9wbHVnaW5DaGVja3N1bXMaUgoOU + HJvdmlkZXJzRW50cnkSGgoDa2V5GAEgASgJQgjiPwUSA2tleVIDa2V5EiAKBXZhbHVlGAIgASgJQgriPwcSBXZhbHVlUgV2YWx1Z + ToCOAEaWAoUUGx1Z2luQ2hlY2tzdW1zRW50cnkSGgoDa2V5GAEgASgJQgjiPwUSA2tleVIDa2V5EiAKBXZhbHVlGAIgASgMQgriP + wcSBXZhbHVlUgV2YWx1ZToCOAFCGAoWX2RlbGV0ZV9iZWZvcmVfcmVwbGFjZSKxAgoQVHJhbnNmb3JtUmVxdWVzdBIdCgR0eXBlG + AEgASgJQgniPwYSBHR5cGVSBHR5cGUSHQoEbmFtZRgCIAEoCUIJ4j8GEgRuYW1lUgRuYW1lEiMKBmN1c3RvbRgDIAEoCEIL4j8IE + gZjdXN0b21SBmN1c3RvbRIjCgZwYXJlbnQYBCABKAlCC+I/CBIGcGFyZW50UgZwYXJlbnQSSAoKcHJvcGVydGllcxgFIAEoCzIXL + mdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RCD+I/DBIKcHJvcGVydGllc1IKcHJvcGVydGllcxJLCgdvcHRpb25zGAYgASgLMiMucHVsd + W1pcnBjLlRyYW5zZm9ybVJlc291cmNlT3B0aW9uc0IM4j8JEgdvcHRpb25zUgdvcHRpb25zIqoBChFUcmFuc2Zvcm1SZXNwb25zZ + RJICgpwcm9wZXJ0aWVzGAEgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdEIP4j8MEgpwcm9wZXJ0aWVzUgpwcm9wZXJ0aWVzE + ksKB29wdGlvbnMYAiABKAsyIy5wdWx1bWlycGMuVHJhbnNmb3JtUmVzb3VyY2VPcHRpb25zQgziPwkSB29wdGlvbnNSB29wdGlvb + nMqTQoGUmVzdWx0EhkKB1NVQ0NFU1MQABoM4j8JEgdTVUNDRVNTEhMKBEZBSUwQARoJ4j8GEgRGQUlMEhMKBFNLSVAQAhoJ4j8GE + gRTS0lQMqUFCg9SZXNvdXJjZU1vbml0b3ISWgoPU3VwcG9ydHNGZWF0dXJlEiEucHVsdW1pcnBjLlN1cHBvcnRzRmVhdHVyZVJlc + XVlc3QaIi5wdWx1bWlycGMuU3VwcG9ydHNGZWF0dXJlUmVzcG9uc2UiABJHCgZJbnZva2USIC5wdWx1bWlycGMuUmVzb3VyY2VJb + nZva2VSZXF1ZXN0GhkucHVsdW1pcnBjLkludm9rZVJlc3BvbnNlIgASTwoMU3RyZWFtSW52b2tlEiAucHVsdW1pcnBjLlJlc291c + mNlSW52b2tlUmVxdWVzdBoZLnB1bHVtaXJwYy5JbnZva2VSZXNwb25zZSIAMAESQQoEQ2FsbBIeLnB1bHVtaXJwYy5SZXNvdXJjZ + UNhbGxSZXF1ZXN0GhcucHVsdW1pcnBjLkNhbGxSZXNwb25zZSIAElEKDFJlYWRSZXNvdXJjZRIeLnB1bHVtaXJwYy5SZWFkUmVzb + 3VyY2VSZXF1ZXN0Gh8ucHVsdW1pcnBjLlJlYWRSZXNvdXJjZVJlc3BvbnNlIgASXQoQUmVnaXN0ZXJSZXNvdXJjZRIiLnB1bHVta + XJwYy5SZWdpc3RlclJlc291cmNlUmVxdWVzdBojLnB1bHVtaXJwYy5SZWdpc3RlclJlc291cmNlUmVzcG9uc2UiABJeChdSZWdpc + 3RlclJlc291cmNlT3V0cHV0cxIpLnB1bHVtaXJwYy5SZWdpc3RlclJlc291cmNlT3V0cHV0c1JlcXVlc3QaFi5nb29nbGUucHJvd + G9idWYuRW1wdHkiABJHChZSZWdpc3RlclN0YWNrVHJhbnNmb3JtEhMucHVsdW1pcnBjLkNhbGxiYWNrGhYuZ29vZ2xlLnByb3RvY + nVmLkVtcHR5IgBCNFoyZ2l0aHViLmNvbS9wdWx1bWkvcHVsdW1pL3Nkay92My9wcm90by9nbztwdWx1bWlycGNiBnByb3RvMw==""" + ).mkString) + lazy val scalaDescriptor: _root_.scalapb.descriptors.FileDescriptor = { + val scalaProto = com.google.protobuf.descriptor.FileDescriptorProto.parseFrom(ProtoBytes) + _root_.scalapb.descriptors.FileDescriptor.buildFrom(scalaProto, dependencies.map(_.scalaDescriptor)) + } + lazy val javaDescriptor: com.google.protobuf.Descriptors.FileDescriptor = { + val javaProto = com.google.protobuf.DescriptorProtos.FileDescriptorProto.parseFrom(ProtoBytes) + com.google.protobuf.Descriptors.FileDescriptor.buildFrom(javaProto, _root_.scala.Array( + com.google.protobuf.empty.EmptyProto.javaDescriptor, + com.google.protobuf.struct.StructProto.javaDescriptor, + pulumirpc.provider.ProviderProto.javaDescriptor, + pulumirpc.alias.AliasProto.javaDescriptor, + pulumirpc.source.SourceProto.javaDescriptor, + pulumirpc.callback.CallbackProto.javaDescriptor + )) + } + @deprecated("Use javaDescriptor instead. In a future version this will refer to scalaDescriptor.", "ScalaPB 0.5.47") + def descriptor: com.google.protobuf.Descriptors.FileDescriptor = javaDescriptor +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/Result.scala b/besom-rpc/src/main/scala/pulumirpc/resource/Result.scala new file mode 100644 index 00000000..027846a2 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/Result.scala @@ -0,0 +1,54 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +sealed abstract class Result(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum { + type EnumType = pulumirpc.resource.Result + type RecognizedType = pulumirpc.resource.Result.Recognized + def isSuccess: _root_.scala.Boolean = false + def isFail: _root_.scala.Boolean = false + def isSkip: _root_.scala.Boolean = false + def companion: _root_.scalapb.GeneratedEnumCompanion[Result] = pulumirpc.resource.Result + final def asRecognized: _root_.scala.Option[pulumirpc.resource.Result.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[pulumirpc.resource.Result.Recognized]) +} + +object Result extends _root_.scalapb.GeneratedEnumCompanion[Result] { + sealed trait Recognized extends Result + implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[Result] = this + + @SerialVersionUID(0L) + case object SUCCESS extends Result(0) with Result.Recognized { + val index = 0 + val name = "SUCCESS" + override def isSuccess: _root_.scala.Boolean = true + } + + @SerialVersionUID(0L) + case object FAIL extends Result(1) with Result.Recognized { + val index = 1 + val name = "FAIL" + override def isFail: _root_.scala.Boolean = true + } + + @SerialVersionUID(0L) + case object SKIP extends Result(2) with Result.Recognized { + val index = 2 + val name = "SKIP" + override def isSkip: _root_.scala.Boolean = true + } + + @SerialVersionUID(0L) + final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Result(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum + lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(SUCCESS, FAIL, SKIP) + def fromValue(__value: _root_.scala.Int): Result = __value match { + case 0 => SUCCESS + case 1 => FAIL + case 2 => SKIP + case __other => Unrecognized(__other) + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = ResourceProto.javaDescriptor.getEnumTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = ResourceProto.scalaDescriptor.enums(0) +} \ No newline at end of file diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/SupportsFeatureRequest.scala b/besom-rpc/src/main/scala/pulumirpc/resource/SupportsFeatureRequest.scala new file mode 100644 index 00000000..fd55b56b --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/SupportsFeatureRequest.scala @@ -0,0 +1,123 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +/** SupportsFeatureRequest allows a client to test if the resource monitor supports a certain feature, which it may use + * to control the format or types of messages it sends. + * + * @param id + * the ID of the feature to test support for. + */ +@SerialVersionUID(0L) +final case class SupportsFeatureRequest( + id: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[SupportsFeatureRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = id + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = id + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withId(__v: _root_.scala.Predef.String): SupportsFeatureRequest = copy(id = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = id + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(id) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.SupportsFeatureRequest.type = pulumirpc.resource.SupportsFeatureRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.SupportsFeatureRequest]) +} + +object SupportsFeatureRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.SupportsFeatureRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.SupportsFeatureRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.SupportsFeatureRequest = { + var __id: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __id = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.SupportsFeatureRequest( + id = __id, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.SupportsFeatureRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.SupportsFeatureRequest( + id = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ResourceProto.javaDescriptor.getMessageTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ResourceProto.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) + lazy val defaultInstance = pulumirpc.resource.SupportsFeatureRequest( + id = "" + ) + implicit class SupportsFeatureRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.SupportsFeatureRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.SupportsFeatureRequest](_l) { + def id: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.id)((c_, f_) => c_.copy(id = f_)) + } + final val ID_FIELD_NUMBER = 1 + def of( + id: _root_.scala.Predef.String + ): _root_.pulumirpc.resource.SupportsFeatureRequest = _root_.pulumirpc.resource.SupportsFeatureRequest( + id + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.SupportsFeatureRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/SupportsFeatureResponse.scala b/besom-rpc/src/main/scala/pulumirpc/resource/SupportsFeatureResponse.scala new file mode 100644 index 00000000..adfd8855 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/SupportsFeatureResponse.scala @@ -0,0 +1,120 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +/** @param hasSupport + * true when the resource monitor supports this feature. + */ +@SerialVersionUID(0L) +final case class SupportsFeatureResponse( + hasSupport: _root_.scala.Boolean = false, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[SupportsFeatureResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = hasSupport + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(1, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = hasSupport + if (__v != false) { + _output__.writeBool(1, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withHasSupport(__v: _root_.scala.Boolean): SupportsFeatureResponse = copy(hasSupport = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = hasSupport + if (__t != false) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PBoolean(hasSupport) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.SupportsFeatureResponse.type = pulumirpc.resource.SupportsFeatureResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.SupportsFeatureResponse]) +} + +object SupportsFeatureResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.SupportsFeatureResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.SupportsFeatureResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.SupportsFeatureResponse = { + var __hasSupport: _root_.scala.Boolean = false + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 8 => + __hasSupport = _input__.readBool() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.SupportsFeatureResponse( + hasSupport = __hasSupport, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.SupportsFeatureResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.SupportsFeatureResponse( + hasSupport = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Boolean]).getOrElse(false) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ResourceProto.javaDescriptor.getMessageTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ResourceProto.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) + lazy val defaultInstance = pulumirpc.resource.SupportsFeatureResponse( + hasSupport = false + ) + implicit class SupportsFeatureResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.SupportsFeatureResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.SupportsFeatureResponse](_l) { + def hasSupport: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.hasSupport)((c_, f_) => c_.copy(hasSupport = f_)) + } + final val HASSUPPORT_FIELD_NUMBER = 1 + def of( + hasSupport: _root_.scala.Boolean + ): _root_.pulumirpc.resource.SupportsFeatureResponse = _root_.pulumirpc.resource.SupportsFeatureResponse( + hasSupport + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.SupportsFeatureResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/TransformRequest.scala b/besom-rpc/src/main/scala/pulumirpc/resource/TransformRequest.scala new file mode 100644 index 00000000..d2b2b3ba --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/TransformRequest.scala @@ -0,0 +1,281 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +/** @param type + * the type of the resource. + * @param name + * the name of the resource. + * @param custom + * true if the resource is a custom resource, else it's a component resource. + * @param parent + * the parent of the resource, this can't be changed by the transform. + * @param properties + * the input properties of the resource. + * @param options + * the options for the resource. + */ +@SerialVersionUID(0L) +final case class TransformRequest( + `type`: _root_.scala.Predef.String = "", + name: _root_.scala.Predef.String = "", + custom: _root_.scala.Boolean = false, + parent: _root_.scala.Predef.String = "", + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + options: _root_.scala.Option[pulumirpc.resource.TransformResourceOptions] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[TransformRequest] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = `type` + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = name + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + + { + val __value = custom + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(3, __value) + } + }; + + { + val __value = parent + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value) + } + }; + if (properties.isDefined) { + val __value = properties.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + if (options.isDefined) { + val __value = options.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = `type` + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = name + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + { + val __v = custom + if (__v != false) { + _output__.writeBool(3, __v) + } + }; + { + val __v = parent + if (!__v.isEmpty) { + _output__.writeString(4, __v) + } + }; + properties.foreach { __v => + val __m = __v + _output__.writeTag(5, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + options.foreach { __v => + val __m = __v + _output__.writeTag(6, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def withType(__v: _root_.scala.Predef.String): TransformRequest = copy(`type` = __v) + def withName(__v: _root_.scala.Predef.String): TransformRequest = copy(name = __v) + def withCustom(__v: _root_.scala.Boolean): TransformRequest = copy(custom = __v) + def withParent(__v: _root_.scala.Predef.String): TransformRequest = copy(parent = __v) + def getProperties: com.google.protobuf.struct.Struct = properties.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearProperties: TransformRequest = copy(properties = _root_.scala.None) + def withProperties(__v: com.google.protobuf.struct.Struct): TransformRequest = copy(properties = Option(__v)) + def getOptions: pulumirpc.resource.TransformResourceOptions = options.getOrElse(pulumirpc.resource.TransformResourceOptions.defaultInstance) + def clearOptions: TransformRequest = copy(options = _root_.scala.None) + def withOptions(__v: pulumirpc.resource.TransformResourceOptions): TransformRequest = copy(options = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = `type` + if (__t != "") __t else null + } + case 2 => { + val __t = name + if (__t != "") __t else null + } + case 3 => { + val __t = custom + if (__t != false) __t else null + } + case 4 => { + val __t = parent + if (__t != "") __t else null + } + case 5 => properties.orNull + case 6 => options.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(`type`) + case 2 => _root_.scalapb.descriptors.PString(name) + case 3 => _root_.scalapb.descriptors.PBoolean(custom) + case 4 => _root_.scalapb.descriptors.PString(parent) + case 5 => properties.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 6 => options.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.TransformRequest.type = pulumirpc.resource.TransformRequest + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.TransformRequest]) +} + +object TransformRequest extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.TransformRequest] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.TransformRequest] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.TransformRequest = { + var __type: _root_.scala.Predef.String = "" + var __name: _root_.scala.Predef.String = "" + var __custom: _root_.scala.Boolean = false + var __parent: _root_.scala.Predef.String = "" + var __properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __options: _root_.scala.Option[pulumirpc.resource.TransformResourceOptions] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __type = _input__.readStringRequireUtf8() + case 18 => + __name = _input__.readStringRequireUtf8() + case 24 => + __custom = _input__.readBool() + case 34 => + __parent = _input__.readStringRequireUtf8() + case 42 => + __properties = _root_.scala.Option(__properties.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 50 => + __options = _root_.scala.Option(__options.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.TransformResourceOptions](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.TransformRequest( + `type` = __type, + name = __name, + custom = __custom, + parent = __parent, + properties = __properties, + options = __options, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.TransformRequest] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.TransformRequest( + `type` = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + custom = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + parent = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + properties = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + options = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[pulumirpc.resource.TransformResourceOptions]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ResourceProto.javaDescriptor.getMessageTypes().get(10) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ResourceProto.scalaDescriptor.messages(10) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 5 => __out = com.google.protobuf.struct.Struct + case 6 => __out = pulumirpc.resource.TransformResourceOptions + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.resource.TransformRequest( + `type` = "", + name = "", + custom = false, + parent = "", + properties = _root_.scala.None, + options = _root_.scala.None + ) + implicit class TransformRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.TransformRequest]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.TransformRequest](_l) { + def `type`: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.`type`)((c_, f_) => c_.copy(`type` = f_)) + def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_)) + def custom: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.custom)((c_, f_) => c_.copy(custom = f_)) + def parent: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.parent)((c_, f_) => c_.copy(parent = f_)) + def properties: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getProperties)((c_, f_) => c_.copy(properties = _root_.scala.Option(f_))) + def optionalProperties: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.properties)((c_, f_) => c_.copy(properties = f_)) + def options: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.TransformResourceOptions] = field(_.getOptions)((c_, f_) => c_.copy(options = _root_.scala.Option(f_))) + def optionalOptions: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.resource.TransformResourceOptions]] = field(_.options)((c_, f_) => c_.copy(options = f_)) + } + final val TYPE_FIELD_NUMBER = 1 + final val NAME_FIELD_NUMBER = 2 + final val CUSTOM_FIELD_NUMBER = 3 + final val PARENT_FIELD_NUMBER = 4 + final val PROPERTIES_FIELD_NUMBER = 5 + final val OPTIONS_FIELD_NUMBER = 6 + def of( + `type`: _root_.scala.Predef.String, + name: _root_.scala.Predef.String, + custom: _root_.scala.Boolean, + parent: _root_.scala.Predef.String, + properties: _root_.scala.Option[com.google.protobuf.struct.Struct], + options: _root_.scala.Option[pulumirpc.resource.TransformResourceOptions] + ): _root_.pulumirpc.resource.TransformRequest = _root_.pulumirpc.resource.TransformRequest( + `type`, + name, + custom, + parent, + properties, + options + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.TransformRequest]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/TransformResourceOptions.scala b/besom-rpc/src/main/scala/pulumirpc/resource/TransformResourceOptions.scala new file mode 100644 index 00000000..d07ec9c2 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/TransformResourceOptions.scala @@ -0,0 +1,807 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +/** TransformResourceOptions is a subset of all resource options that are relevant to transforms. + */ +@SerialVersionUID(0L) +final case class TransformResourceOptions( + dependsOn: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + protect: _root_.scala.Boolean = false, + ignoreChanges: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + replaceOnChanges: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + version: _root_.scala.Predef.String = "", + aliases: _root_.scala.Seq[pulumirpc.alias.Alias] = _root_.scala.Seq.empty, + provider: _root_.scala.Predef.String = "", + customTimeouts: _root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts] = _root_.scala.None, + pluginDownloadUrl: _root_.scala.Predef.String = "", + retainOnDelete: _root_.scala.Boolean = false, + deletedWith: _root_.scala.Predef.String = "", + deleteBeforeReplace: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None, + additionalSecretOutputs: _root_.scala.Seq[_root_.scala.Predef.String] = _root_.scala.Seq.empty, + providers: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String] = _root_.scala.collection.immutable.Map.empty, + pluginChecksums: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] = _root_.scala.collection.immutable.Map.empty, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[TransformResourceOptions] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + dependsOn.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + + { + val __value = protect + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(2, __value) + } + }; + ignoreChanges.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value) + } + replaceOnChanges.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value) + } + + { + val __value = version + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(5, __value) + } + }; + aliases.foreach { __item => + val __value = __item + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + + { + val __value = provider + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(7, __value) + } + }; + if (customTimeouts.isDefined) { + val __value = customTimeouts.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + + { + val __value = pluginDownloadUrl + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(9, __value) + } + }; + + { + val __value = retainOnDelete + if (__value != false) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(10, __value) + } + }; + + { + val __value = deletedWith + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(11, __value) + } + }; + if (deleteBeforeReplace.isDefined) { + val __value = deleteBeforeReplace.get + __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(12, __value) + }; + additionalSecretOutputs.foreach { __item => + val __value = __item + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(13, __value) + } + providers.foreach { __item => + val __value = pulumirpc.resource.TransformResourceOptions._typemapper_providers.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + pluginChecksums.foreach { __item => + val __value = pulumirpc.resource.TransformResourceOptions._typemapper_pluginChecksums.toBase(__item) + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + } + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + dependsOn.foreach { __v => + val __m = __v + _output__.writeString(1, __m) + }; + { + val __v = protect + if (__v != false) { + _output__.writeBool(2, __v) + } + }; + ignoreChanges.foreach { __v => + val __m = __v + _output__.writeString(3, __m) + }; + replaceOnChanges.foreach { __v => + val __m = __v + _output__.writeString(4, __m) + }; + { + val __v = version + if (!__v.isEmpty) { + _output__.writeString(5, __v) + } + }; + aliases.foreach { __v => + val __m = __v + _output__.writeTag(6, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = provider + if (!__v.isEmpty) { + _output__.writeString(7, __v) + } + }; + customTimeouts.foreach { __v => + val __m = __v + _output__.writeTag(8, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + { + val __v = pluginDownloadUrl + if (!__v.isEmpty) { + _output__.writeString(9, __v) + } + }; + { + val __v = retainOnDelete + if (__v != false) { + _output__.writeBool(10, __v) + } + }; + { + val __v = deletedWith + if (!__v.isEmpty) { + _output__.writeString(11, __v) + } + }; + deleteBeforeReplace.foreach { __v => + val __m = __v + _output__.writeBool(12, __m) + }; + additionalSecretOutputs.foreach { __v => + val __m = __v + _output__.writeString(13, __m) + }; + providers.foreach { __v => + val __m = pulumirpc.resource.TransformResourceOptions._typemapper_providers.toBase(__v) + _output__.writeTag(14, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + pluginChecksums.foreach { __v => + val __m = pulumirpc.resource.TransformResourceOptions._typemapper_pluginChecksums.toBase(__v) + _output__.writeTag(15, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def clearDependsOn = copy(dependsOn = _root_.scala.Seq.empty) + def addDependsOn(__vs: _root_.scala.Predef.String *): TransformResourceOptions = addAllDependsOn(__vs) + def addAllDependsOn(__vs: Iterable[_root_.scala.Predef.String]): TransformResourceOptions = copy(dependsOn = dependsOn ++ __vs) + def withDependsOn(__v: _root_.scala.Seq[_root_.scala.Predef.String]): TransformResourceOptions = copy(dependsOn = __v) + def withProtect(__v: _root_.scala.Boolean): TransformResourceOptions = copy(protect = __v) + def clearIgnoreChanges = copy(ignoreChanges = _root_.scala.Seq.empty) + def addIgnoreChanges(__vs: _root_.scala.Predef.String *): TransformResourceOptions = addAllIgnoreChanges(__vs) + def addAllIgnoreChanges(__vs: Iterable[_root_.scala.Predef.String]): TransformResourceOptions = copy(ignoreChanges = ignoreChanges ++ __vs) + def withIgnoreChanges(__v: _root_.scala.Seq[_root_.scala.Predef.String]): TransformResourceOptions = copy(ignoreChanges = __v) + def clearReplaceOnChanges = copy(replaceOnChanges = _root_.scala.Seq.empty) + def addReplaceOnChanges(__vs: _root_.scala.Predef.String *): TransformResourceOptions = addAllReplaceOnChanges(__vs) + def addAllReplaceOnChanges(__vs: Iterable[_root_.scala.Predef.String]): TransformResourceOptions = copy(replaceOnChanges = replaceOnChanges ++ __vs) + def withReplaceOnChanges(__v: _root_.scala.Seq[_root_.scala.Predef.String]): TransformResourceOptions = copy(replaceOnChanges = __v) + def withVersion(__v: _root_.scala.Predef.String): TransformResourceOptions = copy(version = __v) + def clearAliases = copy(aliases = _root_.scala.Seq.empty) + def addAliases(__vs: pulumirpc.alias.Alias *): TransformResourceOptions = addAllAliases(__vs) + def addAllAliases(__vs: Iterable[pulumirpc.alias.Alias]): TransformResourceOptions = copy(aliases = aliases ++ __vs) + def withAliases(__v: _root_.scala.Seq[pulumirpc.alias.Alias]): TransformResourceOptions = copy(aliases = __v) + def withProvider(__v: _root_.scala.Predef.String): TransformResourceOptions = copy(provider = __v) + def getCustomTimeouts: pulumirpc.resource.RegisterResourceRequest.CustomTimeouts = customTimeouts.getOrElse(pulumirpc.resource.RegisterResourceRequest.CustomTimeouts.defaultInstance) + def clearCustomTimeouts: TransformResourceOptions = copy(customTimeouts = _root_.scala.None) + def withCustomTimeouts(__v: pulumirpc.resource.RegisterResourceRequest.CustomTimeouts): TransformResourceOptions = copy(customTimeouts = Option(__v)) + def withPluginDownloadUrl(__v: _root_.scala.Predef.String): TransformResourceOptions = copy(pluginDownloadUrl = __v) + def withRetainOnDelete(__v: _root_.scala.Boolean): TransformResourceOptions = copy(retainOnDelete = __v) + def withDeletedWith(__v: _root_.scala.Predef.String): TransformResourceOptions = copy(deletedWith = __v) + def getDeleteBeforeReplace: _root_.scala.Boolean = deleteBeforeReplace.getOrElse(false) + def clearDeleteBeforeReplace: TransformResourceOptions = copy(deleteBeforeReplace = _root_.scala.None) + def withDeleteBeforeReplace(__v: _root_.scala.Boolean): TransformResourceOptions = copy(deleteBeforeReplace = Option(__v)) + def clearAdditionalSecretOutputs = copy(additionalSecretOutputs = _root_.scala.Seq.empty) + def addAdditionalSecretOutputs(__vs: _root_.scala.Predef.String *): TransformResourceOptions = addAllAdditionalSecretOutputs(__vs) + def addAllAdditionalSecretOutputs(__vs: Iterable[_root_.scala.Predef.String]): TransformResourceOptions = copy(additionalSecretOutputs = additionalSecretOutputs ++ __vs) + def withAdditionalSecretOutputs(__v: _root_.scala.Seq[_root_.scala.Predef.String]): TransformResourceOptions = copy(additionalSecretOutputs = __v) + def clearProviders = copy(providers = _root_.scala.collection.immutable.Map.empty) + def addProviders(__vs: (_root_.scala.Predef.String, _root_.scala.Predef.String) *): TransformResourceOptions = addAllProviders(__vs) + def addAllProviders(__vs: Iterable[(_root_.scala.Predef.String, _root_.scala.Predef.String)]): TransformResourceOptions = copy(providers = providers ++ __vs) + def withProviders(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]): TransformResourceOptions = copy(providers = __v) + def clearPluginChecksums = copy(pluginChecksums = _root_.scala.collection.immutable.Map.empty) + def addPluginChecksums(__vs: (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString) *): TransformResourceOptions = addAllPluginChecksums(__vs) + def addAllPluginChecksums(__vs: Iterable[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]): TransformResourceOptions = copy(pluginChecksums = pluginChecksums ++ __vs) + def withPluginChecksums(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]): TransformResourceOptions = copy(pluginChecksums = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => dependsOn + case 2 => { + val __t = protect + if (__t != false) __t else null + } + case 3 => ignoreChanges + case 4 => replaceOnChanges + case 5 => { + val __t = version + if (__t != "") __t else null + } + case 6 => aliases + case 7 => { + val __t = provider + if (__t != "") __t else null + } + case 8 => customTimeouts.orNull + case 9 => { + val __t = pluginDownloadUrl + if (__t != "") __t else null + } + case 10 => { + val __t = retainOnDelete + if (__t != false) __t else null + } + case 11 => { + val __t = deletedWith + if (__t != "") __t else null + } + case 12 => deleteBeforeReplace.orNull + case 13 => additionalSecretOutputs + case 14 => providers.iterator.map(pulumirpc.resource.TransformResourceOptions._typemapper_providers.toBase(_)).toSeq + case 15 => pluginChecksums.iterator.map(pulumirpc.resource.TransformResourceOptions._typemapper_pluginChecksums.toBase(_)).toSeq + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PRepeated(dependsOn.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 2 => _root_.scalapb.descriptors.PBoolean(protect) + case 3 => _root_.scalapb.descriptors.PRepeated(ignoreChanges.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 4 => _root_.scalapb.descriptors.PRepeated(replaceOnChanges.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 5 => _root_.scalapb.descriptors.PString(version) + case 6 => _root_.scalapb.descriptors.PRepeated(aliases.iterator.map(_.toPMessage).toVector) + case 7 => _root_.scalapb.descriptors.PString(provider) + case 8 => customTimeouts.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 9 => _root_.scalapb.descriptors.PString(pluginDownloadUrl) + case 10 => _root_.scalapb.descriptors.PBoolean(retainOnDelete) + case 11 => _root_.scalapb.descriptors.PString(deletedWith) + case 12 => deleteBeforeReplace.map(_root_.scalapb.descriptors.PBoolean(_)).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 13 => _root_.scalapb.descriptors.PRepeated(additionalSecretOutputs.iterator.map(_root_.scalapb.descriptors.PString(_)).toVector) + case 14 => _root_.scalapb.descriptors.PRepeated(providers.iterator.map(pulumirpc.resource.TransformResourceOptions._typemapper_providers.toBase(_).toPMessage).toVector) + case 15 => _root_.scalapb.descriptors.PRepeated(pluginChecksums.iterator.map(pulumirpc.resource.TransformResourceOptions._typemapper_pluginChecksums.toBase(_).toPMessage).toVector) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.TransformResourceOptions.type = pulumirpc.resource.TransformResourceOptions + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.TransformResourceOptions]) +} + +object TransformResourceOptions extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.TransformResourceOptions] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.TransformResourceOptions] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.TransformResourceOptions = { + val __dependsOn: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __protect: _root_.scala.Boolean = false + val __ignoreChanges: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + val __replaceOnChanges: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + var __version: _root_.scala.Predef.String = "" + val __aliases: _root_.scala.collection.immutable.VectorBuilder[pulumirpc.alias.Alias] = new _root_.scala.collection.immutable.VectorBuilder[pulumirpc.alias.Alias] + var __provider: _root_.scala.Predef.String = "" + var __customTimeouts: _root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts] = _root_.scala.None + var __pluginDownloadUrl: _root_.scala.Predef.String = "" + var __retainOnDelete: _root_.scala.Boolean = false + var __deletedWith: _root_.scala.Predef.String = "" + var __deleteBeforeReplace: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None + val __additionalSecretOutputs: _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] = new _root_.scala.collection.immutable.VectorBuilder[_root_.scala.Predef.String] + val __providers: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.scala.Predef.String), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.scala.Predef.String] + val __pluginChecksums: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __dependsOn += _input__.readStringRequireUtf8() + case 16 => + __protect = _input__.readBool() + case 26 => + __ignoreChanges += _input__.readStringRequireUtf8() + case 34 => + __replaceOnChanges += _input__.readStringRequireUtf8() + case 42 => + __version = _input__.readStringRequireUtf8() + case 50 => + __aliases += _root_.scalapb.LiteParser.readMessage[pulumirpc.alias.Alias](_input__) + case 58 => + __provider = _input__.readStringRequireUtf8() + case 66 => + __customTimeouts = _root_.scala.Option(__customTimeouts.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 74 => + __pluginDownloadUrl = _input__.readStringRequireUtf8() + case 80 => + __retainOnDelete = _input__.readBool() + case 90 => + __deletedWith = _input__.readStringRequireUtf8() + case 96 => + __deleteBeforeReplace = _root_.scala.Option(_input__.readBool()) + case 106 => + __additionalSecretOutputs += _input__.readStringRequireUtf8() + case 114 => + __providers += pulumirpc.resource.TransformResourceOptions._typemapper_providers.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.TransformResourceOptions.ProvidersEntry](_input__)) + case 122 => + __pluginChecksums += pulumirpc.resource.TransformResourceOptions._typemapper_pluginChecksums.toCustom(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry](_input__)) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.TransformResourceOptions( + dependsOn = __dependsOn.result(), + protect = __protect, + ignoreChanges = __ignoreChanges.result(), + replaceOnChanges = __replaceOnChanges.result(), + version = __version, + aliases = __aliases.result(), + provider = __provider, + customTimeouts = __customTimeouts, + pluginDownloadUrl = __pluginDownloadUrl, + retainOnDelete = __retainOnDelete, + deletedWith = __deletedWith, + deleteBeforeReplace = __deleteBeforeReplace, + additionalSecretOutputs = __additionalSecretOutputs.result(), + providers = __providers.result(), + pluginChecksums = __pluginChecksums.result(), + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.TransformResourceOptions] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.TransformResourceOptions( + dependsOn = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + protect = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + ignoreChanges = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + replaceOnChanges = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + version = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + aliases = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Seq[pulumirpc.alias.Alias]]).getOrElse(_root_.scala.Seq.empty), + provider = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + customTimeouts = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).flatMap(_.as[_root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts]]), + pluginDownloadUrl = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + retainOnDelete = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scala.Boolean]).getOrElse(false), + deletedWith = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + deleteBeforeReplace = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Boolean]]), + additionalSecretOutputs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).map(_.as[_root_.scala.Seq[_root_.scala.Predef.String]]).getOrElse(_root_.scala.Seq.empty), + providers = __fieldsMap.get(scalaDescriptor.findFieldByNumber(14).get).map(_.as[_root_.scala.Seq[pulumirpc.resource.TransformResourceOptions.ProvidersEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.resource.TransformResourceOptions._typemapper_providers.toCustom(_)).toMap, + pluginChecksums = __fieldsMap.get(scalaDescriptor.findFieldByNumber(15).get).map(_.as[_root_.scala.Seq[pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(pulumirpc.resource.TransformResourceOptions._typemapper_pluginChecksums.toCustom(_)).toMap + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ResourceProto.javaDescriptor.getMessageTypes().get(9) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ResourceProto.scalaDescriptor.messages(9) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 6 => __out = pulumirpc.alias.Alias + case 8 => __out = pulumirpc.resource.RegisterResourceRequest.CustomTimeouts + case 14 => __out = pulumirpc.resource.TransformResourceOptions.ProvidersEntry + case 15 => __out = pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry + } + __out + } + lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + _root_.pulumirpc.resource.TransformResourceOptions.ProvidersEntry, + _root_.pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry + ) + def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[?] = throw new MatchError(__fieldNumber) + lazy val defaultInstance = pulumirpc.resource.TransformResourceOptions( + dependsOn = _root_.scala.Seq.empty, + protect = false, + ignoreChanges = _root_.scala.Seq.empty, + replaceOnChanges = _root_.scala.Seq.empty, + version = "", + aliases = _root_.scala.Seq.empty, + provider = "", + customTimeouts = _root_.scala.None, + pluginDownloadUrl = "", + retainOnDelete = false, + deletedWith = "", + deleteBeforeReplace = _root_.scala.None, + additionalSecretOutputs = _root_.scala.Seq.empty, + providers = _root_.scala.collection.immutable.Map.empty, + pluginChecksums = _root_.scala.collection.immutable.Map.empty + ) + @SerialVersionUID(0L) + final case class ProvidersEntry( + key: _root_.scala.Predef.String = "", + value: _root_.scala.Predef.String = "", + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ProvidersEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeString(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): ProvidersEntry = copy(key = __v) + def withValue(__v: _root_.scala.Predef.String): ProvidersEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != "") __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.TransformResourceOptions.ProvidersEntry.type = pulumirpc.resource.TransformResourceOptions.ProvidersEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.TransformResourceOptions.ProvidersEntry]) + } + + object ProvidersEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.TransformResourceOptions.ProvidersEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.TransformResourceOptions.ProvidersEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.TransformResourceOptions.ProvidersEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.scala.Predef.String = "" + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readStringRequireUtf8() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.TransformResourceOptions.ProvidersEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.TransformResourceOptions.ProvidersEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.TransformResourceOptions.ProvidersEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("") + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.TransformResourceOptions.javaDescriptor.getNestedTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.TransformResourceOptions.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.resource.TransformResourceOptions.ProvidersEntry( + key = "", + value = "" + ) + implicit class ProvidersEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.TransformResourceOptions.ProvidersEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.TransformResourceOptions.ProvidersEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.resource.TransformResourceOptions.ProvidersEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = + _root_.scalapb.TypeMapper[pulumirpc.resource.TransformResourceOptions.ProvidersEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)](__m => (__m.key, __m.value))(__p => pulumirpc.resource.TransformResourceOptions.ProvidersEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.scala.Predef.String + ): _root_.pulumirpc.resource.TransformResourceOptions.ProvidersEntry = _root_.pulumirpc.resource.TransformResourceOptions.ProvidersEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.TransformResourceOptions.ProvidersEntry]) + } + + @SerialVersionUID(0L) + final case class PluginChecksumsEntry( + key: _root_.scala.Predef.String = "", + value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PluginChecksumsEntry] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = key + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = value + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = key + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = value + if (!__v.isEmpty) { + _output__.writeBytes(2, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withKey(__v: _root_.scala.Predef.String): PluginChecksumsEntry = copy(key = __v) + def withValue(__v: _root_.com.google.protobuf.ByteString): PluginChecksumsEntry = copy(value = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = key + if (__t != "") __t else null + } + case 2 => { + val __t = value + if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(key) + case 2 => _root_.scalapb.descriptors.PByteString(value) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry.type = pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.TransformResourceOptions.PluginChecksumsEntry]) + } + + object PluginChecksumsEntry extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry = { + var __key: _root_.scala.Predef.String = "" + var __value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __key = _input__.readStringRequireUtf8() + case 18 => + __value = _input__.readBytes() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry( + key = __key, + value = __value, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry( + key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = pulumirpc.resource.TransformResourceOptions.javaDescriptor.getNestedTypes().get(1) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = pulumirpc.resource.TransformResourceOptions.scalaDescriptor.nestedMessages(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) + lazy val defaultInstance = pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry( + key = "", + value = _root_.com.google.protobuf.ByteString.EMPTY + ) + implicit class PluginChecksumsEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry](_l) { + def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_)) + def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.value)((c_, f_) => c_.copy(value = f_)) + } + final val KEY_FIELD_NUMBER = 1 + final val VALUE_FIELD_NUMBER = 2 + @transient + implicit val keyValueMapper: _root_.scalapb.TypeMapper[pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = + _root_.scalapb.TypeMapper[pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)](__m => (__m.key, __m.value))(__p => pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry(__p._1, __p._2)) + def of( + key: _root_.scala.Predef.String, + value: _root_.com.google.protobuf.ByteString + ): _root_.pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry = _root_.pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry( + key, + value + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.TransformResourceOptions.PluginChecksumsEntry]) + } + + implicit class TransformResourceOptionsLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.TransformResourceOptions]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.TransformResourceOptions](_l) { + def dependsOn: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.dependsOn)((c_, f_) => c_.copy(dependsOn = f_)) + def protect: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.protect)((c_, f_) => c_.copy(protect = f_)) + def ignoreChanges: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.ignoreChanges)((c_, f_) => c_.copy(ignoreChanges = f_)) + def replaceOnChanges: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.replaceOnChanges)((c_, f_) => c_.copy(replaceOnChanges = f_)) + def version: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.version)((c_, f_) => c_.copy(version = f_)) + def aliases: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[pulumirpc.alias.Alias]] = field(_.aliases)((c_, f_) => c_.copy(aliases = f_)) + def provider: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.provider)((c_, f_) => c_.copy(provider = f_)) + def customTimeouts: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.RegisterResourceRequest.CustomTimeouts] = field(_.getCustomTimeouts)((c_, f_) => c_.copy(customTimeouts = _root_.scala.Option(f_))) + def optionalCustomTimeouts: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts]] = field(_.customTimeouts)((c_, f_) => c_.copy(customTimeouts = f_)) + def pluginDownloadUrl: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.pluginDownloadUrl)((c_, f_) => c_.copy(pluginDownloadUrl = f_)) + def retainOnDelete: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.retainOnDelete)((c_, f_) => c_.copy(retainOnDelete = f_)) + def deletedWith: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.deletedWith)((c_, f_) => c_.copy(deletedWith = f_)) + def deleteBeforeReplace: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.getDeleteBeforeReplace)((c_, f_) => c_.copy(deleteBeforeReplace = _root_.scala.Option(f_))) + def optionalDeleteBeforeReplace: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Boolean]] = field(_.deleteBeforeReplace)((c_, f_) => c_.copy(deleteBeforeReplace = f_)) + def additionalSecretOutputs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[_root_.scala.Predef.String]] = field(_.additionalSecretOutputs)((c_, f_) => c_.copy(additionalSecretOutputs = f_)) + def providers: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String]] = field(_.providers)((c_, f_) => c_.copy(providers = f_)) + def pluginChecksums: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString]] = field(_.pluginChecksums)((c_, f_) => c_.copy(pluginChecksums = f_)) + } + final val DEPENDS_ON_FIELD_NUMBER = 1 + final val PROTECT_FIELD_NUMBER = 2 + final val IGNORE_CHANGES_FIELD_NUMBER = 3 + final val REPLACE_ON_CHANGES_FIELD_NUMBER = 4 + final val VERSION_FIELD_NUMBER = 5 + final val ALIASES_FIELD_NUMBER = 6 + final val PROVIDER_FIELD_NUMBER = 7 + final val CUSTOM_TIMEOUTS_FIELD_NUMBER = 8 + final val PLUGIN_DOWNLOAD_URL_FIELD_NUMBER = 9 + final val RETAIN_ON_DELETE_FIELD_NUMBER = 10 + final val DELETED_WITH_FIELD_NUMBER = 11 + final val DELETE_BEFORE_REPLACE_FIELD_NUMBER = 12 + final val ADDITIONAL_SECRET_OUTPUTS_FIELD_NUMBER = 13 + final val PROVIDERS_FIELD_NUMBER = 14 + final val PLUGIN_CHECKSUMS_FIELD_NUMBER = 15 + @transient + private[resource] val _typemapper_providers: _root_.scalapb.TypeMapper[pulumirpc.resource.TransformResourceOptions.ProvidersEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.resource.TransformResourceOptions.ProvidersEntry, (_root_.scala.Predef.String, _root_.scala.Predef.String)]] + @transient + private[resource] val _typemapper_pluginChecksums: _root_.scalapb.TypeMapper[pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)] = implicitly[_root_.scalapb.TypeMapper[pulumirpc.resource.TransformResourceOptions.PluginChecksumsEntry, (_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString)]] + def of( + dependsOn: _root_.scala.Seq[_root_.scala.Predef.String], + protect: _root_.scala.Boolean, + ignoreChanges: _root_.scala.Seq[_root_.scala.Predef.String], + replaceOnChanges: _root_.scala.Seq[_root_.scala.Predef.String], + version: _root_.scala.Predef.String, + aliases: _root_.scala.Seq[pulumirpc.alias.Alias], + provider: _root_.scala.Predef.String, + customTimeouts: _root_.scala.Option[pulumirpc.resource.RegisterResourceRequest.CustomTimeouts], + pluginDownloadUrl: _root_.scala.Predef.String, + retainOnDelete: _root_.scala.Boolean, + deletedWith: _root_.scala.Predef.String, + deleteBeforeReplace: _root_.scala.Option[_root_.scala.Boolean], + additionalSecretOutputs: _root_.scala.Seq[_root_.scala.Predef.String], + providers: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.scala.Predef.String], + pluginChecksums: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, _root_.com.google.protobuf.ByteString] + ): _root_.pulumirpc.resource.TransformResourceOptions = _root_.pulumirpc.resource.TransformResourceOptions( + dependsOn, + protect, + ignoreChanges, + replaceOnChanges, + version, + aliases, + provider, + customTimeouts, + pluginDownloadUrl, + retainOnDelete, + deletedWith, + deleteBeforeReplace, + additionalSecretOutputs, + providers, + pluginChecksums + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.TransformResourceOptions]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/resource/TransformResponse.scala b/besom-rpc/src/main/scala/pulumirpc/resource/TransformResponse.scala new file mode 100644 index 00000000..ef1f0a10 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/resource/TransformResponse.scala @@ -0,0 +1,153 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.resource + +/** @param properties + * the transformed input properties. + * @param options + * the options for the resource. + */ +@SerialVersionUID(0L) +final case class TransformResponse( + properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None, + options: _root_.scala.Option[pulumirpc.resource.TransformResourceOptions] = _root_.scala.None, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[TransformResponse] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + if (properties.isDefined) { + val __value = properties.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + if (options.isDefined) { + val __value = options.get + __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + properties.foreach { __v => + val __m = __v + _output__.writeTag(1, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + options.foreach { __v => + val __m = __v + _output__.writeTag(2, 2) + _output__.writeUInt32NoTag(__m.serializedSize) + __m.writeTo(_output__) + }; + unknownFields.writeTo(_output__) + } + def getProperties: com.google.protobuf.struct.Struct = properties.getOrElse(com.google.protobuf.struct.Struct.defaultInstance) + def clearProperties: TransformResponse = copy(properties = _root_.scala.None) + def withProperties(__v: com.google.protobuf.struct.Struct): TransformResponse = copy(properties = Option(__v)) + def getOptions: pulumirpc.resource.TransformResourceOptions = options.getOrElse(pulumirpc.resource.TransformResourceOptions.defaultInstance) + def clearOptions: TransformResponse = copy(options = _root_.scala.None) + def withOptions(__v: pulumirpc.resource.TransformResourceOptions): TransformResponse = copy(options = Option(__v)) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => properties.orNull + case 2 => options.orNull + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => properties.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + case 2 => options.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.resource.TransformResponse.type = pulumirpc.resource.TransformResponse + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.TransformResponse]) +} + +object TransformResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.resource.TransformResponse] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.resource.TransformResponse] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.resource.TransformResponse = { + var __properties: _root_.scala.Option[com.google.protobuf.struct.Struct] = _root_.scala.None + var __options: _root_.scala.Option[pulumirpc.resource.TransformResourceOptions] = _root_.scala.None + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __properties = _root_.scala.Option(__properties.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.struct.Struct](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case 18 => + __options = _root_.scala.Option(__options.fold(_root_.scalapb.LiteParser.readMessage[pulumirpc.resource.TransformResourceOptions](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))) + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.resource.TransformResponse( + properties = __properties, + options = __options, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.resource.TransformResponse] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.resource.TransformResponse( + properties = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.struct.Struct]]), + options = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[pulumirpc.resource.TransformResourceOptions]]) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ResourceProto.javaDescriptor.getMessageTypes().get(11) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ResourceProto.scalaDescriptor.messages(11) + def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[?] = { + var __out: _root_.scalapb.GeneratedMessageCompanion[?] = null + (__number: @_root_.scala.unchecked) match { + case 1 => __out = com.google.protobuf.struct.Struct + case 2 => __out = pulumirpc.resource.TransformResourceOptions + } + __out + } + 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) + lazy val defaultInstance = pulumirpc.resource.TransformResponse( + properties = _root_.scala.None, + options = _root_.scala.None + ) + implicit class TransformResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.TransformResponse]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.resource.TransformResponse](_l) { + def properties: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.struct.Struct] = field(_.getProperties)((c_, f_) => c_.copy(properties = _root_.scala.Option(f_))) + def optionalProperties: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.struct.Struct]] = field(_.properties)((c_, f_) => c_.copy(properties = f_)) + def options: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.resource.TransformResourceOptions] = field(_.getOptions)((c_, f_) => c_.copy(options = _root_.scala.Option(f_))) + def optionalOptions: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[pulumirpc.resource.TransformResourceOptions]] = field(_.options)((c_, f_) => c_.copy(options = f_)) + } + final val PROPERTIES_FIELD_NUMBER = 1 + final val OPTIONS_FIELD_NUMBER = 2 + def of( + properties: _root_.scala.Option[com.google.protobuf.struct.Struct], + options: _root_.scala.Option[pulumirpc.resource.TransformResourceOptions] + ): _root_.pulumirpc.resource.TransformResponse = _root_.pulumirpc.resource.TransformResponse( + properties, + options + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.TransformResponse]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/source/SourcePosition.scala b/besom-rpc/src/main/scala/pulumirpc/source/SourcePosition.scala new file mode 100644 index 00000000..6114be57 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/source/SourcePosition.scala @@ -0,0 +1,186 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.source + +/** A SourcePosition represents a position in a source file. + * + * @param uri + * The URI of the file. Currently only the file scheme with an absolute path is supported. + * @param line + * The line in the file + * @param column + * The column in the line + */ +@SerialVersionUID(0L) +final case class SourcePosition( + uri: _root_.scala.Predef.String = "", + line: _root_.scala.Int = 0, + column: _root_.scala.Int = 0, + unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty + ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[SourcePosition] { + @transient + private var __serializedSizeMemoized: _root_.scala.Int = 0 + private def __computeSerializedSize(): _root_.scala.Int = { + var __size = 0 + + { + val __value = uri + if (!__value.isEmpty) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value) + } + }; + + { + val __value = line + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(2, __value) + } + }; + + { + val __value = column + if (__value != 0) { + __size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(3, __value) + } + }; + __size += unknownFields.serializedSize + __size + } + override def serializedSize: _root_.scala.Int = { + var __size = __serializedSizeMemoized + if (__size == 0) { + __size = __computeSerializedSize() + 1 + __serializedSizeMemoized = __size + } + __size - 1 + + } + def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = { + { + val __v = uri + if (!__v.isEmpty) { + _output__.writeString(1, __v) + } + }; + { + val __v = line + if (__v != 0) { + _output__.writeInt32(2, __v) + } + }; + { + val __v = column + if (__v != 0) { + _output__.writeInt32(3, __v) + } + }; + unknownFields.writeTo(_output__) + } + def withUri(__v: _root_.scala.Predef.String): SourcePosition = copy(uri = __v) + def withLine(__v: _root_.scala.Int): SourcePosition = copy(line = __v) + def withColumn(__v: _root_.scala.Int): SourcePosition = copy(column = __v) + def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v) + def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty) + def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = { + (__fieldNumber: @_root_.scala.unchecked) match { + case 1 => { + val __t = uri + if (__t != "") __t else null + } + case 2 => { + val __t = line + if (__t != 0) __t else null + } + case 3 => { + val __t = column + if (__t != 0) __t else null + } + } + } + def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = { + _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor) + (__field.number: @_root_.scala.unchecked) match { + case 1 => _root_.scalapb.descriptors.PString(uri) + case 2 => _root_.scalapb.descriptors.PInt(line) + case 3 => _root_.scalapb.descriptors.PInt(column) + } + } + def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this) + def companion: pulumirpc.source.SourcePosition.type = pulumirpc.source.SourcePosition + // @@protoc_insertion_point(GeneratedMessage[pulumirpc.SourcePosition]) +} + +object SourcePosition extends scalapb.GeneratedMessageCompanion[pulumirpc.source.SourcePosition] { + implicit def messageCompanion: scalapb.GeneratedMessageCompanion[pulumirpc.source.SourcePosition] = this + def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): pulumirpc.source.SourcePosition = { + var __uri: _root_.scala.Predef.String = "" + var __line: _root_.scala.Int = 0 + var __column: _root_.scala.Int = 0 + var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null + var _done__ = false + while (!_done__) { + val _tag__ = _input__.readTag() + _tag__ match { + case 0 => _done__ = true + case 10 => + __uri = _input__.readStringRequireUtf8() + case 16 => + __line = _input__.readInt32() + case 24 => + __column = _input__.readInt32() + case tag => + if (_unknownFields__ == null) { + _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder() + } + _unknownFields__.parseField(tag, _input__) + } + } + pulumirpc.source.SourcePosition( + uri = __uri, + line = __line, + column = __column, + unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result() + ) + } + implicit def messageReads: _root_.scalapb.descriptors.Reads[pulumirpc.source.SourcePosition] = _root_.scalapb.descriptors.Reads{ + case _root_.scalapb.descriptors.PMessage(__fieldsMap) => + _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.") + pulumirpc.source.SourcePosition( + uri = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""), + line = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Int]).getOrElse(0), + column = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Int]).getOrElse(0) + ) + case _ => throw new RuntimeException("Expected PMessage") + } + def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = SourceProto.javaDescriptor.getMessageTypes().get(0) + def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = SourceProto.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) + lazy val defaultInstance = pulumirpc.source.SourcePosition( + uri = "", + line = 0, + column = 0 + ) + implicit class SourcePositionLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, pulumirpc.source.SourcePosition]) extends _root_.scalapb.lenses.MessageLens[UpperPB, pulumirpc.source.SourcePosition](_l) { + def uri: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.uri)((c_, f_) => c_.copy(uri = f_)) + def line: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.line)((c_, f_) => c_.copy(line = f_)) + def column: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.column)((c_, f_) => c_.copy(column = f_)) + } + final val URI_FIELD_NUMBER = 1 + final val LINE_FIELD_NUMBER = 2 + final val COLUMN_FIELD_NUMBER = 3 + def of( + uri: _root_.scala.Predef.String, + line: _root_.scala.Int, + column: _root_.scala.Int + ): _root_.pulumirpc.source.SourcePosition = _root_.pulumirpc.source.SourcePosition( + uri, + line, + column + ) + // @@protoc_insertion_point(GeneratedMessageCompanion[pulumirpc.SourcePosition]) +} diff --git a/besom-rpc/src/main/scala/pulumirpc/source/SourceProto.scala b/besom-rpc/src/main/scala/pulumirpc/source/SourceProto.scala new file mode 100644 index 00000000..a3623e40 --- /dev/null +++ b/besom-rpc/src/main/scala/pulumirpc/source/SourceProto.scala @@ -0,0 +1,31 @@ +// Generated by the Scala Plugin for the Protocol Buffer Compiler. +// Do not edit! +// +// Protofile syntax: PROTO3 + +package pulumirpc.source + +object SourceProto extends _root_.scalapb.GeneratedFileObject { + lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq.empty + lazy val messagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]] = + Seq[_root_.scalapb.GeneratedMessageCompanion[? <: _root_.scalapb.GeneratedMessage]]( + pulumirpc.source.SourcePosition + ) + private lazy val ProtoBytes: _root_.scala.Array[Byte] = + scalapb.Encoding.fromBase64(scala.collection.immutable.Seq( + """ChNwdWx1bWkvc291cmNlLnByb3RvEglwdWx1bWlycGMicAoOU291cmNlUG9zaXRpb24SGgoDdXJpGAEgASgJQgjiPwUSA3Vya + VIDdXJpEh0KBGxpbmUYAiABKAVCCeI/BhIEbGluZVIEbGluZRIjCgZjb2x1bW4YAyABKAVCC+I/CBIGY29sdW1uUgZjb2x1bW5CN + FoyZ2l0aHViLmNvbS9wdWx1bWkvcHVsdW1pL3Nkay92My9wcm90by9nbztwdWx1bWlycGNiBnByb3RvMw==""" + ).mkString) + lazy val scalaDescriptor: _root_.scalapb.descriptors.FileDescriptor = { + val scalaProto = com.google.protobuf.descriptor.FileDescriptorProto.parseFrom(ProtoBytes) + _root_.scalapb.descriptors.FileDescriptor.buildFrom(scalaProto, dependencies.map(_.scalaDescriptor)) + } + lazy val javaDescriptor: com.google.protobuf.Descriptors.FileDescriptor = { + val javaProto = com.google.protobuf.DescriptorProtos.FileDescriptorProto.parseFrom(ProtoBytes) + com.google.protobuf.Descriptors.FileDescriptor.buildFrom(javaProto, _root_.scala.Array( + )) + } + @deprecated("Use javaDescriptor instead. In a future version this will refer to scalaDescriptor.", "ScalaPB 0.5.47") + def descriptor: com.google.protobuf.Descriptors.FileDescriptor = javaDescriptor +} \ No newline at end of file diff --git a/scripts/Proto.scala b/scripts/Proto.scala index c9d826d4..e18fff0e 100644 --- a/scripts/Proto.scala +++ b/scripts/Proto.scala @@ -93,7 +93,7 @@ private def compileProto(cwd: os.Path, protoPath: os.Path): Unit = val files = os.walk(protoPath).filter(_.ext == "proto") - val scalaOut = cwd / "core" / "src" / "main" / "scala" / "besom" / "rpc" + val scalaOut = cwd / "besom-rpc" / "src" / "main" / "scala" os.remove.all(scalaOut) os.makeDir.all(scalaOut) @@ -101,7 +101,7 @@ private def compileProto(cwd: os.Path, protoPath: os.Path): Unit = val protoc = os.proc( "protoc", s"--plugin=$pluginPath", - s"--scala_out=grpc:$scalaOut", + s"--scala_out=scala3_sources,grpc:$scalaOut", files.map(_.relativeTo(protoPath)) ) println(s"running [$protoPath]: ${protoc.commandChunks.mkString(" ")}")