<p>Creates options for sharing a link with other Applications. Creates a link with given attributes and shares with the
user selected clients.</p>

@param builder A {@link io.branch.referral.Branch.ShareLinkBuilder} instance to build share link.
425552
private void shareLink(ShareLinkBuilder builder) {
        //Cancel any existing sharing in progress.
        if (shareLinkManager_ != null) {
            shareLinkManager_.cancelShareLinkDialog(true);
        }
        shareLinkManager_ = new ShareLinkManager();
        shareLinkManager_.shareLink(builder);
    }
378402
@Override
    public synchronized Builder create(String builderConfigId) throws InvalidBuilderException {
        if (builderConfigId == null || builderConfigId.isEmpty()) {
            String err = Tr.formatMessage(tc, "JWT_BUILDER_INVALID", new Object[] { builderConfigId });
            throw new InvalidBuilderException(err);
        }
        if (!active) {
            String err = Tr.formatMessage(tc, "JWT_BUILDER_NOT_ACTIVE", new Object[] { builderConfigId });
            throw new InvalidBuilderException(err);
        }

        // Tr.error(tc, "JWT_BUILDER_NOT_ACTIVE", new Object[] { builderConfigId
        // });
        // return null;
        return new BuilderImpl(builderConfigId);
    }
86607
public DescriptionBuilder property(final Consumer<PropertyBuilder> builder) {
        PropertyBuilder propertyBuilder = PropertyBuilder.builder();
        builder.accept(propertyBuilder);
        replaceOrAddProperty(propertyBuilder.build());
        return this;
    }
640815
@RequestMapping(value = "builds/{buildId}/links", method = RequestMethod.GET)
    public Form getBuildLinkForm(@PathVariable ID buildId) {
        // Gets the form values
        List<BuildLinkFormItem> items = structureService.getBuildLinksFrom(structureService.getBuild(buildId))
                .stream()
                .map(build -> new BuildLinkFormItem(build.getProject().getName(), build.getName()))
                .collect(Collectors.toList());
        // Creates the form
        return Form.create()
                .with(
                        MultiForm.of(
                                "links",
                                Form.create()
                                        .with(Text.of("project").label("Project name"))
                                        .with(Text.of("build").label("Build name"))
                        )
                                .label("Links")
                                .value(items)
                );
    }
957172
public static CreateFileContext mergeFrom(CreateFilePOptions.Builder optionsBuilder) {
    CreateFilePOptions masterOptions =
        FileSystemOptions.createFileDefaults(ServerConfiguration.global());
    CreateFilePOptions.Builder mergedOptionsBuilder =
        masterOptions.toBuilder().mergeFrom(optionsBuilder.build());
    return new CreateFileContext(mergedOptionsBuilder);
  }
1329242
public static <R, C, V> Builder<R, C, V> builder() {
    return new Builder<R, C, V>();
  }
1296589
public <T extends AbstractGoogleJsonClient.Builder> T fromApplicationDefaultCredential(T builder) {
    Preconditions.checkNotNull(builder);
    return fromCredential(builder, CredentialFactory.getApplicationDefaultCredential());
  }
163802
public static GsonBuilder registerInstant(GsonBuilder builder)
  {
    if (builder == null) { throw new NullPointerException("builder cannot be null"); }

    builder.registerTypeAdapter(INSTANT_TYPE, new InstantConverter());

    return builder;
  }
1234182
protected function defineLinks(NodeBuilder $builder)
    {
        $builder->arrayNode('links')
            ->useAttributeAsKey('')
            ->prototype('array')
            ->children()

            ->scalarNode('resource')
                ->isRequired()
                ->cannotBeEmpty()
            ->end()

            ->arrayNode('parameters')
                ->prototype('scalar')->end()
            ->end()

            ->arrayNode('metadata')
                ->prototype('scalar')->end()
            ->end();
    }
3270
public Builder newBuilder(String link) {
        Builder builder = new Builder();
        Builder.ParseResult result = builder.parse(this, link);
        return result == Builder.ParseResult.SUCCESS ? builder : null;
    }
1203748
public static @NonNull GsonBuilder populate(final @NonNull GsonBuilder builder) {
    builder
      .registerTypeHierarchyAdapter(Component.class, INSTANCE)
      .registerTypeAdapter(ClickEvent.Action.class, new NameMapSerializer<>("click action", ClickEvent.Action.NAMES))
      .registerTypeAdapter(HoverEvent.Action.class, new NameMapSerializer<>("hover action", HoverEvent.Action.NAMES))
      .registerTypeAdapter(TextColorWrapper.class, new TextColorWrapper.Serializer())
      .registerTypeAdapter(TextColor.class, new NameMapSerializer<>("text color", TextColor.NAMES))
      .registerTypeAdapter(TextDecoration.class, new NameMapSerializer<>("text decoration", TextDecoration.NAMES));
    return builder;
  }
