
src.pubsub.v1beta1a.Topic.scala Maven / Gradle / Ivy
package besom.api.googlenative.pubsub.v1beta1a
final case class Topic private(
urn: besom.types.Output[besom.types.URN],
id: besom.types.Output[besom.types.ResourceId],
name: besom.types.Output[String]
) extends besom.CustomResource
object Topic extends besom.ResourceCompanion[Topic]:
/** Resource constructor for Topic.
*
* @param name [[besom.util.NonEmptyString]] The unique (stack-wise) name of the resource in Pulumi state (not on provider's side).
* NonEmptyString is inferred automatically from non-empty string literals, even when interpolated. If you encounter any
* issues with this, please try using `: NonEmptyString` type annotation. If you need to convert a dynamically generated
* string to NonEmptyString, use `NonEmptyString.apply` method - `NonEmptyString(str): Option[NonEmptyString]`.
*
* @param args [[TopicArgs]] The configuration to use to create this resource. This resource has a default configuration.
*
* @param opts [[besom.CustomResourceOptions]] Resource options to use for this resource.
* Defaults to empty options. If you need to set some options, use [[besom.opts]] function to create them, for example:
*
* {{{
* val res = Topic(
* "my-resource",
* TopicArgs(...), // your args
* opts(provider = myProvider)
* )
* }}}
*/
def apply(using ctx: besom.types.Context)(
name: besom.util.NonEmptyString,
args: TopicArgs = TopicArgs(),
opts: besom.ResourceOptsVariant.Custom ?=> besom.CustomResourceOptions = besom.CustomResourceOptions()
): besom.types.Output[Topic] =
ctx.readOrRegisterResource[Topic, TopicArgs]("google-native:pubsub/v1beta1a:Topic", name, args, opts(using besom.ResourceOptsVariant.Custom))
private[besom] def typeToken: besom.types.ResourceType = "google-native:pubsub/v1beta1a:Topic"
given resourceDecoder(using besom.types.Context): besom.types.ResourceDecoder[Topic] =
besom.internal.ResourceDecoder.derived[Topic]
given decoder(using besom.types.Context): besom.types.Decoder[Topic] =
besom.internal.Decoder.customResourceDecoder[Topic]
given outputOps: {} with
extension(output: besom.types.Output[Topic])
def urn : besom.types.Output[besom.types.URN] = output.flatMap(_.urn)
def id : besom.types.Output[besom.types.ResourceId] = output.flatMap(_.id)
def name : besom.types.Output[String] = output.flatMap(_.name)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy