<pre>
Create version request.
</pre>

<code>.google.appengine.v1.CreateVersionRequest request = 1;</code>
348751
public com.google.appengine.v1.CreateVersionRequest getRequest() {
    return request_ == null ? com.google.appengine.v1.CreateVersionRequest.getDefaultInstance() : request_;
  }
476473
public com.google.appengine.v1.Version getVersion() {
    return version_ == null ? com.google.appengine.v1.Version.getDefaultInstance() : version_;
  }
90431
def create(self, request):
        
        variant_id = request.data.get("variant_id", None)

        if variant_id is not None:
            variant = ProductVariant.objects.get(id=variant_id)

            quantity = int(request.data.get("quantity", 1))
            items, bid = utils.get_basket_items(request)

            # Check if the variant is already in the basket
            in_basket = False
            for item in items:
                if item.variant.id == variant.id:
                    item.increase_quantity(quantity)
                    in_basket = True
                    break
            if not in_basket:
                item = BasketItem(variant=variant, quantity=quantity, basket_id=bid)
                item.save()

            serializer = BasketItemSerializer(self.get_queryset(request), many=True)
            response = Response(data=serializer.data,
                                status=status.HTTP_201_CREATED)

        else:
            response = Response(
                {"message": "Missing 'variant_id'"},
                status=status.HTTP_400_BAD_REQUEST)

        return response
203172
public com.google.appengine.v1.CreateVersionMethodOrBuilder getCreateVersionOrBuilder() {
    if (methodCase_ == 2) {
       return (com.google.appengine.v1.CreateVersionMethod) method_;
    }
    return com.google.appengine.v1.CreateVersionMethod.getDefaultInstance();
  }
17276
public java.util.List<? extends com.google.appengine.v1.VersionOrBuilder> 
      getVersionsOrBuilderList() {
    return versions_;
  }
1066867
def auto_create_version(class_name, version, filename="__init__.py"):
    
    version_filename = Path(
        "{classname}/{filename}".format(classname=class_name,
                                        filename=filename))
    with open(version_filename, "r") as f:
        content = f.read()

    if content != '__version__ = "{0}"'.format(version):
        banner("Updating version to {0}".format(version))
        with open(version_filename, "w") as text_file:
            text_file.write('__version__ = "{0:s}"'.format(version))
1235579
@Override
    public java.util.concurrent.Future<DescribeApplicationVersionsResult> describeApplicationVersionsAsync(
            com.amazonaws.handlers.AsyncHandler<DescribeApplicationVersionsRequest, DescribeApplicationVersionsResult> asyncHandler) {

        return describeApplicationVersionsAsync(new DescribeApplicationVersionsRequest(), asyncHandler);
    }
259414
public static ApplicationRequest createApplicationRequest(String applicationName) {
		ApplicationRequest applicationRequest = new ApplicationRequest();
		applicationRequest.setApplicationName(applicationName);

		return applicationRequest;
	}
97539
public static RequestWrapper create(HttpServletRequest request) {

		HttpSession session = request.getSession();
		AppContextWrapper acw = new ServletContextWrapper(session.getServletContext());
		SessionWrapper sw = new HttpSessionWrapper(session);
		ContextHolder contextHolder = new ContextHolder(acw, sw);

		return new HttpServletRequestWrapper(request, contextHolder);
	}