65835
@RequestMapping(value = "builds/{buildId}/links", method = RequestMethod.PUT)
    public Build createBuildLinkFromForm(@PathVariable ID buildId, @RequestBody BuildLinkForm form) {
        Build build = structureService.getBuild(buildId);
        structureService.editBuildLinks(build, form);
        return build;
    }
92939
public <T> T getClient(ClientBuilder<T> clientBuilder) {

        JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
        proxyFactory.setServiceClass(clientBuilder.getServiceClass());
        proxyFactory.setAddress(clientBuilder.getAddress());

        // JAX-WS handlers
        if (clientBuilder.getHandlers() != null) {
            for (Handler h : clientBuilder.getHandlers()) {
                proxyFactory.getHandlers().add(h);
            }
        }

        // ClientProxyFactoryBean bindingId
        if (clientBuilder.getBindingId() != null) {
            proxyFactory.setBindingId(clientBuilder.getBindingId());
        }

        // CXF interceptors
        if (clientBuilder.getCxfInInterceptors() != null) {
            proxyFactory.getInInterceptors().addAll(clientBuilder.getCxfInInterceptors());
        }
        if (clientBuilder.getCxfInFaultInterceptors() != null) {
            proxyFactory.getInFaultInterceptors().addAll(clientBuilder.getCxfInFaultInterceptors());
        }
        if (clientBuilder.getCxfOutInterceptors() != null) {
            proxyFactory.getOutInterceptors().addAll(clientBuilder.getCxfOutInterceptors());
        }
        if (clientBuilder.getCxfOutFaultInterceptors() != null) {
            proxyFactory.getOutFaultInterceptors().addAll(clientBuilder.getCxfOutFaultInterceptors());
        }

        T proxy = clientBuilder.getServiceClass().cast(proxyFactory.create());

        // MTOM support
        if (clientBuilder.isMtomEnabled()) {
            BindingProvider bp = (BindingProvider)proxy;
            SOAPBinding binding = (SOAPBinding)bp.getBinding();
            binding.setMTOMEnabled(true);
        }

        HTTPConduit http = (HTTPConduit)ClientProxy.getClient(proxy).getConduit();
        HTTPClientPolicy client = http.getClient();
        client.setConnectionTimeout(clientBuilder.getConnectTimeout());
        client.setReceiveTimeout(clientBuilder.getReceiveTimeout());

        return proxy;
    }
929318
public Datatype.Builder setBuilder(Type builder) {
    this.builder = Objects.requireNonNull(builder);
    _unsetProperties.remove(Property.BUILDER);
    return (Datatype.Builder) this;
  }
749599
@Beta
  public Builder toBuilder() {
    Builder builder = new GoogleCredential.Builder()
        .setServiceAccountPrivateKey(serviceAccountPrivateKey)
        .setServiceAccountPrivateKeyId(serviceAccountPrivateKeyId)
        .setServiceAccountId(serviceAccountId)
        .setServiceAccountProjectId(serviceAccountProjectId)
        .setServiceAccountUser(serviceAccountUser)
        .setServiceAccountScopes(serviceAccountScopes)
        .setTokenServerEncodedUrl(getTokenServerEncodedUrl())
        .setTransport(getTransport())
        .setJsonFactory(getJsonFactory())
        .setClock(getClock());

    builder.setClientAuthentication(getClientAuthentication());

    return builder;
  }
26419
public BuildableType.Builder mergeBuilder(MergeBuilderMethod mergeBuilder) {
    this.mergeBuilder = Objects.requireNonNull(mergeBuilder);
    _unsetProperties.remove(Property.MERGE_BUILDER);
    return (BuildableType.Builder) this;
  }
915607
@VisibleForTesting
  static BucketOptions createBucketOptions(
      @javax.annotation.Nullable
          io.opencensus.metrics.export.Distribution.BucketOptions bucketOptions) {
    final BucketOptions.Builder builder = BucketOptions.newBuilder();
    if (bucketOptions == null) {
      return builder.build();
    }

    return bucketOptions.match(
        bucketOptionsExplicitFunction, Functions.<BucketOptions>throwIllegalArgumentException());
  }