github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/discovery/v1beta1/endpointSliceList.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  // EndpointSliceList represents a list of endpoint slices
    16  type EndpointSliceList 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  	// List of endpoint slices
    22  	Items EndpointSliceTypeArrayOutput `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  // NewEndpointSliceList registers a new resource with the given unique name, arguments, and options.
    30  func NewEndpointSliceList(ctx *pulumi.Context,
    31  	name string, args *EndpointSliceListArgs, opts ...pulumi.ResourceOption) (*EndpointSliceList, 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("discovery.k8s.io/v1beta1")
    40  	args.Kind = pulumi.StringPtr("EndpointSliceList")
    41  	var resource EndpointSliceList
    42  	err := ctx.RegisterResource("kubernetes:discovery.k8s.io/v1beta1:EndpointSliceList", name, args, &resource, opts...)
    43  	if err != nil {
    44  		return nil, err
    45  	}
    46  	return &resource, nil
    47  }
    48  
    49  // GetEndpointSliceList gets an existing EndpointSliceList 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 GetEndpointSliceList(ctx *pulumi.Context,
    52  	name string, id pulumi.IDInput, state *EndpointSliceListState, opts ...pulumi.ResourceOption) (*EndpointSliceList, error) {
    53  	var resource EndpointSliceList
    54  	err := ctx.ReadResource("kubernetes:discovery.k8s.io/v1beta1:EndpointSliceList", 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 EndpointSliceList resources.
    62  type endpointSliceListState struct {
    63  }
    64  
    65  type EndpointSliceListState struct {
    66  }
    67  
    68  func (EndpointSliceListState) ElementType() reflect.Type {
    69  	return reflect.TypeOf((*endpointSliceListState)(nil)).Elem()
    70  }
    71  
    72  type endpointSliceListArgs 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  	// List of endpoint slices
    76  	Items []EndpointSliceType `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 EndpointSliceList resource.
    84  type EndpointSliceListArgs 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  	// List of endpoint slices
    88  	Items EndpointSliceTypeArrayInput
    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 (EndpointSliceListArgs) ElementType() reflect.Type {
    96  	return reflect.TypeOf((*endpointSliceListArgs)(nil)).Elem()
    97  }
    98  
    99  type EndpointSliceListInput interface {
   100  	pulumi.Input
   101  
   102  	ToEndpointSliceListOutput() EndpointSliceListOutput
   103  	ToEndpointSliceListOutputWithContext(ctx context.Context) EndpointSliceListOutput
   104  }
   105  
   106  func (*EndpointSliceList) ElementType() reflect.Type {
   107  	return reflect.TypeOf((**EndpointSliceList)(nil)).Elem()
   108  }
   109  
   110  func (i *EndpointSliceList) ToEndpointSliceListOutput() EndpointSliceListOutput {
   111  	return i.ToEndpointSliceListOutputWithContext(context.Background())
   112  }
   113  
   114  func (i *EndpointSliceList) ToEndpointSliceListOutputWithContext(ctx context.Context) EndpointSliceListOutput {
   115  	return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListOutput)
   116  }
   117  
   118  // EndpointSliceListArrayInput is an input type that accepts EndpointSliceListArray and EndpointSliceListArrayOutput values.
   119  // You can construct a concrete instance of `EndpointSliceListArrayInput` via:
   120  //
   121  //	EndpointSliceListArray{ EndpointSliceListArgs{...} }
   122  type EndpointSliceListArrayInput interface {
   123  	pulumi.Input
   124  
   125  	ToEndpointSliceListArrayOutput() EndpointSliceListArrayOutput
   126  	ToEndpointSliceListArrayOutputWithContext(context.Context) EndpointSliceListArrayOutput
   127  }
   128  
   129  type EndpointSliceListArray []EndpointSliceListInput
   130  
   131  func (EndpointSliceListArray) ElementType() reflect.Type {
   132  	return reflect.TypeOf((*[]*EndpointSliceList)(nil)).Elem()
   133  }
   134  
   135  func (i EndpointSliceListArray) ToEndpointSliceListArrayOutput() EndpointSliceListArrayOutput {
   136  	return i.ToEndpointSliceListArrayOutputWithContext(context.Background())
   137  }
   138  
   139  func (i EndpointSliceListArray) ToEndpointSliceListArrayOutputWithContext(ctx context.Context) EndpointSliceListArrayOutput {
   140  	return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListArrayOutput)
   141  }
   142  
   143  // EndpointSliceListMapInput is an input type that accepts EndpointSliceListMap and EndpointSliceListMapOutput values.
   144  // You can construct a concrete instance of `EndpointSliceListMapInput` via:
   145  //
   146  //	EndpointSliceListMap{ "key": EndpointSliceListArgs{...} }
   147  type EndpointSliceListMapInput interface {
   148  	pulumi.Input
   149  
   150  	ToEndpointSliceListMapOutput() EndpointSliceListMapOutput
   151  	ToEndpointSliceListMapOutputWithContext(context.Context) EndpointSliceListMapOutput
   152  }
   153  
   154  type EndpointSliceListMap map[string]EndpointSliceListInput
   155  
   156  func (EndpointSliceListMap) ElementType() reflect.Type {
   157  	return reflect.TypeOf((*map[string]*EndpointSliceList)(nil)).Elem()
   158  }
   159  
   160  func (i EndpointSliceListMap) ToEndpointSliceListMapOutput() EndpointSliceListMapOutput {
   161  	return i.ToEndpointSliceListMapOutputWithContext(context.Background())
   162  }
   163  
   164  func (i EndpointSliceListMap) ToEndpointSliceListMapOutputWithContext(ctx context.Context) EndpointSliceListMapOutput {
   165  	return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListMapOutput)
   166  }
   167  
   168  type EndpointSliceListOutput struct{ *pulumi.OutputState }
   169  
   170  func (EndpointSliceListOutput) ElementType() reflect.Type {
   171  	return reflect.TypeOf((**EndpointSliceList)(nil)).Elem()
   172  }
   173  
   174  func (o EndpointSliceListOutput) ToEndpointSliceListOutput() EndpointSliceListOutput {
   175  	return o
   176  }
   177  
   178  func (o EndpointSliceListOutput) ToEndpointSliceListOutputWithContext(ctx context.Context) EndpointSliceListOutput {
   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 EndpointSliceListOutput) ApiVersion() pulumi.StringPtrOutput {
   184  	return o.ApplyT(func(v *EndpointSliceList) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   185  }
   186  
   187  // List of endpoint slices
   188  func (o EndpointSliceListOutput) Items() EndpointSliceTypeArrayOutput {
   189  	return o.ApplyT(func(v *EndpointSliceList) EndpointSliceTypeArrayOutput { return v.Items }).(EndpointSliceTypeArrayOutput)
   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 EndpointSliceListOutput) Kind() pulumi.StringPtrOutput {
   194  	return o.ApplyT(func(v *EndpointSliceList) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   195  }
   196  
   197  // Standard list metadata.
   198  func (o EndpointSliceListOutput) Metadata() metav1.ListMetaPtrOutput {
   199  	return o.ApplyT(func(v *EndpointSliceList) metav1.ListMetaPtrOutput { return v.Metadata }).(metav1.ListMetaPtrOutput)
   200  }
   201  
   202  type EndpointSliceListArrayOutput struct{ *pulumi.OutputState }
   203  
   204  func (EndpointSliceListArrayOutput) ElementType() reflect.Type {
   205  	return reflect.TypeOf((*[]*EndpointSliceList)(nil)).Elem()
   206  }
   207  
   208  func (o EndpointSliceListArrayOutput) ToEndpointSliceListArrayOutput() EndpointSliceListArrayOutput {
   209  	return o
   210  }
   211  
   212  func (o EndpointSliceListArrayOutput) ToEndpointSliceListArrayOutputWithContext(ctx context.Context) EndpointSliceListArrayOutput {
   213  	return o
   214  }
   215  
   216  func (o EndpointSliceListArrayOutput) Index(i pulumi.IntInput) EndpointSliceListOutput {
   217  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EndpointSliceList {
   218  		return vs[0].([]*EndpointSliceList)[vs[1].(int)]
   219  	}).(EndpointSliceListOutput)
   220  }
   221  
   222  type EndpointSliceListMapOutput struct{ *pulumi.OutputState }
   223  
   224  func (EndpointSliceListMapOutput) ElementType() reflect.Type {
   225  	return reflect.TypeOf((*map[string]*EndpointSliceList)(nil)).Elem()
   226  }
   227  
   228  func (o EndpointSliceListMapOutput) ToEndpointSliceListMapOutput() EndpointSliceListMapOutput {
   229  	return o
   230  }
   231  
   232  func (o EndpointSliceListMapOutput) ToEndpointSliceListMapOutputWithContext(ctx context.Context) EndpointSliceListMapOutput {
   233  	return o
   234  }
   235  
   236  func (o EndpointSliceListMapOutput) MapIndex(k pulumi.StringInput) EndpointSliceListOutput {
   237  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EndpointSliceList {
   238  		return vs[0].(map[string]*EndpointSliceList)[vs[1].(string)]
   239  	}).(EndpointSliceListOutput)
   240  }
   241  
   242  func init() {
   243  	pulumi.RegisterInputType(reflect.TypeOf((*EndpointSliceListInput)(nil)).Elem(), &EndpointSliceList{})
   244  	pulumi.RegisterInputType(reflect.TypeOf((*EndpointSliceListArrayInput)(nil)).Elem(), EndpointSliceListArray{})
   245  	pulumi.RegisterInputType(reflect.TypeOf((*EndpointSliceListMapInput)(nil)).Elem(), EndpointSliceListMap{})
   246  	pulumi.RegisterOutputType(EndpointSliceListOutput{})
   247  	pulumi.RegisterOutputType(EndpointSliceListArrayOutput{})
   248  	pulumi.RegisterOutputType(EndpointSliceListMapOutput{})
   249  }