Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.insights.kotlin.Favorite.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.insights.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [Favorite].
*/
@PulumiTagMarker
public class FavoriteResourceBuilder internal constructor() {
public var name: String? = null
public var args: FavoriteArgs = FavoriteArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend FavoriteArgsBuilder.() -> Unit) {
val builder = FavoriteArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Favorite {
val builtJavaResource = com.pulumi.azurenative.insights.Favorite(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Favorite(builtJavaResource)
}
}
/**
* Properties that define a favorite that is associated to an Application Insights component.
* Azure REST API version: 2015-05-01. Prior API version in Azure Native 1.x: 2015-05-01.
* ## Example Usage
* ### FavoriteAdd
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var favorite = new AzureNative.Insights.Favorite("favorite", new()
* {
* Config = "{\"MEDataModelRawJSON\":\"{\\n \\\"version\\\": \\\"1.4.1\\\",\\n \\\"isCustomDataModel\\\": true,\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\n \\\"chartType\\\": \\\"Area\\\",\\n \\\"chartHeight\\\": 4,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Sum\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"fail\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\n \\\"chartType\\\": \\\"Area\\\",\\n \\\"chartHeight\\\": 2,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/duration\\\",\\n \\\"metricAggregation\\\": \\\"Avg\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Avg\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"greenHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\n \\\"chartType\\\": \\\"Bar\\\",\\n \\\"chartHeight\\\": 4,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/duration\\\",\\n \\\"metricAggregation\\\": \\\"Avg\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Avg\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"magentaHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\n \\\"grouping\\\": {\\n \\\"kind\\\": \\\"ByDimension\\\",\\n \\\"dimension\\\": \\\"context.application.version\\\"\\n },\\n \\\"chartType\\\": \\\"Grid\\\",\\n \\\"chartHeight\\\": 1,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"basicException.count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"\\n },\\n {\\n \\\"id\\\": \\\"requestFailed.count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": true,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"blueHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n }\\n ],\\n \\\"currentFilter\\\": {\\n \\\"eventTypes\\\": [\\n 1,\\n 2\\n ],\\n \\\"typeFacets\\\": {},\\n \\\"isPermissive\\\": false\\n },\\n \\\"timeContext\\\": {\\n \\\"durationMs\\\": 75600000,\\n \\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\n \\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\n \\\"isInitialTime\\\": false,\\n \\\"grain\\\": 1,\\n \\\"useDashboardTimeRange\\\": false\\n },\\n \\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\n \\\"timeSource\\\": 0\\n}\"}",
* FavoriteId = "deadb33f-8bee-4d3b-a059-9be8dac93960",
* FavoriteType = AzureNative.Insights.FavoriteType.Shared,
* IsGeneratedFromTemplate = false,
* Name = "Blah Blah Blah",
* ResourceGroupName = "my-resource-group",
* ResourceName = "my-ai-component",
* Tags = new[]
* {
* "TagSample01",
* "TagSample02",
* },
* Version = "ME",
* });
* });
* ```
* ```go
* package main
* import (
* insights "github.com/pulumi/pulumi-azure-native-sdk/insights/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := insights.NewFavorite(ctx, "favorite", &insights.FavoriteArgs{
* Config: pulumi.String("{\"MEDataModelRawJSON\":\"{\\n \\\"version\\\": \\\"1.4.1\\\",\\n \\\"isCustomDataModel\\\": true,\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\n \\\"chartType\\\": \\\"Area\\\",\\n \\\"chartHeight\\\": 4,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Sum\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"fail\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\n \\\"chartType\\\": \\\"Area\\\",\\n \\\"chartHeight\\\": 2,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/duration\\\",\\n \\\"metricAggregation\\\": \\\"Avg\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Avg\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"greenHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\n \\\"chartType\\\": \\\"Bar\\\",\\n \\\"chartHeight\\\": 4,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/duration\\\",\\n \\\"metricAggregation\\\": \\\"Avg\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Avg\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"magentaHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\n \\\"grouping\\\": {\\n \\\"kind\\\": \\\"ByDimension\\\",\\n \\\"dimension\\\": \\\"context.application.version\\\"\\n },\\n \\\"chartType\\\": \\\"Grid\\\",\\n \\\"chartHeight\\\": 1,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"basicException.count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"\\n },\\n {\\n \\\"id\\\": \\\"requestFailed.count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": true,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"blueHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n }\\n ],\\n \\\"currentFilter\\\": {\\n \\\"eventTypes\\\": [\\n 1,\\n 2\\n ],\\n \\\"typeFacets\\\": {},\\n \\\"isPermissive\\\": false\\n },\\n \\\"timeContext\\\": {\\n \\\"durationMs\\\": 75600000,\\n \\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\n \\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\n \\\"isInitialTime\\\": false,\\n \\\"grain\\\": 1,\\n \\\"useDashboardTimeRange\\\": false\\n },\\n \\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\n \\\"timeSource\\\": 0\\n}\"}"),
* FavoriteId: pulumi.String("deadb33f-8bee-4d3b-a059-9be8dac93960"),
* FavoriteType: insights.FavoriteTypeShared,
* IsGeneratedFromTemplate: pulumi.Bool(false),
* Name: pulumi.String("Blah Blah Blah"),
* ResourceGroupName: pulumi.String("my-resource-group"),
* ResourceName: pulumi.String("my-ai-component"),
* Tags: pulumi.StringArray{
* pulumi.String("TagSample01"),
* pulumi.String("TagSample02"),
* },
* Version: pulumi.String("ME"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.insights.Favorite;
* import com.pulumi.azurenative.insights.FavoriteArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var favorite = new Favorite("favorite", FavoriteArgs.builder()
* .config("{\"MEDataModelRawJSON\":\"{\\n \\\"version\\\": \\\"1.4.1\\\",\\n \\\"isCustomDataModel\\\": true,\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\n \\\"chartType\\\": \\\"Area\\\",\\n \\\"chartHeight\\\": 4,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Sum\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"fail\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\n \\\"chartType\\\": \\\"Area\\\",\\n \\\"chartHeight\\\": 2,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/duration\\\",\\n \\\"metricAggregation\\\": \\\"Avg\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Avg\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"greenHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\n \\\"chartType\\\": \\\"Bar\\\",\\n \\\"chartHeight\\\": 4,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"preview/requests/duration\\\",\\n \\\"metricAggregation\\\": \\\"Avg\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": false,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"aggregation\\\": \\\"Avg\\\",\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"magentaHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n },\\n {\\n \\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\n \\\"grouping\\\": {\\n \\\"kind\\\": \\\"ByDimension\\\",\\n \\\"dimension\\\": \\\"context.application.version\\\"\\n },\\n \\\"chartType\\\": \\\"Grid\\\",\\n \\\"chartHeight\\\": 1,\\n \\\"metrics\\\": [\\n {\\n \\\"id\\\": \\\"basicException.count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"\\n },\\n {\\n \\\"id\\\": \\\"requestFailed.count\\\",\\n \\\"metricAggregation\\\": \\\"Sum\\\",\\n \\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"\\n }\\n ],\\n \\\"priorPeriod\\\": true,\\n \\\"clickAction\\\": {\\n \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n },\\n \\\"horizontalBars\\\": true,\\n \\\"showOther\\\": true,\\n \\\"percentage\\\": false,\\n \\\"palette\\\": \\\"blueHues\\\",\\n \\\"yAxisOption\\\": 0,\\n \\\"title\\\": \\\"\\\"\\n }\\n ],\\n \\\"currentFilter\\\": {\\n \\\"eventTypes\\\": [\\n 1,\\n 2\\n ],\\n \\\"typeFacets\\\": {},\\n \\\"isPermissive\\\": false\\n },\\n \\\"timeContext\\\": {\\n \\\"durationMs\\\": 75600000,\\n \\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\n \\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\n \\\"isInitialTime\\\": false,\\n \\\"grain\\\": 1,\\n \\\"useDashboardTimeRange\\\": false\\n },\\n \\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\n \\\"timeSource\\\": 0\\n}\"}")
* .favoriteId("deadb33f-8bee-4d3b-a059-9be8dac93960")
* .favoriteType("shared")
* .isGeneratedFromTemplate(false)
* .name("Blah Blah Blah")
* .resourceGroupName("my-resource-group")
* .resourceName("my-ai-component")
* .tags(
* "TagSample01",
* "TagSample02")
* .version("ME")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:insights:Favorite myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}
* ```
*/
public class Favorite internal constructor(
override val javaResource: com.pulumi.azurenative.insights.Favorite,
) : KotlinCustomResource(javaResource, FavoriteMapper) {
/**
* Favorite category, as defined by the user at creation time.
*/
public val category: Output?
get() = javaResource.category().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Configuration of this particular favorite, which are driven by the Azure portal UX. Configuration data is a string containing valid JSON
*/
public val config: Output?
get() = javaResource.config().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Internally assigned unique id of the favorite definition.
*/
public val favoriteId: Output
get() = javaResource.favoriteId().applyValue({ args0 -> args0 })
/**
* Enum indicating if this favorite definition is owned by a specific user or is shared between all users with access to the Application Insights component.
*/
public val favoriteType: Output?
get() = javaResource.favoriteType().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Flag denoting wether or not this favorite was generated from a template.
*/
public val isGeneratedFromTemplate: Output?
get() = javaResource.isGeneratedFromTemplate().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The user-defined name of the favorite.
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The source of the favorite definition.
*/
public val sourceType: Output?
get() = javaResource.sourceType().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A list of 0 or more tags that are associated with this favorite definition
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* Date and time in UTC of the last modification that was made to this favorite definition.
*/
public val timeModified: Output
get() = javaResource.timeModified().applyValue({ args0 -> args0 })
/**
* Unique user id of the specific user that owns this favorite.
*/
public val userId: Output
get() = javaResource.userId().applyValue({ args0 -> args0 })
/**
* This instance's version of the data model. This can change as new features are added that can be marked favorite. Current examples include MetricsExplorer (ME) and Search.
*/
public val version: Output?
get() = javaResource.version().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object FavoriteMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azurenative.insights.Favorite::class == javaResource::class
override fun map(javaResource: Resource): Favorite = Favorite(
javaResource as
com.pulumi.azurenative.insights.Favorite,
)
}
/**
* @see [Favorite].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Favorite].
*/
public suspend fun favorite(name: String, block: suspend FavoriteResourceBuilder.() -> Unit): Favorite {
val builder = FavoriteResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Favorite].
* @param name The _unique_ name of the resulting resource.
*/
public fun favorite(name: String): Favorite {
val builder = FavoriteResourceBuilder()
builder.name(name)
return builder.build()
}