Java 类com.google.protobuf.DescriptorProtos.ServiceOptions 实例源码

项目:api-compiler    文件:ProtoApiFromOpenApi.java   
public void addFromSwagger(Service.Builder serviceBuilder, Swagger swagger) {
  Map<String, String> duplicateOperationIdLookup = Maps.newHashMap();
  TreeSet<String> urlPaths = Sets.newTreeSet(swagger.getPaths().keySet());
  for (String urlPath : urlPaths) {
    Path pathObj = swagger.getPath(urlPath);
    createServiceMethodsFromPath(serviceBuilder, urlPath, pathObj, duplicateOperationIdLookup);
  }

  if (isAllowAllMethodsConfigured(swagger, diagCollector)) {
    Path userDefinedWildCardPathObject = new Path();
    if (urlPaths.contains(OpenApiUtils.WILDCARD_URL_PATH)) {
      userDefinedWildCardPathObject = swagger.getPath(OpenApiUtils.WILDCARD_URL_PATH);
    }
    createServiceMethodsFromPath(
        serviceBuilder,
        OpenApiUtils.WILDCARD_URL_PATH,
        getNewWildCardPathObject(userDefinedWildCardPathObject),
        duplicateOperationIdLookup);
  }

  coreApiBuilder.setVersion(swagger.getInfo().getVersion());
  if (isDeprecated(swagger)) {
    coreApiBuilder.addOptions(
        createBoolOption(
            ServiceOptions.getDescriptor()
                .findFieldByNumber(ServiceOptions.DEPRECATED_FIELD_NUMBER)
                .getFullName(),
            true));
  }
  serviceBuilder.addApis(coreApiBuilder);
}
项目:api-compiler    文件:DescriptorGenerator.java   
private ServiceOptions generateServiceOptions(Api api) {
  ServiceOptions.Builder serviceOptionsBuilder = ServiceOptions.newBuilder();
  setOptions(serviceOptionsBuilder, api.getOptionsList(), SERVICE_OPTION_NAME_PREFIX);
  return serviceOptionsBuilder.build();
}
项目:play-store-api    文件:Descriptors.java   
/** Get the {@code ServiceOptions}, defined in {@code descriptor.proto}. */
public ServiceOptions getOptions() { return proto.getOptions(); }
项目:Beam    文件:Descriptors.java   
/**
 * Get the {@code ServiceOptions}, defined in {@code descriptor.proto}.
 */
public ServiceOptions getOptions () {
    return proto.getOptions ();
}
项目:protobuf-el    文件:Scopes.java   
public ServiceOptions.Builder getServiceOptions() {
  return currentScope.getServiceOptions();
}
项目:protobuf-el    文件:Scopes.java   
protected ServiceOptions.Builder getServiceOptions() {
  throw new RuntimeException(NOT_APPLICABLE_IN_CURRENT_SCOPE);
}
项目:protobuf-el    文件:Scopes.java   
@Override
protected ServiceOptions.Builder getServiceOptions() {
  return protoBuilder.getOptionsBuilder();
}