421667
public CreateJobResponse createJob(CreateJobRequest request) {
        checkNotNull(request, "request should not be null.");
        checkStringNotEmpty(request.getName(), "The name should not be null or empty string.");
        checkStringNotEmpty(request.getVmType(), "The vmType should not be null or empty string.");
        checkStringNotEmpty(request.getJobDagJson(), "The jobDagJson should not be null or empty string.");
        checkIsTrue(request.getVmCount() > 0, "The vmCount should greater than 0");

        StringWriter writer = new StringWriter();
        try {
            JsonGenerator jsonGenerator = JsonUtils.jsonGeneratorOf(writer);
            jsonGenerator.writeStartObject();
            jsonGenerator.writeStringField("name", request.getName());
            jsonGenerator.writeStringField("vmType", request.getVmType());
            jsonGenerator.writeNumberField("vmCount", request.getVmCount());
            jsonGenerator.writeStringField("jobDagJson", request.getJobDagJson());
            if (request.getJobTimeoutInSeconds() != null) {
                jsonGenerator.writeNumberField("jobTimeoutInSeconds", request.getJobTimeoutInSeconds());
            }
            if (request.getMemo() != null) {
                jsonGenerator.writeStringField("memo", request.getMemo());
            }
            jsonGenerator.writeEndObject();
            jsonGenerator.close();
        } catch (IOException e) {
            throw new BceClientException("Fail to generate json", e);
        }

        byte[] json = null;
        try {
            json = writer.toString().getBytes(DEFAULT_ENCODING);
        } catch (UnsupportedEncodingException e) {
            throw new BceClientException("Fail to get UTF-8 bytes", e);
        }

        InternalRequest internalRequest = this.createRequest(request, HttpMethodName.POST, JOB);
        internalRequest.addHeader(Headers.CONTENT_LENGTH, String.valueOf(json.length));
        internalRequest.addHeader(Headers.CONTENT_TYPE, "application/json");
        internalRequest.setContent(RestartableInputStream.wrap(json));

        internalRequest.addParameter("run", "immediate");
        if (request.getClientToken() != null) {
            internalRequest.addParameter("clientToken", request.getClientToken());
        }

        return this.invokeHttpClient(internalRequest, CreateJobResponse.class);
    }
1328891
public Version<Attributes<T>> getOrCreateVersion()
   {
      List<Node> nodeList = childNode.get("version");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new VersionImpl<Attributes<T>>(this, "version", childNode, nodeList.get(0));
      }
      return createVersion();
   }
1337500
static Entity incrementVersion(Entity nativeEntity, PropertyMetadata versionMetadata) {
    String versionPropertyName = versionMetadata.getMappedName();
    long version = nativeEntity.getLong(versionPropertyName);
    return Entity.newBuilder(nativeEntity).set(versionPropertyName, ++version).build();
  }
41940
public final Version version() {
        return new Version(bundle.getVersion().getMajor(), bundle.getVersion().getMinor(),
                bundle.getVersion().getMicro(), null, null, null);
    }
1276449
private void initVersion() {
        VersionValues ver = getServiceContext().getRequestVersion();
        VersionValues configVer = getServiceContext().getHttpConfig().getOutgoingVersion();
        if (VersionValues.V10.equals(configVer) && VersionValues.V11.equals(ver)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Configuration forcing 1.0 instead of 1.1");
            }
            setVersion(configVer);
        } else {
            setVersion(ver);
        }
    }
1045540
public SipServletRequest createRequest(SipServletRequest origRequest) {
        final SipServletRequestImpl newSipServletRequest = (SipServletRequestImpl) sipFactoryImpl.createRequest(origRequest, false);
        final SipServletRequestImpl origRequestImpl = (SipServletRequestImpl) origRequest;

        final MobicentsSipSession originalSession = origRequestImpl.getSipSession();
        final MobicentsSipSession session = newSipServletRequest.getSipSession();
        // B2buaHelperTest.testLinkSipSessions101 assumes the sessions shouldn't be linked together
//		sessionMap.put(originalSession.getKey(), session.getKey());
//		sessionMap.put(session.getKey(), originalSession.getKey());
//		dumpLinkedSessions();

//		linkedRequestMap.put(newSipServletRequest, origRequestImpl);
//		linkedRequestMap.put(origRequestImpl, newSipServletRequest);
        session.setB2buaHelper(this);
        originalSession.setB2buaHelper(this);
        setOriginalRequest(session, newSipServletRequest);
        dumpAppSession(session);
        return newSipServletRequest;
    }
837616
private GenericQueryRequest createN1qlRequest(final N1qlQuery query, String bucket, String username, String password,
            InetAddress targetNode) {
        String rawQuery = query.n1ql().toString();
        rawQuery = rawQuery.replaceAll(
          CouchbaseAsyncBucket.CURRENT_BUCKET_IDENTIFIER,
          "`" + bucket + "`"
        );
        String statement = query.statement().toString();
        if (targetNode != null) {
            return GenericQueryRequest.jsonQuery(rawQuery, bucket, username, password, targetNode,
                query.params().clientContextId(), statement);
        } else {
            return GenericQueryRequest.jsonQuery(rawQuery, bucket, username, password,
                query.params().clientContextId(), statement);
        }
    }
508006
public T requestInstance() {
		T a;
		if( unused.size() > 0 ) {
			a = unused.pop();
		} else {
			a = createInstance();
		}
		return a;
	}