Tabnine Logo
Method
Code IndexAdd Tabnine to your IDE (free)

How to use
Method
in
software.amazon.awssdk.services.apigateway.model

Best Java code snippets using software.amazon.awssdk.services.apigateway.model.Method (Showing top 6 results out of 315)

origin: aws/aws-sdk-java-v2

@Override
public Method build() {
  return new Method(this);
}
origin: aws/aws-sdk-java-v2

/**
 * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
 * redacted from this string using a placeholder value.
 */
@Override
public String toString() {
  return ToString.builder("Method").add("HttpMethod", httpMethod()).add("AuthorizationType", authorizationType())
      .add("AuthorizerId", authorizerId()).add("ApiKeyRequired", apiKeyRequired())
      .add("RequestValidatorId", requestValidatorId()).add("OperationName", operationName())
      .add("RequestParameters", requestParameters()).add("RequestModels", requestModels())
      .add("MethodResponses", methodResponses()).add("MethodIntegration", methodIntegration())
      .add("AuthorizationScopes", authorizationScopes()).build();
}
origin: software.amazon.awssdk/api-gateway

public Method unmarshall(JsonUnmarshallerContext context) throws Exception {
  Method.Builder methodBuilder = Method.builder();
origin: aws/aws-sdk-java-v2

@Override
public int hashCode() {
  int hashCode = 1;
  hashCode = 31 * hashCode + Objects.hashCode(httpMethod());
  hashCode = 31 * hashCode + Objects.hashCode(authorizationType());
  hashCode = 31 * hashCode + Objects.hashCode(authorizerId());
  hashCode = 31 * hashCode + Objects.hashCode(apiKeyRequired());
  hashCode = 31 * hashCode + Objects.hashCode(requestValidatorId());
  hashCode = 31 * hashCode + Objects.hashCode(operationName());
  hashCode = 31 * hashCode + Objects.hashCode(requestParameters());
  hashCode = 31 * hashCode + Objects.hashCode(requestModels());
  hashCode = 31 * hashCode + Objects.hashCode(methodResponses());
  hashCode = 31 * hashCode + Objects.hashCode(methodIntegration());
  hashCode = 31 * hashCode + Objects.hashCode(authorizationScopes());
  return hashCode;
}
origin: aws/aws-sdk-java-v2

@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (!(obj instanceof Method)) {
    return false;
  }
  Method other = (Method) obj;
  return Objects.equals(httpMethod(), other.httpMethod()) && Objects.equals(authorizationType(), other.authorizationType())
      && Objects.equals(authorizerId(), other.authorizerId())
      && Objects.equals(apiKeyRequired(), other.apiKeyRequired())
      && Objects.equals(requestValidatorId(), other.requestValidatorId())
      && Objects.equals(operationName(), other.operationName())
      && Objects.equals(requestParameters(), other.requestParameters())
      && Objects.equals(requestModels(), other.requestModels())
      && Objects.equals(methodResponses(), other.methodResponses())
      && Objects.equals(methodIntegration(), other.methodIntegration())
      && Objects.equals(authorizationScopes(), other.authorizationScopes());
}
origin: aws/aws-sdk-java-v2

public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) {
  switch (fieldName) {
  case "httpMethod":
    return Optional.ofNullable(clazz.cast(httpMethod()));
  case "authorizationType":
    return Optional.ofNullable(clazz.cast(authorizationType()));
  case "authorizerId":
    return Optional.ofNullable(clazz.cast(authorizerId()));
  case "apiKeyRequired":
    return Optional.ofNullable(clazz.cast(apiKeyRequired()));
  case "requestValidatorId":
    return Optional.ofNullable(clazz.cast(requestValidatorId()));
  case "operationName":
    return Optional.ofNullable(clazz.cast(operationName()));
  case "requestParameters":
    return Optional.ofNullable(clazz.cast(requestParameters()));
  case "requestModels":
    return Optional.ofNullable(clazz.cast(requestModels()));
  case "methodResponses":
    return Optional.ofNullable(clazz.cast(methodResponses()));
  case "methodIntegration":
    return Optional.ofNullable(clazz.cast(methodIntegration()));
  case "authorizationScopes":
    return Optional.ofNullable(clazz.cast(authorizationScopes()));
  default:
    return Optional.empty();
  }
}
software.amazon.awssdk.services.apigateway.modelMethod

Javadoc

Represents a client-facing interface by which the client calls the API to access back-end resources. A Method resource is integrated with an Integration resource. Both consist of a request and one or more responses. The method request takes the client input that is passed to the back end through the integration request. A method response returns the output from the back end to the client through an integration response. A method request is embodied in a Method resource, whereas an integration request is embodied in an Integration resource. On the other hand, a method response is represented by a MethodResponse resource, whereas an integration response is represented by an IntegrationResponse resource.

Example: Retrive the GET method on a specified resource

Request

The following example request retrieves the information about the GET method on an API resource ( 3kzxbg5sa2) of an API (fugvjdxtri).

 
GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160603T210259Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160603/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
Response

The successful response returns a 200 OK status code and a payload similar to the following:

 
{ "_links": { "curies": [ { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", "name": "method", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" }, "method:integration": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "method:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "name": "200", "title": "200" }, "method:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" }, "methodresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}", "templated": true } }, "apiKeyRequired": true, "authorizationType": "NONE", "httpMethod": "GET", "_embedded": { "method:integration": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integration:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integration:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestParameters": { "integration.request.header.Content-Type": "'application/x-amz-json-1.1'" }, "requestTemplates": { "application/json": "{\n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-east-1:kinesis:action/ListStreams", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E\")" }, "statusCode": "200" } } }, "method:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "name": "200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.Content-Type": false }, "statusCode": "200" } } } 

In the example above, the response template for the 200 OK response maps the JSON output from the ListStreams action in the back end to an XML output. The mapping template is URL-encoded as %3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E and the output is decoded using the $util.urlDecode() helper function.

MethodResponse, Integration, IntegrationResponse, Resource, Set up an API's method

Most used methods

  • <init>
  • apiKeyRequired
    A boolean flag specifying whether a valid ApiKey is required to invoke this method.
  • authorizationScopes
    A list of authorization scopes configured on the method. The scopes are used with aCOGNITO_USER_POO
  • authorizationType
    The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM
  • authorizerId
    The identifier of an Authorizer to use on this method. The authorizationType must beCUSTOM.
  • builder
  • httpMethod
    The method's HTTP verb.
  • methodIntegration
    Gets the method's integration responsible for passing the client-submitted request to the back end
  • methodResponses
    Gets a method response associated with a given HTTP status code. The collection of method respons
  • operationName
    A human-friendly operation identifier for the method. For example, you can assign the operationName
  • requestModels
    A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of t
  • requestParameters
    A key-value map defining required or optional method request parameters that can be accepted by API
  • requestModels,
  • requestParameters,
  • requestValidatorId

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • Menu (java.awt)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now