github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/apigateway/methodResponse.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package apigateway
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides an HTTP Method Response for an API Gateway Resource. More information about API Gateway method responses can be found in the [Amazon API Gateway Developer Guide](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-settings-method-response.html).
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Basic Response
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
    28  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    29  //
    30  // )
    31  //
    32  //	func main() {
    33  //		pulumi.Run(func(ctx *pulumi.Context) error {
    34  //			myDemoAPI, err := apigateway.NewRestApi(ctx, "MyDemoAPI", &apigateway.RestApiArgs{
    35  //				Name:        pulumi.String("MyDemoAPI"),
    36  //				Description: pulumi.String("This is my API for demonstration purposes"),
    37  //			})
    38  //			if err != nil {
    39  //				return err
    40  //			}
    41  //			myDemoResource, err := apigateway.NewResource(ctx, "MyDemoResource", &apigateway.ResourceArgs{
    42  //				RestApi:  myDemoAPI.ID(),
    43  //				ParentId: myDemoAPI.RootResourceId,
    44  //				PathPart: pulumi.String("mydemoresource"),
    45  //			})
    46  //			if err != nil {
    47  //				return err
    48  //			}
    49  //			myDemoMethod, err := apigateway.NewMethod(ctx, "MyDemoMethod", &apigateway.MethodArgs{
    50  //				RestApi:       myDemoAPI.ID(),
    51  //				ResourceId:    myDemoResource.ID(),
    52  //				HttpMethod:    pulumi.String("GET"),
    53  //				Authorization: pulumi.String("NONE"),
    54  //			})
    55  //			if err != nil {
    56  //				return err
    57  //			}
    58  //			_, err = apigateway.NewIntegration(ctx, "MyDemoIntegration", &apigateway.IntegrationArgs{
    59  //				RestApi:    myDemoAPI.ID(),
    60  //				ResourceId: myDemoResource.ID(),
    61  //				HttpMethod: myDemoMethod.HttpMethod,
    62  //				Type:       pulumi.String("MOCK"),
    63  //			})
    64  //			if err != nil {
    65  //				return err
    66  //			}
    67  //			_, err = apigateway.NewMethodResponse(ctx, "response_200", &apigateway.MethodResponseArgs{
    68  //				RestApi:    myDemoAPI.ID(),
    69  //				ResourceId: myDemoResource.ID(),
    70  //				HttpMethod: myDemoMethod.HttpMethod,
    71  //				StatusCode: pulumi.String("200"),
    72  //			})
    73  //			if err != nil {
    74  //				return err
    75  //			}
    76  //			return nil
    77  //		})
    78  //	}
    79  //
    80  // ```
    81  // <!--End PulumiCodeChooser -->
    82  //
    83  // ### Response with Custom Header and Model
    84  //
    85  // <!--Start PulumiCodeChooser -->
    86  // ```go
    87  // package main
    88  //
    89  // import (
    90  //
    91  //	"encoding/json"
    92  //
    93  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
    94  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    95  //
    96  // )
    97  //
    98  //	func main() {
    99  //		pulumi.Run(func(ctx *pulumi.Context) error {
   100  //			myDemoAPI, err := apigateway.NewRestApi(ctx, "MyDemoAPI", &apigateway.RestApiArgs{
   101  //				Name:        pulumi.String("MyDemoAPI"),
   102  //				Description: pulumi.String("This is my API for demonstration purposes"),
   103  //			})
   104  //			if err != nil {
   105  //				return err
   106  //			}
   107  //			myDemoResource, err := apigateway.NewResource(ctx, "MyDemoResource", &apigateway.ResourceArgs{
   108  //				RestApi:  myDemoAPI.ID(),
   109  //				ParentId: myDemoAPI.RootResourceId,
   110  //				PathPart: pulumi.String("mydemoresource"),
   111  //			})
   112  //			if err != nil {
   113  //				return err
   114  //			}
   115  //			myDemoMethod, err := apigateway.NewMethod(ctx, "MyDemoMethod", &apigateway.MethodArgs{
   116  //				RestApi:       myDemoAPI.ID(),
   117  //				ResourceId:    myDemoResource.ID(),
   118  //				HttpMethod:    pulumi.String("GET"),
   119  //				Authorization: pulumi.String("NONE"),
   120  //			})
   121  //			if err != nil {
   122  //				return err
   123  //			}
   124  //			_, err = apigateway.NewIntegration(ctx, "MyDemoIntegration", &apigateway.IntegrationArgs{
   125  //				RestApi:    myDemoAPI.ID(),
   126  //				ResourceId: myDemoResource.ID(),
   127  //				HttpMethod: myDemoMethod.HttpMethod,
   128  //				Type:       pulumi.String("MOCK"),
   129  //			})
   130  //			if err != nil {
   131  //				return err
   132  //			}
   133  //			tmpJSON0, err := json.Marshal(map[string]interface{}{
   134  //				"$schema": "http://json-schema.org/draft-04/schema#",
   135  //				"title":   "MyDemoResponse",
   136  //				"type":    "object",
   137  //				"properties": map[string]interface{}{
   138  //					"Message": map[string]interface{}{
   139  //						"type": "string",
   140  //					},
   141  //				},
   142  //			})
   143  //			if err != nil {
   144  //				return err
   145  //			}
   146  //			json0 := string(tmpJSON0)
   147  //			_, err = apigateway.NewModel(ctx, "MyDemoResponseModel", &apigateway.ModelArgs{
   148  //				RestApi:     myDemoAPI.ID(),
   149  //				Name:        pulumi.String("MyDemoResponseModel"),
   150  //				Description: pulumi.String("API response for MyDemoMethod"),
   151  //				ContentType: pulumi.String("application/json"),
   152  //				Schema:      pulumi.String(json0),
   153  //			})
   154  //			if err != nil {
   155  //				return err
   156  //			}
   157  //			_, err = apigateway.NewMethodResponse(ctx, "response_200", &apigateway.MethodResponseArgs{
   158  //				RestApi:    myDemoAPI.ID(),
   159  //				ResourceId: myDemoResource.ID(),
   160  //				HttpMethod: myDemoMethod.HttpMethod,
   161  //				StatusCode: pulumi.String("200"),
   162  //				ResponseModels: pulumi.StringMap{
   163  //					"application/json": pulumi.String("MyDemoResponseModel"),
   164  //				},
   165  //				ResponseParameters: pulumi.BoolMap{
   166  //					"method.response.header.Content-Type":     pulumi.Bool(false),
   167  //					"method-response-header.X-My-Demo-Header": pulumi.Bool(false),
   168  //				},
   169  //			})
   170  //			if err != nil {
   171  //				return err
   172  //			}
   173  //			return nil
   174  //		})
   175  //	}
   176  //
   177  // ```
   178  // <!--End PulumiCodeChooser -->
   179  //
   180  // ## Import
   181  //
   182  // Using `pulumi import`, import `aws_api_gateway_method_response` using `REST-API-ID/RESOURCE-ID/HTTP-METHOD/STATUS-CODE`. For example:
   183  //
   184  // ```sh
   185  // $ pulumi import aws:apigateway/methodResponse:MethodResponse example 12345abcde/67890fghij/GET/200
   186  // ```
   187  type MethodResponse struct {
   188  	pulumi.CustomResourceState
   189  
   190  	// The HTTP verb of the method resource (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTIONS`, `ANY`).
   191  	HttpMethod pulumi.StringOutput `pulumi:"httpMethod"`
   192  	// The Resource identifier for the method resource.
   193  	ResourceId pulumi.StringOutput `pulumi:"resourceId"`
   194  	// A map specifying the model resources used for the response's content type. Response models are represented as a key/value map, with a content type as the key and a Model name as the value.
   195  	ResponseModels pulumi.StringMapOutput `pulumi:"responseModels"`
   196  	// A map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header name and the associated value is a boolean flag indicating whether the method response parameter is required. The method response header names must match the pattern of `method.response.header.{name}`, where `name` is a valid and unique header name.
   197  	//
   198  	// The response parameter names defined here are available in the integration response to be mapped from an integration response header expressed in `integration.response.header.{name}`, a static value enclosed within a pair of single quotes (e.g., '`application/json'`), or a JSON expression from the back-end response payload in the form of `integration.response.body.{JSON-expression}`, where `JSON-expression` is a valid JSON expression without the `$` prefix.)
   199  	ResponseParameters pulumi.BoolMapOutput `pulumi:"responseParameters"`
   200  	// The string identifier of the associated REST API.
   201  	RestApi pulumi.StringOutput `pulumi:"restApi"`
   202  	// The method response's status code.
   203  	StatusCode pulumi.StringOutput `pulumi:"statusCode"`
   204  }
   205  
   206  // NewMethodResponse registers a new resource with the given unique name, arguments, and options.
   207  func NewMethodResponse(ctx *pulumi.Context,
   208  	name string, args *MethodResponseArgs, opts ...pulumi.ResourceOption) (*MethodResponse, error) {
   209  	if args == nil {
   210  		return nil, errors.New("missing one or more required arguments")
   211  	}
   212  
   213  	if args.HttpMethod == nil {
   214  		return nil, errors.New("invalid value for required argument 'HttpMethod'")
   215  	}
   216  	if args.ResourceId == nil {
   217  		return nil, errors.New("invalid value for required argument 'ResourceId'")
   218  	}
   219  	if args.RestApi == nil {
   220  		return nil, errors.New("invalid value for required argument 'RestApi'")
   221  	}
   222  	if args.StatusCode == nil {
   223  		return nil, errors.New("invalid value for required argument 'StatusCode'")
   224  	}
   225  	opts = internal.PkgResourceDefaultOpts(opts)
   226  	var resource MethodResponse
   227  	err := ctx.RegisterResource("aws:apigateway/methodResponse:MethodResponse", name, args, &resource, opts...)
   228  	if err != nil {
   229  		return nil, err
   230  	}
   231  	return &resource, nil
   232  }
   233  
   234  // GetMethodResponse gets an existing MethodResponse resource's state with the given name, ID, and optional
   235  // state properties that are used to uniquely qualify the lookup (nil if not required).
   236  func GetMethodResponse(ctx *pulumi.Context,
   237  	name string, id pulumi.IDInput, state *MethodResponseState, opts ...pulumi.ResourceOption) (*MethodResponse, error) {
   238  	var resource MethodResponse
   239  	err := ctx.ReadResource("aws:apigateway/methodResponse:MethodResponse", name, id, state, &resource, opts...)
   240  	if err != nil {
   241  		return nil, err
   242  	}
   243  	return &resource, nil
   244  }
   245  
   246  // Input properties used for looking up and filtering MethodResponse resources.
   247  type methodResponseState struct {
   248  	// The HTTP verb of the method resource (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTIONS`, `ANY`).
   249  	HttpMethod *string `pulumi:"httpMethod"`
   250  	// The Resource identifier for the method resource.
   251  	ResourceId *string `pulumi:"resourceId"`
   252  	// A map specifying the model resources used for the response's content type. Response models are represented as a key/value map, with a content type as the key and a Model name as the value.
   253  	ResponseModels map[string]string `pulumi:"responseModels"`
   254  	// A map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header name and the associated value is a boolean flag indicating whether the method response parameter is required. The method response header names must match the pattern of `method.response.header.{name}`, where `name` is a valid and unique header name.
   255  	//
   256  	// The response parameter names defined here are available in the integration response to be mapped from an integration response header expressed in `integration.response.header.{name}`, a static value enclosed within a pair of single quotes (e.g., '`application/json'`), or a JSON expression from the back-end response payload in the form of `integration.response.body.{JSON-expression}`, where `JSON-expression` is a valid JSON expression without the `$` prefix.)
   257  	ResponseParameters map[string]bool `pulumi:"responseParameters"`
   258  	// The string identifier of the associated REST API.
   259  	RestApi interface{} `pulumi:"restApi"`
   260  	// The method response's status code.
   261  	StatusCode *string `pulumi:"statusCode"`
   262  }
   263  
   264  type MethodResponseState struct {
   265  	// The HTTP verb of the method resource (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTIONS`, `ANY`).
   266  	HttpMethod pulumi.StringPtrInput
   267  	// The Resource identifier for the method resource.
   268  	ResourceId pulumi.StringPtrInput
   269  	// A map specifying the model resources used for the response's content type. Response models are represented as a key/value map, with a content type as the key and a Model name as the value.
   270  	ResponseModels pulumi.StringMapInput
   271  	// A map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header name and the associated value is a boolean flag indicating whether the method response parameter is required. The method response header names must match the pattern of `method.response.header.{name}`, where `name` is a valid and unique header name.
   272  	//
   273  	// The response parameter names defined here are available in the integration response to be mapped from an integration response header expressed in `integration.response.header.{name}`, a static value enclosed within a pair of single quotes (e.g., '`application/json'`), or a JSON expression from the back-end response payload in the form of `integration.response.body.{JSON-expression}`, where `JSON-expression` is a valid JSON expression without the `$` prefix.)
   274  	ResponseParameters pulumi.BoolMapInput
   275  	// The string identifier of the associated REST API.
   276  	RestApi pulumi.Input
   277  	// The method response's status code.
   278  	StatusCode pulumi.StringPtrInput
   279  }
   280  
   281  func (MethodResponseState) ElementType() reflect.Type {
   282  	return reflect.TypeOf((*methodResponseState)(nil)).Elem()
   283  }
   284  
   285  type methodResponseArgs struct {
   286  	// The HTTP verb of the method resource (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTIONS`, `ANY`).
   287  	HttpMethod string `pulumi:"httpMethod"`
   288  	// The Resource identifier for the method resource.
   289  	ResourceId string `pulumi:"resourceId"`
   290  	// A map specifying the model resources used for the response's content type. Response models are represented as a key/value map, with a content type as the key and a Model name as the value.
   291  	ResponseModels map[string]string `pulumi:"responseModels"`
   292  	// A map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header name and the associated value is a boolean flag indicating whether the method response parameter is required. The method response header names must match the pattern of `method.response.header.{name}`, where `name` is a valid and unique header name.
   293  	//
   294  	// The response parameter names defined here are available in the integration response to be mapped from an integration response header expressed in `integration.response.header.{name}`, a static value enclosed within a pair of single quotes (e.g., '`application/json'`), or a JSON expression from the back-end response payload in the form of `integration.response.body.{JSON-expression}`, where `JSON-expression` is a valid JSON expression without the `$` prefix.)
   295  	ResponseParameters map[string]bool `pulumi:"responseParameters"`
   296  	// The string identifier of the associated REST API.
   297  	RestApi interface{} `pulumi:"restApi"`
   298  	// The method response's status code.
   299  	StatusCode string `pulumi:"statusCode"`
   300  }
   301  
   302  // The set of arguments for constructing a MethodResponse resource.
   303  type MethodResponseArgs struct {
   304  	// The HTTP verb of the method resource (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTIONS`, `ANY`).
   305  	HttpMethod pulumi.StringInput
   306  	// The Resource identifier for the method resource.
   307  	ResourceId pulumi.StringInput
   308  	// A map specifying the model resources used for the response's content type. Response models are represented as a key/value map, with a content type as the key and a Model name as the value.
   309  	ResponseModels pulumi.StringMapInput
   310  	// A map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header name and the associated value is a boolean flag indicating whether the method response parameter is required. The method response header names must match the pattern of `method.response.header.{name}`, where `name` is a valid and unique header name.
   311  	//
   312  	// The response parameter names defined here are available in the integration response to be mapped from an integration response header expressed in `integration.response.header.{name}`, a static value enclosed within a pair of single quotes (e.g., '`application/json'`), or a JSON expression from the back-end response payload in the form of `integration.response.body.{JSON-expression}`, where `JSON-expression` is a valid JSON expression without the `$` prefix.)
   313  	ResponseParameters pulumi.BoolMapInput
   314  	// The string identifier of the associated REST API.
   315  	RestApi pulumi.Input
   316  	// The method response's status code.
   317  	StatusCode pulumi.StringInput
   318  }
   319  
   320  func (MethodResponseArgs) ElementType() reflect.Type {
   321  	return reflect.TypeOf((*methodResponseArgs)(nil)).Elem()
   322  }
   323  
   324  type MethodResponseInput interface {
   325  	pulumi.Input
   326  
   327  	ToMethodResponseOutput() MethodResponseOutput
   328  	ToMethodResponseOutputWithContext(ctx context.Context) MethodResponseOutput
   329  }
   330  
   331  func (*MethodResponse) ElementType() reflect.Type {
   332  	return reflect.TypeOf((**MethodResponse)(nil)).Elem()
   333  }
   334  
   335  func (i *MethodResponse) ToMethodResponseOutput() MethodResponseOutput {
   336  	return i.ToMethodResponseOutputWithContext(context.Background())
   337  }
   338  
   339  func (i *MethodResponse) ToMethodResponseOutputWithContext(ctx context.Context) MethodResponseOutput {
   340  	return pulumi.ToOutputWithContext(ctx, i).(MethodResponseOutput)
   341  }
   342  
   343  // MethodResponseArrayInput is an input type that accepts MethodResponseArray and MethodResponseArrayOutput values.
   344  // You can construct a concrete instance of `MethodResponseArrayInput` via:
   345  //
   346  //	MethodResponseArray{ MethodResponseArgs{...} }
   347  type MethodResponseArrayInput interface {
   348  	pulumi.Input
   349  
   350  	ToMethodResponseArrayOutput() MethodResponseArrayOutput
   351  	ToMethodResponseArrayOutputWithContext(context.Context) MethodResponseArrayOutput
   352  }
   353  
   354  type MethodResponseArray []MethodResponseInput
   355  
   356  func (MethodResponseArray) ElementType() reflect.Type {
   357  	return reflect.TypeOf((*[]*MethodResponse)(nil)).Elem()
   358  }
   359  
   360  func (i MethodResponseArray) ToMethodResponseArrayOutput() MethodResponseArrayOutput {
   361  	return i.ToMethodResponseArrayOutputWithContext(context.Background())
   362  }
   363  
   364  func (i MethodResponseArray) ToMethodResponseArrayOutputWithContext(ctx context.Context) MethodResponseArrayOutput {
   365  	return pulumi.ToOutputWithContext(ctx, i).(MethodResponseArrayOutput)
   366  }
   367  
   368  // MethodResponseMapInput is an input type that accepts MethodResponseMap and MethodResponseMapOutput values.
   369  // You can construct a concrete instance of `MethodResponseMapInput` via:
   370  //
   371  //	MethodResponseMap{ "key": MethodResponseArgs{...} }
   372  type MethodResponseMapInput interface {
   373  	pulumi.Input
   374  
   375  	ToMethodResponseMapOutput() MethodResponseMapOutput
   376  	ToMethodResponseMapOutputWithContext(context.Context) MethodResponseMapOutput
   377  }
   378  
   379  type MethodResponseMap map[string]MethodResponseInput
   380  
   381  func (MethodResponseMap) ElementType() reflect.Type {
   382  	return reflect.TypeOf((*map[string]*MethodResponse)(nil)).Elem()
   383  }
   384  
   385  func (i MethodResponseMap) ToMethodResponseMapOutput() MethodResponseMapOutput {
   386  	return i.ToMethodResponseMapOutputWithContext(context.Background())
   387  }
   388  
   389  func (i MethodResponseMap) ToMethodResponseMapOutputWithContext(ctx context.Context) MethodResponseMapOutput {
   390  	return pulumi.ToOutputWithContext(ctx, i).(MethodResponseMapOutput)
   391  }
   392  
   393  type MethodResponseOutput struct{ *pulumi.OutputState }
   394  
   395  func (MethodResponseOutput) ElementType() reflect.Type {
   396  	return reflect.TypeOf((**MethodResponse)(nil)).Elem()
   397  }
   398  
   399  func (o MethodResponseOutput) ToMethodResponseOutput() MethodResponseOutput {
   400  	return o
   401  }
   402  
   403  func (o MethodResponseOutput) ToMethodResponseOutputWithContext(ctx context.Context) MethodResponseOutput {
   404  	return o
   405  }
   406  
   407  // The HTTP verb of the method resource (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTIONS`, `ANY`).
   408  func (o MethodResponseOutput) HttpMethod() pulumi.StringOutput {
   409  	return o.ApplyT(func(v *MethodResponse) pulumi.StringOutput { return v.HttpMethod }).(pulumi.StringOutput)
   410  }
   411  
   412  // The Resource identifier for the method resource.
   413  func (o MethodResponseOutput) ResourceId() pulumi.StringOutput {
   414  	return o.ApplyT(func(v *MethodResponse) pulumi.StringOutput { return v.ResourceId }).(pulumi.StringOutput)
   415  }
   416  
   417  // A map specifying the model resources used for the response's content type. Response models are represented as a key/value map, with a content type as the key and a Model name as the value.
   418  func (o MethodResponseOutput) ResponseModels() pulumi.StringMapOutput {
   419  	return o.ApplyT(func(v *MethodResponse) pulumi.StringMapOutput { return v.ResponseModels }).(pulumi.StringMapOutput)
   420  }
   421  
   422  // A map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header name and the associated value is a boolean flag indicating whether the method response parameter is required. The method response header names must match the pattern of `method.response.header.{name}`, where `name` is a valid and unique header name.
   423  //
   424  // The response parameter names defined here are available in the integration response to be mapped from an integration response header expressed in `integration.response.header.{name}`, a static value enclosed within a pair of single quotes (e.g., '`application/json'`), or a JSON expression from the back-end response payload in the form of `integration.response.body.{JSON-expression}`, where `JSON-expression` is a valid JSON expression without the `$` prefix.)
   425  func (o MethodResponseOutput) ResponseParameters() pulumi.BoolMapOutput {
   426  	return o.ApplyT(func(v *MethodResponse) pulumi.BoolMapOutput { return v.ResponseParameters }).(pulumi.BoolMapOutput)
   427  }
   428  
   429  // The string identifier of the associated REST API.
   430  func (o MethodResponseOutput) RestApi() pulumi.StringOutput {
   431  	return o.ApplyT(func(v *MethodResponse) pulumi.StringOutput { return v.RestApi }).(pulumi.StringOutput)
   432  }
   433  
   434  // The method response's status code.
   435  func (o MethodResponseOutput) StatusCode() pulumi.StringOutput {
   436  	return o.ApplyT(func(v *MethodResponse) pulumi.StringOutput { return v.StatusCode }).(pulumi.StringOutput)
   437  }
   438  
   439  type MethodResponseArrayOutput struct{ *pulumi.OutputState }
   440  
   441  func (MethodResponseArrayOutput) ElementType() reflect.Type {
   442  	return reflect.TypeOf((*[]*MethodResponse)(nil)).Elem()
   443  }
   444  
   445  func (o MethodResponseArrayOutput) ToMethodResponseArrayOutput() MethodResponseArrayOutput {
   446  	return o
   447  }
   448  
   449  func (o MethodResponseArrayOutput) ToMethodResponseArrayOutputWithContext(ctx context.Context) MethodResponseArrayOutput {
   450  	return o
   451  }
   452  
   453  func (o MethodResponseArrayOutput) Index(i pulumi.IntInput) MethodResponseOutput {
   454  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MethodResponse {
   455  		return vs[0].([]*MethodResponse)[vs[1].(int)]
   456  	}).(MethodResponseOutput)
   457  }
   458  
   459  type MethodResponseMapOutput struct{ *pulumi.OutputState }
   460  
   461  func (MethodResponseMapOutput) ElementType() reflect.Type {
   462  	return reflect.TypeOf((*map[string]*MethodResponse)(nil)).Elem()
   463  }
   464  
   465  func (o MethodResponseMapOutput) ToMethodResponseMapOutput() MethodResponseMapOutput {
   466  	return o
   467  }
   468  
   469  func (o MethodResponseMapOutput) ToMethodResponseMapOutputWithContext(ctx context.Context) MethodResponseMapOutput {
   470  	return o
   471  }
   472  
   473  func (o MethodResponseMapOutput) MapIndex(k pulumi.StringInput) MethodResponseOutput {
   474  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MethodResponse {
   475  		return vs[0].(map[string]*MethodResponse)[vs[1].(string)]
   476  	}).(MethodResponseOutput)
   477  }
   478  
   479  func init() {
   480  	pulumi.RegisterInputType(reflect.TypeOf((*MethodResponseInput)(nil)).Elem(), &MethodResponse{})
   481  	pulumi.RegisterInputType(reflect.TypeOf((*MethodResponseArrayInput)(nil)).Elem(), MethodResponseArray{})
   482  	pulumi.RegisterInputType(reflect.TypeOf((*MethodResponseMapInput)(nil)).Elem(), MethodResponseMap{})
   483  	pulumi.RegisterOutputType(MethodResponseOutput{})
   484  	pulumi.RegisterOutputType(MethodResponseArrayOutput{})
   485  	pulumi.RegisterOutputType(MethodResponseMapOutput{})
   486  }