github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/resource/v1alpha1/resourceClassList.go (about)

     1  // Code generated by pulumigen DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package v1alpha1
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // ResourceClassList is a collection of classes.
    16  type ResourceClassList struct {
    17  	pulumi.CustomResourceState
    18  
    19  	// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
    20  	ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"`
    21  	// Items is the list of resource classes.
    22  	Items ResourceClassTypeArrayOutput `pulumi:"items"`
    23  	// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    24  	Kind pulumi.StringPtrOutput `pulumi:"kind"`
    25  	// Standard list metadata
    26  	Metadata metav1.ListMetaPtrOutput `pulumi:"metadata"`
    27  }
    28  
    29  // NewResourceClassList registers a new resource with the given unique name, arguments, and options.
    30  func NewResourceClassList(ctx *pulumi.Context,
    31  	name string, args *ResourceClassListArgs, opts ...pulumi.ResourceOption) (*ResourceClassList, error) {
    32  	if args == nil {
    33  		return nil, errors.New("missing one or more required arguments")
    34  	}
    35  
    36  	if args.Items == nil {
    37  		return nil, errors.New("invalid value for required argument 'Items'")
    38  	}
    39  	args.ApiVersion = pulumi.StringPtr("resource.k8s.io/v1alpha1")
    40  	args.Kind = pulumi.StringPtr("ResourceClassList")
    41  	var resource ResourceClassList
    42  	err := ctx.RegisterResource("kubernetes:resource.k8s.io/v1alpha1:ResourceClassList", name, args, &resource, opts...)
    43  	if err != nil {
    44  		return nil, err
    45  	}
    46  	return &resource, nil
    47  }
    48  
    49  // GetResourceClassList gets an existing ResourceClassList resource's state with the given name, ID, and optional
    50  // state properties that are used to uniquely qualify the lookup (nil if not required).
    51  func GetResourceClassList(ctx *pulumi.Context,
    52  	name string, id pulumi.IDInput, state *ResourceClassListState, opts ...pulumi.ResourceOption) (*ResourceClassList, error) {
    53  	var resource ResourceClassList
    54  	err := ctx.ReadResource("kubernetes:resource.k8s.io/v1alpha1:ResourceClassList", name, id, state, &resource, opts...)
    55  	if err != nil {
    56  		return nil, err
    57  	}
    58  	return &resource, nil
    59  }
    60  
    61  // Input properties used for looking up and filtering ResourceClassList resources.
    62  type resourceClassListState struct {
    63  }
    64  
    65  type ResourceClassListState struct {
    66  }
    67  
    68  func (ResourceClassListState) ElementType() reflect.Type {
    69  	return reflect.TypeOf((*resourceClassListState)(nil)).Elem()
    70  }
    71  
    72  type resourceClassListArgs struct {
    73  	// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
    74  	ApiVersion *string `pulumi:"apiVersion"`
    75  	// Items is the list of resource classes.
    76  	Items []ResourceClassType `pulumi:"items"`
    77  	// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    78  	Kind *string `pulumi:"kind"`
    79  	// Standard list metadata
    80  	Metadata *metav1.ListMeta `pulumi:"metadata"`
    81  }
    82  
    83  // The set of arguments for constructing a ResourceClassList resource.
    84  type ResourceClassListArgs struct {
    85  	// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
    86  	ApiVersion pulumi.StringPtrInput
    87  	// Items is the list of resource classes.
    88  	Items ResourceClassTypeArrayInput
    89  	// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    90  	Kind pulumi.StringPtrInput
    91  	// Standard list metadata
    92  	Metadata metav1.ListMetaPtrInput
    93  }
    94  
    95  func (ResourceClassListArgs) ElementType() reflect.Type {
    96  	return reflect.TypeOf((*resourceClassListArgs)(nil)).Elem()
    97  }
    98  
    99  type ResourceClassListInput interface {
   100  	pulumi.Input
   101  
   102  	ToResourceClassListOutput() ResourceClassListOutput
   103  	ToResourceClassListOutputWithContext(ctx context.Context) ResourceClassListOutput
   104  }
   105  
   106  func (*ResourceClassList) ElementType() reflect.Type {
   107  	return reflect.TypeOf((**ResourceClassList)(nil)).Elem()
   108  }
   109  
   110  func (i *ResourceClassList) ToResourceClassListOutput() ResourceClassListOutput {
   111  	return i.ToResourceClassListOutputWithContext(context.Background())
   112  }
   113  
   114  func (i *ResourceClassList) ToResourceClassListOutputWithContext(ctx context.Context) ResourceClassListOutput {
   115  	return pulumi.ToOutputWithContext(ctx, i).(ResourceClassListOutput)
   116  }
   117  
   118  // ResourceClassListArrayInput is an input type that accepts ResourceClassListArray and ResourceClassListArrayOutput values.
   119  // You can construct a concrete instance of `ResourceClassListArrayInput` via:
   120  //
   121  //	ResourceClassListArray{ ResourceClassListArgs{...} }
   122  type ResourceClassListArrayInput interface {
   123  	pulumi.Input
   124  
   125  	ToResourceClassListArrayOutput() ResourceClassListArrayOutput
   126  	ToResourceClassListArrayOutputWithContext(context.Context) ResourceClassListArrayOutput
   127  }
   128  
   129  type ResourceClassListArray []ResourceClassListInput
   130  
   131  func (ResourceClassListArray) ElementType() reflect.Type {
   132  	return reflect.TypeOf((*[]*ResourceClassList)(nil)).Elem()
   133  }
   134  
   135  func (i ResourceClassListArray) ToResourceClassListArrayOutput() ResourceClassListArrayOutput {
   136  	return i.ToResourceClassListArrayOutputWithContext(context.Background())
   137  }
   138  
   139  func (i ResourceClassListArray) ToResourceClassListArrayOutputWithContext(ctx context.Context) ResourceClassListArrayOutput {
   140  	return pulumi.ToOutputWithContext(ctx, i).(ResourceClassListArrayOutput)
   141  }
   142  
   143  // ResourceClassListMapInput is an input type that accepts ResourceClassListMap and ResourceClassListMapOutput values.
   144  // You can construct a concrete instance of `ResourceClassListMapInput` via:
   145  //
   146  //	ResourceClassListMap{ "key": ResourceClassListArgs{...} }
   147  type ResourceClassListMapInput interface {
   148  	pulumi.Input
   149  
   150  	ToResourceClassListMapOutput() ResourceClassListMapOutput
   151  	ToResourceClassListMapOutputWithContext(context.Context) ResourceClassListMapOutput
   152  }
   153  
   154  type ResourceClassListMap map[string]ResourceClassListInput
   155  
   156  func (ResourceClassListMap) ElementType() reflect.Type {
   157  	return reflect.TypeOf((*map[string]*ResourceClassList)(nil)).Elem()
   158  }
   159  
   160  func (i ResourceClassListMap) ToResourceClassListMapOutput() ResourceClassListMapOutput {
   161  	return i.ToResourceClassListMapOutputWithContext(context.Background())
   162  }
   163  
   164  func (i ResourceClassListMap) ToResourceClassListMapOutputWithContext(ctx context.Context) ResourceClassListMapOutput {
   165  	return pulumi.ToOutputWithContext(ctx, i).(ResourceClassListMapOutput)
   166  }
   167  
   168  type ResourceClassListOutput struct{ *pulumi.OutputState }
   169  
   170  func (ResourceClassListOutput) ElementType() reflect.Type {
   171  	return reflect.TypeOf((**ResourceClassList)(nil)).Elem()
   172  }
   173  
   174  func (o ResourceClassListOutput) ToResourceClassListOutput() ResourceClassListOutput {
   175  	return o
   176  }
   177  
   178  func (o ResourceClassListOutput) ToResourceClassListOutputWithContext(ctx context.Context) ResourceClassListOutput {
   179  	return o
   180  }
   181  
   182  // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
   183  func (o ResourceClassListOutput) ApiVersion() pulumi.StringPtrOutput {
   184  	return o.ApplyT(func(v *ResourceClassList) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   185  }
   186  
   187  // Items is the list of resource classes.
   188  func (o ResourceClassListOutput) Items() ResourceClassTypeArrayOutput {
   189  	return o.ApplyT(func(v *ResourceClassList) ResourceClassTypeArrayOutput { return v.Items }).(ResourceClassTypeArrayOutput)
   190  }
   191  
   192  // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
   193  func (o ResourceClassListOutput) Kind() pulumi.StringPtrOutput {
   194  	return o.ApplyT(func(v *ResourceClassList) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   195  }
   196  
   197  // Standard list metadata
   198  func (o ResourceClassListOutput) Metadata() metav1.ListMetaPtrOutput {
   199  	return o.ApplyT(func(v *ResourceClassList) metav1.ListMetaPtrOutput { return v.Metadata }).(metav1.ListMetaPtrOutput)
   200  }
   201  
   202  type ResourceClassListArrayOutput struct{ *pulumi.OutputState }
   203  
   204  func (ResourceClassListArrayOutput) ElementType() reflect.Type {
   205  	return reflect.TypeOf((*[]*ResourceClassList)(nil)).Elem()
   206  }
   207  
   208  func (o ResourceClassListArrayOutput) ToResourceClassListArrayOutput() ResourceClassListArrayOutput {
   209  	return o
   210  }
   211  
   212  func (o ResourceClassListArrayOutput) ToResourceClassListArrayOutputWithContext(ctx context.Context) ResourceClassListArrayOutput {
   213  	return o
   214  }
   215  
   216  func (o ResourceClassListArrayOutput) Index(i pulumi.IntInput) ResourceClassListOutput {
   217  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceClassList {
   218  		return vs[0].([]*ResourceClassList)[vs[1].(int)]
   219  	}).(ResourceClassListOutput)
   220  }
   221  
   222  type ResourceClassListMapOutput struct{ *pulumi.OutputState }
   223  
   224  func (ResourceClassListMapOutput) ElementType() reflect.Type {
   225  	return reflect.TypeOf((*map[string]*ResourceClassList)(nil)).Elem()
   226  }
   227  
   228  func (o ResourceClassListMapOutput) ToResourceClassListMapOutput() ResourceClassListMapOutput {
   229  	return o
   230  }
   231  
   232  func (o ResourceClassListMapOutput) ToResourceClassListMapOutputWithContext(ctx context.Context) ResourceClassListMapOutput {
   233  	return o
   234  }
   235  
   236  func (o ResourceClassListMapOutput) MapIndex(k pulumi.StringInput) ResourceClassListOutput {
   237  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceClassList {
   238  		return vs[0].(map[string]*ResourceClassList)[vs[1].(string)]
   239  	}).(ResourceClassListOutput)
   240  }
   241  
   242  func init() {
   243  	pulumi.RegisterInputType(reflect.TypeOf((*ResourceClassListInput)(nil)).Elem(), &ResourceClassList{})
   244  	pulumi.RegisterInputType(reflect.TypeOf((*ResourceClassListArrayInput)(nil)).Elem(), ResourceClassListArray{})
   245  	pulumi.RegisterInputType(reflect.TypeOf((*ResourceClassListMapInput)(nil)).Elem(), ResourceClassListMap{})
   246  	pulumi.RegisterOutputType(ResourceClassListOutput{})
   247  	pulumi.RegisterOutputType(ResourceClassListArrayOutput{})
   248  	pulumi.RegisterOutputType(ResourceClassListMapOutput{})
   249  }