Used to create a new indefinite retention policy.
@param api the API connection to be used by the created user.
@param name the name of the retention policy.
@return the created retention policy's info.
495961
public static BoxRetentionPolicy.Info createIndefinitePolicy(BoxAPIConnection api, String name) {
        return createRetentionPolicy(api, name, TYPE_INDEFINITE, 0, ACTION_REMOVE_RETENTION);
    }
1356015
public Bucket setRetentionPolicy(String bucketName, Long retentionPeriod)
      throws StorageException {
    // [START storage_set_retention_policy]
    // Instantiate a Google Cloud Storage client
    Storage storage = StorageOptions.getDefaultInstance().getService();

    // The name of a bucket, e.g. "my-bucket"
    // String bucketName = "my-bucket";

    // The retention period for objects in bucket
    // Long retentionPeriod = 3600L; // 1 hour in seconds

    Bucket bucketWithRetentionPolicy =
        storage.update(
            BucketInfo.newBuilder(bucketName).setRetentionPeriod(retentionPeriod).build());

    System.out.println(
        "Retention period for "
            + bucketName
            + " is now "
            + bucketWithRetentionPolicy.getRetentionPeriod());
    // [END storage_set_retention_policy]
    return bucketWithRetentionPolicy;
  }
473628
public RequestLimitRule withName(String name) {
        return new RequestLimitRule(this.durationSeconds, this.limit, this.precision, name, this.keys);
    }
1336474
public static authenticationtacacspolicy_binding get(nitro_service service, String name) throws Exception{
		authenticationtacacspolicy_binding obj = new authenticationtacacspolicy_binding();
		obj.set_name(name);
		authenticationtacacspolicy_binding response = (authenticationtacacspolicy_binding) obj.get_resource(service);
		return response;
	}
162549
public void addPolicy(final Enum name, final ExpirationPolicy policy) {
        LOGGER.trace("Adding expiration policy [{}] with name [{}]", policy, name);
        addPolicy(name.name(), policy);
    }
289851
@MemberOrder(sequence = "2")
    public DevUtilsDemoObject create(
            @ParameterLayout(named="Name") final String name) {
        final DevUtilsDemoObject obj = container.newTransientInstance(DevUtilsDemoObject.class);
        obj.setName(name);
        container.persistIfNotAlready(obj);
        return obj;
    }
891312
public static vpnsessionpolicy_binding get(nitro_service service, String name) throws Exception{
		vpnsessionpolicy_binding obj = new vpnsessionpolicy_binding();
		obj.set_name(name);
		vpnsessionpolicy_binding response = (vpnsessionpolicy_binding) obj.get_resource(service);
		return response;
	}
1163544
@DELETE
    @Path("/{name}")
    public Response delete(@Auth final DbCredential credential, @PathParam("name") final String name){
        if(!credential.getRoles().contains(DbCredential.AvailableRoles.DATA_DELETER)){
            throw new WebApplicationException(Response.status(Response.Status.UNAUTHORIZED).build());
        }

        LOG.info("Got a delete organization request.");
        getOrganizationHandler().deleteOrganization(name);

        return Response.ok("done").build();
    }
757757
def retention_policy_get(database,
                         name,
                         user=None,
                         password=None,
                         host=None,
                         port=None):
    '''
    
    '''
    client = _client(user=user, password=password, host=host, port=port)

    for policy in client.get_list_retention_policies(database):
        if policy['name'] == name:
            return policy

    return None
184940
public App named(String name) {
        App newApp = copy();
        newApp.name = name;
        return newApp;
    }
502911
public static scpolicy get(nitro_service service, String name) throws Exception{
		scpolicy obj = new scpolicy();
		obj.set_name(name);
		scpolicy response = (scpolicy) obj.get_resource(service);
		return response;
	}
148798
public static rewritepolicy_rewritepolicylabel_binding[] get(nitro_service service, String name) throws Exception{
		rewritepolicy_rewritepolicylabel_binding obj = new rewritepolicy_rewritepolicylabel_binding();
		obj.set_name(name);
		rewritepolicy_rewritepolicylabel_binding response[] = (rewritepolicy_rewritepolicylabel_binding[]) obj.get_resources(service);
		return response;
	}
416847
@Override
    public Query createNamedQuery(String name)
    {
        try
        {
            return ivEm.createNamedQuery(name);
        } finally
        {
            if (!inJTATransaction())
            {
                ivEm.clear();
            }
        }
    }
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;
	}
23961
public static authenticationnegotiatepolicy_binding get(nitro_service service, String name) throws Exception{
		authenticationnegotiatepolicy_binding obj = new authenticationnegotiatepolicy_binding();
		obj.set_name(name);
		authenticationnegotiatepolicy_binding response = (authenticationnegotiatepolicy_binding) obj.get_resource(service);
		return response;
	}
272889
public static authorizationpolicy_binding get(nitro_service service, String name) throws Exception{
		authorizationpolicy_binding obj = new authorizationpolicy_binding();
		obj.set_name(name);
		authorizationpolicy_binding response = (authorizationpolicy_binding) obj.get_resource(service);
		return response;
	}
683920
Parameter getCreateParameter(String name) {
		if (this.parameters == null)
			this.parameters = new HashMap<String, Parameter>();
		Parameter param = this.parameters.get(name);
		if (param == null) {
			param = new Parameter(name);
			this.parameters.put(name, param);
		}
		return param;
	}