github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/apiregistration/v1beta1/apiserviceList.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 v1beta1
     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  // APIServiceList is a list of APIService objects.
    16  type APIServiceList 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      APIServiceTypeArrayOutput `pulumi:"items"`
    22  	// 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
    23  	Kind     pulumi.StringPtrOutput   `pulumi:"kind"`
    24  	Metadata metav1.ListMetaPtrOutput `pulumi:"metadata"`
    25  }
    26  
    27  // NewAPIServiceList registers a new resource with the given unique name, arguments, and options.
    28  func NewAPIServiceList(ctx *pulumi.Context,
    29  	name string, args *APIServiceListArgs, opts ...pulumi.ResourceOption) (*APIServiceList, error) {
    30  	if args == nil {
    31  		return nil, errors.New("missing one or more required arguments")
    32  	}
    33  
    34  	if args.Items == nil {
    35  		return nil, errors.New("invalid value for required argument 'Items'")
    36  	}
    37  	args.ApiVersion = pulumi.StringPtr("apiregistration.k8s.io/v1beta1")
    38  	args.Kind = pulumi.StringPtr("APIServiceList")
    39  	aliases := pulumi.Aliases([]pulumi.Alias{
    40  		{
    41  			Type: pulumi.String("kubernetes:apiregistration/v1beta1:APIServiceList"),
    42  		},
    43  	})
    44  	opts = append(opts, aliases)
    45  	var resource APIServiceList
    46  	err := ctx.RegisterResource("kubernetes:apiregistration.k8s.io/v1beta1:APIServiceList", name, args, &resource, opts...)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return &resource, nil
    51  }
    52  
    53  // GetAPIServiceList gets an existing APIServiceList resource's state with the given name, ID, and optional
    54  // state properties that are used to uniquely qualify the lookup (nil if not required).
    55  func GetAPIServiceList(ctx *pulumi.Context,
    56  	name string, id pulumi.IDInput, state *APIServiceListState, opts ...pulumi.ResourceOption) (*APIServiceList, error) {
    57  	var resource APIServiceList
    58  	err := ctx.ReadResource("kubernetes:apiregistration.k8s.io/v1beta1:APIServiceList", name, id, state, &resource, opts...)
    59  	if err != nil {
    60  		return nil, err
    61  	}
    62  	return &resource, nil
    63  }
    64  
    65  // Input properties used for looking up and filtering APIServiceList resources.
    66  type apiserviceListState struct {
    67  }
    68  
    69  type APIServiceListState struct {
    70  }
    71  
    72  func (APIServiceListState) ElementType() reflect.Type {
    73  	return reflect.TypeOf((*apiserviceListState)(nil)).Elem()
    74  }
    75  
    76  type apiserviceListArgs struct {
    77  	// 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
    78  	ApiVersion *string          `pulumi:"apiVersion"`
    79  	Items      []APIServiceType `pulumi:"items"`
    80  	// 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
    81  	Kind     *string          `pulumi:"kind"`
    82  	Metadata *metav1.ListMeta `pulumi:"metadata"`
    83  }
    84  
    85  // The set of arguments for constructing a APIServiceList resource.
    86  type APIServiceListArgs struct {
    87  	// 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
    88  	ApiVersion pulumi.StringPtrInput
    89  	Items      APIServiceTypeArrayInput
    90  	// 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
    91  	Kind     pulumi.StringPtrInput
    92  	Metadata metav1.ListMetaPtrInput
    93  }
    94  
    95  func (APIServiceListArgs) ElementType() reflect.Type {
    96  	return reflect.TypeOf((*apiserviceListArgs)(nil)).Elem()
    97  }
    98  
    99  type APIServiceListInput interface {
   100  	pulumi.Input
   101  
   102  	ToAPIServiceListOutput() APIServiceListOutput
   103  	ToAPIServiceListOutputWithContext(ctx context.Context) APIServiceListOutput
   104  }
   105  
   106  func (*APIServiceList) ElementType() reflect.Type {
   107  	return reflect.TypeOf((**APIServiceList)(nil)).Elem()
   108  }
   109  
   110  func (i *APIServiceList) ToAPIServiceListOutput() APIServiceListOutput {
   111  	return i.ToAPIServiceListOutputWithContext(context.Background())
   112  }
   113  
   114  func (i *APIServiceList) ToAPIServiceListOutputWithContext(ctx context.Context) APIServiceListOutput {
   115  	return pulumi.ToOutputWithContext(ctx, i).(APIServiceListOutput)
   116  }
   117  
   118  // APIServiceListArrayInput is an input type that accepts APIServiceListArray and APIServiceListArrayOutput values.
   119  // You can construct a concrete instance of `APIServiceListArrayInput` via:
   120  //
   121  //	APIServiceListArray{ APIServiceListArgs{...} }
   122  type APIServiceListArrayInput interface {
   123  	pulumi.Input
   124  
   125  	ToAPIServiceListArrayOutput() APIServiceListArrayOutput
   126  	ToAPIServiceListArrayOutputWithContext(context.Context) APIServiceListArrayOutput
   127  }
   128  
   129  type APIServiceListArray []APIServiceListInput
   130  
   131  func (APIServiceListArray) ElementType() reflect.Type {
   132  	return reflect.TypeOf((*[]*APIServiceList)(nil)).Elem()
   133  }
   134  
   135  func (i APIServiceListArray) ToAPIServiceListArrayOutput() APIServiceListArrayOutput {
   136  	return i.ToAPIServiceListArrayOutputWithContext(context.Background())
   137  }
   138  
   139  func (i APIServiceListArray) ToAPIServiceListArrayOutputWithContext(ctx context.Context) APIServiceListArrayOutput {
   140  	return pulumi.ToOutputWithContext(ctx, i).(APIServiceListArrayOutput)
   141  }
   142  
   143  // APIServiceListMapInput is an input type that accepts APIServiceListMap and APIServiceListMapOutput values.
   144  // You can construct a concrete instance of `APIServiceListMapInput` via:
   145  //
   146  //	APIServiceListMap{ "key": APIServiceListArgs{...} }
   147  type APIServiceListMapInput interface {
   148  	pulumi.Input
   149  
   150  	ToAPIServiceListMapOutput() APIServiceListMapOutput
   151  	ToAPIServiceListMapOutputWithContext(context.Context) APIServiceListMapOutput
   152  }
   153  
   154  type APIServiceListMap map[string]APIServiceListInput
   155  
   156  func (APIServiceListMap) ElementType() reflect.Type {
   157  	return reflect.TypeOf((*map[string]*APIServiceList)(nil)).Elem()
   158  }
   159  
   160  func (i APIServiceListMap) ToAPIServiceListMapOutput() APIServiceListMapOutput {
   161  	return i.ToAPIServiceListMapOutputWithContext(context.Background())
   162  }
   163  
   164  func (i APIServiceListMap) ToAPIServiceListMapOutputWithContext(ctx context.Context) APIServiceListMapOutput {
   165  	return pulumi.ToOutputWithContext(ctx, i).(APIServiceListMapOutput)
   166  }
   167  
   168  type APIServiceListOutput struct{ *pulumi.OutputState }
   169  
   170  func (APIServiceListOutput) ElementType() reflect.Type {
   171  	return reflect.TypeOf((**APIServiceList)(nil)).Elem()
   172  }
   173  
   174  func (o APIServiceListOutput) ToAPIServiceListOutput() APIServiceListOutput {
   175  	return o
   176  }
   177  
   178  func (o APIServiceListOutput) ToAPIServiceListOutputWithContext(ctx context.Context) APIServiceListOutput {
   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 APIServiceListOutput) ApiVersion() pulumi.StringPtrOutput {
   184  	return o.ApplyT(func(v *APIServiceList) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   185  }
   186  
   187  func (o APIServiceListOutput) Items() APIServiceTypeArrayOutput {
   188  	return o.ApplyT(func(v *APIServiceList) APIServiceTypeArrayOutput { return v.Items }).(APIServiceTypeArrayOutput)
   189  }
   190  
   191  // 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
   192  func (o APIServiceListOutput) Kind() pulumi.StringPtrOutput {
   193  	return o.ApplyT(func(v *APIServiceList) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   194  }
   195  
   196  func (o APIServiceListOutput) Metadata() metav1.ListMetaPtrOutput {
   197  	return o.ApplyT(func(v *APIServiceList) metav1.ListMetaPtrOutput { return v.Metadata }).(metav1.ListMetaPtrOutput)
   198  }
   199  
   200  type APIServiceListArrayOutput struct{ *pulumi.OutputState }
   201  
   202  func (APIServiceListArrayOutput) ElementType() reflect.Type {
   203  	return reflect.TypeOf((*[]*APIServiceList)(nil)).Elem()
   204  }
   205  
   206  func (o APIServiceListArrayOutput) ToAPIServiceListArrayOutput() APIServiceListArrayOutput {
   207  	return o
   208  }
   209  
   210  func (o APIServiceListArrayOutput) ToAPIServiceListArrayOutputWithContext(ctx context.Context) APIServiceListArrayOutput {
   211  	return o
   212  }
   213  
   214  func (o APIServiceListArrayOutput) Index(i pulumi.IntInput) APIServiceListOutput {
   215  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *APIServiceList {
   216  		return vs[0].([]*APIServiceList)[vs[1].(int)]
   217  	}).(APIServiceListOutput)
   218  }
   219  
   220  type APIServiceListMapOutput struct{ *pulumi.OutputState }
   221  
   222  func (APIServiceListMapOutput) ElementType() reflect.Type {
   223  	return reflect.TypeOf((*map[string]*APIServiceList)(nil)).Elem()
   224  }
   225  
   226  func (o APIServiceListMapOutput) ToAPIServiceListMapOutput() APIServiceListMapOutput {
   227  	return o
   228  }
   229  
   230  func (o APIServiceListMapOutput) ToAPIServiceListMapOutputWithContext(ctx context.Context) APIServiceListMapOutput {
   231  	return o
   232  }
   233  
   234  func (o APIServiceListMapOutput) MapIndex(k pulumi.StringInput) APIServiceListOutput {
   235  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *APIServiceList {
   236  		return vs[0].(map[string]*APIServiceList)[vs[1].(string)]
   237  	}).(APIServiceListOutput)
   238  }
   239  
   240  func init() {
   241  	pulumi.RegisterInputType(reflect.TypeOf((*APIServiceListInput)(nil)).Elem(), &APIServiceList{})
   242  	pulumi.RegisterInputType(reflect.TypeOf((*APIServiceListArrayInput)(nil)).Elem(), APIServiceListArray{})
   243  	pulumi.RegisterInputType(reflect.TypeOf((*APIServiceListMapInput)(nil)).Elem(), APIServiceListMap{})
   244  	pulumi.RegisterOutputType(APIServiceListOutput{})
   245  	pulumi.RegisterOutputType(APIServiceListArrayOutput{})
   246  	pulumi.RegisterOutputType(APIServiceListMapOutput{})
   247  }