Creates a builder for the FlowSpec based on values in a flow properties config.
175617
public static FlowSpec.Builder builder(URI catalogURI, Properties flowProps) {
    String name = flowProps.getProperty(ConfigurationKeys.FLOW_NAME_KEY);
    String group = flowProps.getProperty(ConfigurationKeys.FLOW_GROUP_KEY, "default");

    try {
      URI flowURI = new URI(catalogURI.getScheme(), catalogURI.getAuthority(),
          "/" + group + "/" + name, null);
      FlowSpec.Builder builder = new FlowSpec.Builder(flowURI).withConfigAsProperties(flowProps);
      String descr = flowProps.getProperty(ConfigurationKeys.FLOW_DESCRIPTION_KEY, null);
      if (null != descr) {
        builder = builder.withDescription(descr);
      }

      return builder;
    } catch (URISyntaxException e) {
      throw new RuntimeException("Unable to create a FlowSpec URI: " + e, e);
    }
  }
1128301
@Nonnull
	public static LFltToCharFunction fltToCharFunctionFrom(Consumer<LFltToCharFunctionBuilder> buildingFunction) {
		LFltToCharFunctionBuilder builder = new LFltToCharFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1290560
@Nonnull
	public static Runnable actionFrom(Consumer<RunnableBuilder> buildingFunction) {
		RunnableBuilder builder = new RunnableBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
410327
@CheckReturnValue
  public static <ReqT, RespT> Builder<ReqT, RespT> newBuilder() {
    return newBuilder(null, null);
  }
599657
@Nonnull
	public static LFltIntConsumer fltIntConsumerFrom(Consumer<LFltIntConsumerBuilder> buildingFunction) {
		LFltIntConsumerBuilder builder = new LFltIntConsumerBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
258177
@Nonnull
	public static <T1, T2, R> LBiObjBoolFunction<T1, T2, R> biObjBoolFunctionFrom(Consumer<LBiObjBoolFunctionBuilder<T1, T2, R>> buildingFunction) {
		LBiObjBoolFunctionBuilder builder = new LBiObjBoolFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
7481
@Nonnull
	public static LBoolSupplier boolSupplierFrom(Consumer<LBoolSupplierBuilder> buildingFunction) {
		LBoolSupplierBuilder builder = new LBoolSupplierBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1264414
@Nonnull
	public static <R> LBiBoolFunction<R> biBoolFunctionFrom(Consumer<LBiBoolFunctionBuilder<R>> buildingFunction) {
		LBiBoolFunctionBuilder builder = new LBiBoolFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
774928
@Nonnull
	public static <T1, T2> LBiObjIntConsumer<T1, T2> biObjIntConsumerFrom(Consumer<LBiObjIntConsumerBuilder<T1, T2>> buildingFunction) {
		LBiObjIntConsumerBuilder builder = new LBiObjIntConsumerBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
90392
public static Builder builder() {
    return new AutoValue_BeadledomClientConfiguration.Builder()
        .connectionPoolSize(DEFAULT_CONNECTION_POOL_SIZE)
        .maxPooledPerRouteSize(DEFAULT_MAX_POOLED_PER_ROUTE)
        .socketTimeoutMillis(DEFAULT_SOCKET_TIMEOUT_MILLIS)
        .connectionTimeoutMillis(DEFAULT_CONNECTION_TIMEOUT_MILLIS)
        .ttlMillis(DEFAULT_TTL_MILLIS);
  }
677440
@Nonnull
	public static <T> LObjIntDblPredicate<T> objIntDblPredicateFrom(Consumer<LObjIntDblPredicateBuilder<T>> buildingFunction) {
		LObjIntDblPredicateBuilder builder = new LObjIntDblPredicateBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
722802
@Nonnull
	public static LByteToDblFunction byteToDblFunctionFrom(Consumer<LByteToDblFunctionBuilder> buildingFunction) {
		LByteToDblFunctionBuilder builder = new LByteToDblFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
611606
def build(self, builder):
        
        params = {}

        # Add in the transaction type
        if self.transaction_type is not None:
            params["TransactionType"] = self.transaction_type

        if self.seqnum is None:
            # SeqNum is not optional (and defaulted)
            raise ValueError("SeqNum is not set.")  # pragma: no cover
        params["SeqNum"] = str(self.seqnum)

        if self.annotation_id is not None:
            # If an Annotation is contained with an Annotations element,
            # the ID attribute is required.
            params["ID"] = self.annotation_id

        builder.start("Annotation", params)

        if self.flags in (None, []):
            raise ValueError('Flag is not set.')

        # populate the flags
        for flag in self.flags:
            flag.build(builder)

        # add the Comment, if it exists
        if self.comment is not None:
            self.comment.build(builder)

        builder.end("Annotation")
191194
@Nonnull
	public static BooleanSupplier boolSupplierFrom(Consumer<BooleanSupplierBuilder> buildingFunction) {
		BooleanSupplierBuilder builder = new BooleanSupplierBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
6531
@Nonnull
	public static <T, R> LObjIntCharFunction<T, R> objIntCharFunctionFrom(Consumer<LObjIntCharFunctionBuilder<T, R>> buildingFunction) {
		LObjIntCharFunctionBuilder builder = new LObjIntCharFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
966714
def build(self, builder):
        """"""
        params = dict(SoftHard=self.soft_hard.value, Comparator=self.comparator.value)
        builder.start("RangeCheck", params)
        if self.check_value is not None:
            self.check_value.build(builder)
        if self.measurement_unit_ref is not None:
            self.measurement_unit_ref.build(builder)
        builder.end("RangeCheck")
162092
protected JobSpec jobSpecGenerator(FlowSpec flowSpec) {
    JobSpec jobSpec;
    JobSpec.Builder jobSpecBuilder = JobSpec.builder(jobSpecURIGenerator(flowSpec))
        .withConfig(flowSpec.getConfig())
        .withDescription(flowSpec.getDescription())
        .withVersion(flowSpec.getVersion());

    if (flowSpec.getTemplateURIs().isPresent() && templateCatalog.isPresent()) {
      // Only first template uri will be honored for Identity
      jobSpecBuilder = jobSpecBuilder.withTemplate(flowSpec.getTemplateURIs().get().iterator().next());
      try {
        jobSpec = new ResolvedJobSpec(jobSpecBuilder.build(), templateCatalog.get());
        log.info("Resolved JobSpec properties are: " + jobSpec.getConfigAsProperties());
      } catch (SpecNotFoundException | JobTemplate.TemplateException e) {
        throw new RuntimeException("Could not resolve template in JobSpec from TemplateCatalog", e);
      }
    } else {
      jobSpec = jobSpecBuilder.build();
      log.info("Unresolved JobSpec properties are: " + jobSpec.getConfigAsProperties());
    }

    // Remove schedule
    jobSpec.setConfig(jobSpec.getConfig().withoutPath(ConfigurationKeys.JOB_SCHEDULE_KEY));

    // Add job.name and job.group
    if (flowSpec.getConfig().hasPath(ConfigurationKeys.FLOW_NAME_KEY)) {
      jobSpec.setConfig(jobSpec.getConfig()
          .withValue(ConfigurationKeys.JOB_NAME_KEY, flowSpec.getConfig().getValue(ConfigurationKeys.FLOW_NAME_KEY)));
    }
    if (flowSpec.getConfig().hasPath(ConfigurationKeys.FLOW_GROUP_KEY)) {
      jobSpec.setConfig(jobSpec.getConfig()
          .withValue(ConfigurationKeys.JOB_GROUP_KEY, flowSpec.getConfig().getValue(ConfigurationKeys.FLOW_GROUP_KEY)));
    }

    // Add flow execution id for this compilation
    long flowExecutionId = FlowUtils.getOrCreateFlowExecutionId(flowSpec);
    jobSpec.setConfig(jobSpec.getConfig().withValue(ConfigurationKeys.FLOW_EXECUTION_ID_KEY,
        ConfigValueFactory.fromAnyRef(flowExecutionId)));

    // Reset properties in Spec from Config
    jobSpec.setConfigAsProperties(ConfigUtils.configToProperties(jobSpec.getConfig()));
    return jobSpec;
  }