/*
Create a new Identity

@param label  text label to tag the identity with
@param active whether the identity is active
@param master if the identity is a master identity
@return Newly created Identity
767223
public FutureData<Identity> create(String label, boolean active, boolean master) {
        if (label == null || label.isEmpty()) {
            throw new IllegalArgumentException("A label is required");
        }
        String activeStr = active ? "active" : "disabled";
        FutureData<Identity> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(IDENTITY));
        try {
            Request request = config.http()
                    .postJSON(uri, new PageReader(newRequestCallback(future, new Identity(), config)))
                    .setData(new NewIdentity(label, activeStr, master));
            performRequest(future, request);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }
        return future;
    }
340334
public void setLabel(java.lang.String label) {
        getStateHelper().put(PropertyKeys.label, label);
    }
1248835
protected Label newActionLinkLabel(final String id, final IModel<String> model)
	{
		final Label label = ComponentFactory.newLabel(id, model);
		return label;
	}
1252394
public static Option create(String value, String label, boolean isSelected)
	{
		Option _result = new Option();
		_result.setValue(value);
		_result.setLabel(label);
		_result.setSelected(isSelected);
		return _result;
	}
474329
public void setLabel(String label) {
		final boolean entryExitLogging = log.isLoggable(Level.FINER);
		final String methodName = "setLabel"; //$NON-NLS-1$
		if (entryExitLogging) {
			log.entering(DependencyList.class.getName(), methodName, new Object[]{label});
		}
		this.label = label;
		if (entryExitLogging) {
			log.exiting(DependencyList.class.getName(), methodName);
		}
	}
1232146
@Override
  public void createIdentityLinkComment(String taskId, String userId, String groupId, String type, boolean create) {
    createIdentityLinkComment(taskId, userId, groupId, type, create, false);
  }
149198
@VisibleForTesting
  static LabelDescriptor createLabelDescriptor(LabelKey labelKey) {
    LabelDescriptor.Builder builder = LabelDescriptor.newBuilder();
    builder.setKey(labelKey.getKey());
    builder.setDescription(labelKey.getDescription());
    // Now we only support String tags
    builder.setValueType(ValueType.STRING);
    return builder.build();
  }
1135909
public static TransactionException invalidLabelStart(Label label) {
        return create(String.format("Cannot create a label {%s} starting with character {%s} as it is a reserved starting character", label, Schema.ImplicitType.RESERVED.getValue()));
    }
979429
public Optional<Label> createLabel(String monitorId, Label label)
    {
        HTTP.POST(String.format("/v1/monitors/%s/labels", monitorId), label.getKey());
        return Optional.of(label);
    }
884384
private Label getOrCreateLabel(final String name) {

		Label label = labelCache.get(name);
		if (label == null) {

			label = new LabelImpl(name);
			labelCache.put(name, label);
		}

		return label;
	}
1022816
protected Label createLabel(Composite parent, String text)
	{
		return SWTFactory.createLabel(parent, text, 1);
	}
279994
def new_tag(self, label, cfrom=-1, cto=-1, tagtype='', **kwargs):
        '''  '''
        tag_obj = Tag(label, cfrom, cto, tagtype=tagtype, **kwargs)
        return self.add_tag(tag_obj)
766838
public static IAction createAction(String label, String script) {
        return new Action(script, label, script);
    }
764392
protected Label newAddTabButtonLabel(final String id, final IModel<String> model)
	{
		return ComponentFactory.newLabel(id, model);
	}
1029132
public Label createLabel(BaseComponent parent, Object value, String prefix) {
        return createLabel(parent, value, prefix, null);
    }
66981
public GitlabLabel createLabel(Serializable projectId, GitlabLabel label)
            throws IOException {
        String name = label.getName();
        String color = label.getColor();
        return createLabel(projectId, name, color);
    }
140049
public static Label newLabel (String text, String... styles)
    {
        return setStyleNames(new Label(text), styles);
    }