mirror of https://github.com/pulumi/pulumi.git
117 lines
3.0 KiB
Go
117 lines
3.0 KiB
Go
// Code generated by pulumi-language-go DO NOT EDIT.
|
|
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
package large
|
|
|
|
import (
|
|
"context"
|
|
"reflect"
|
|
|
|
"errors"
|
|
"example.com/pulumi-large/sdk/go/v4/large/internal"
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
)
|
|
|
|
type String struct {
|
|
pulumi.CustomResourceState
|
|
|
|
Value pulumi.StringOutput `pulumi:"value"`
|
|
}
|
|
|
|
// NewString registers a new resource with the given unique name, arguments, and options.
|
|
func NewString(ctx *pulumi.Context,
|
|
name string, args *StringArgs, opts ...pulumi.ResourceOption) (*String, error) {
|
|
if args == nil {
|
|
return nil, errors.New("missing one or more required arguments")
|
|
}
|
|
|
|
if args.Value == nil {
|
|
return nil, errors.New("invalid value for required argument 'Value'")
|
|
}
|
|
opts = internal.PkgResourceDefaultOpts(opts)
|
|
var resource String
|
|
err := ctx.RegisterResource("large:index:String", name, args, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// GetString gets an existing String resource's state with the given name, ID, and optional
|
|
// state properties that are used to uniquely qualify the lookup (nil if not required).
|
|
func GetString(ctx *pulumi.Context,
|
|
name string, id pulumi.IDInput, state *StringState, opts ...pulumi.ResourceOption) (*String, error) {
|
|
var resource String
|
|
err := ctx.ReadResource("large:index:String", name, id, state, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// Input properties used for looking up and filtering String resources.
|
|
type stringState struct {
|
|
}
|
|
|
|
type StringState struct {
|
|
}
|
|
|
|
func (StringState) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*stringState)(nil)).Elem()
|
|
}
|
|
|
|
type stringArgs struct {
|
|
Value string `pulumi:"value"`
|
|
}
|
|
|
|
// The set of arguments for constructing a String resource.
|
|
type StringArgs struct {
|
|
Value pulumi.StringInput
|
|
}
|
|
|
|
func (StringArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*stringArgs)(nil)).Elem()
|
|
}
|
|
|
|
type StringInput interface {
|
|
pulumi.Input
|
|
|
|
ToStringOutput() StringOutput
|
|
ToStringOutputWithContext(ctx context.Context) StringOutput
|
|
}
|
|
|
|
func (*String) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**String)(nil)).Elem()
|
|
}
|
|
|
|
func (i *String) ToStringOutput() StringOutput {
|
|
return i.ToStringOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i *String) ToStringOutputWithContext(ctx context.Context) StringOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(StringOutput)
|
|
}
|
|
|
|
type StringOutput struct{ *pulumi.OutputState }
|
|
|
|
func (StringOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**String)(nil)).Elem()
|
|
}
|
|
|
|
func (o StringOutput) ToStringOutput() StringOutput {
|
|
return o
|
|
}
|
|
|
|
func (o StringOutput) ToStringOutputWithContext(ctx context.Context) StringOutput {
|
|
return o
|
|
}
|
|
|
|
func (o StringOutput) Value() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *String) pulumi.StringOutput { return v.Value }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterInputType(reflect.TypeOf((*StringInput)(nil)).Elem(), &String{})
|
|
pulumi.RegisterOutputType(StringOutput{})
|
|
}
|