com.softlayer.api.service.network.lbaas.L7Rule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of softlayer-api-client Show documentation
Show all versions of softlayer-api-client Show documentation
API client for accessing the SoftLayer API
The newest version!
package com.softlayer.api.service.network.lbaas;
import com.softlayer.api.ApiClient;
import com.softlayer.api.ResponseHandler;
import com.softlayer.api.annotation.ApiMethod;
import com.softlayer.api.annotation.ApiProperty;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.network.lbaas.LoadBalancer;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;
/**
* The SoftLayer_Network_LBaaS_L7Rule represents the Rules that can be attached to a a L7 policy.
*
* @see SoftLayer_Network_LBaaS_L7Rule
*/
@ApiType("SoftLayer_Network_LBaaS_L7Rule")
public class L7Rule extends Entity {
/**
* Comparision type for the Rule, It should any of the following values : REGEX, STARTS_WITH, ENDS_WITH, CONTAINS, EQUAL_TO.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String comparisonType;
public String getComparisonType() {
return comparisonType;
}
public void setComparisonType(String comparisonType) {
comparisonTypeSpecified = true;
this.comparisonType = comparisonType;
}
protected boolean comparisonTypeSpecified;
public boolean isComparisonTypeSpecified() {
return comparisonTypeSpecified;
}
public void unsetComparisonType() {
comparisonType = null;
comparisonTypeSpecified = false;
}
/**
* Specifies when a Rule was created
*/
@ApiProperty(canBeNullOrNotSet = true)
protected GregorianCalendar createDate;
public GregorianCalendar getCreateDate() {
return createDate;
}
public void setCreateDate(GregorianCalendar createDate) {
createDateSpecified = true;
this.createDate = createDate;
}
protected boolean createDateSpecified;
public boolean isCreateDateSpecified() {
return createDateSpecified;
}
public void unsetCreateDate() {
createDate = null;
createDateSpecified = false;
}
/**
* The ID of a Rule.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
idSpecified = true;
this.id = id;
}
protected boolean idSpecified;
public boolean isIdSpecified() {
return idSpecified;
}
public void unsetId() {
id = null;
idSpecified = false;
}
/**
* Inverts the result of the value if set, i.e. True will be inverted to False and vice-versa
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long invert;
public Long getInvert() {
return invert;
}
public void setInvert(Long invert) {
invertSpecified = true;
this.invert = invert;
}
protected boolean invertSpecified;
public boolean isInvertSpecified() {
return invertSpecified;
}
public void unsetInvert() {
invert = null;
invertSpecified = false;
}
/**
* Key for Rule type HEADER and COOKIE.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String key;
public String getKey() {
return key;
}
public void setKey(String key) {
keySpecified = true;
this.key = key;
}
protected boolean keySpecified;
public boolean isKeySpecified() {
return keySpecified;
}
public void unsetKey() {
key = null;
keySpecified = false;
}
/**
* Specifies when a Rule was updated previously.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected GregorianCalendar modifyDate;
public GregorianCalendar getModifyDate() {
return modifyDate;
}
public void setModifyDate(GregorianCalendar modifyDate) {
modifyDateSpecified = true;
this.modifyDate = modifyDate;
}
protected boolean modifyDateSpecified;
public boolean isModifyDateSpecified() {
return modifyDateSpecified;
}
public void unsetModifyDate() {
modifyDate = null;
modifyDateSpecified = false;
}
/**
* Type of the Rule. It should have any of the following values: HOST_NAME, FILE_TYPE, HEADER, COOKIE, PATH.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String type;
public String getType() {
return type;
}
public void setType(String type) {
typeSpecified = true;
this.type = type;
}
protected boolean typeSpecified;
public boolean isTypeSpecified() {
return typeSpecified;
}
public void unsetType() {
type = null;
typeSpecified = false;
}
/**
* The UUID of a Rule.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String uuid;
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
uuidSpecified = true;
this.uuid = uuid;
}
protected boolean uuidSpecified;
public boolean isUuidSpecified() {
return uuidSpecified;
}
public void unsetUuid() {
uuid = null;
uuidSpecified = false;
}
/**
* Value for Rule . For type HEADER and COOKIE, this value is compared against the value of the key from HEADER or COOKIE.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String value;
public String getValue() {
return value;
}
public void setValue(String value) {
valueSpecified = true;
this.value = value;
}
protected boolean valueSpecified;
public boolean isValueSpecified() {
return valueSpecified;
}
public void unsetValue() {
value = null;
valueSpecified = false;
}
public Service asService(ApiClient client) {
return service(client, id);
}
public static Service service(ApiClient client) {
return client.createService(Service.class, null);
}
public static Service service(ApiClient client, Long id) {
return client.createService(Service.class, id == null ? null : id.toString());
}
/**
* The SoftLayer_Network_LBaaS_L7Rule service allows consumers to manage the Rules associated with a Policy.Polices have multiple rules, each rule is evaluated to true or false. If all the rules of the policies are evaluated to true then action of that policy will be applied to the request. Rules have types, which can be HOST_NAME, FILE_TYPE, HEADER, COOKIE, PATH and rules also have a comparison type which indicates how how rules are evaluated. Rules can have following comparison types: REGEX, STARTS_WITH, ENDS_WITH, CONTAINS, and EQUAL_TO.
*
* @see SoftLayer_Network_LBaaS_L7Rule
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Network_LBaaS_L7Rule")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* This function creates and adds multiple Rules to a given L7 policy with all the details provided for rules
*
* @see SoftLayer_Network_LBaaS_L7Rule::addL7Rules
*/
@ApiMethod
public LoadBalancer addL7Rules(String policyUuid, List rules);
/**
* This function deletes multiple rules aassociated with the same policy.
*
* @see SoftLayer_Network_LBaaS_L7Rule::deleteL7Rules
*/
@ApiMethod
public LoadBalancer deleteL7Rules(String policyUuid, List ruleUuids);
/**
* @see SoftLayer_Network_LBaaS_L7Rule::getObject
*/
@ApiMethod(instanceRequired = true)
public L7Rule getObject();
/**
* This function updates multiple Rules to a given policy with all the details for rules.
*
* @see SoftLayer_Network_LBaaS_L7Rule::updateL7Rules
*/
@ApiMethod
public LoadBalancer updateL7Rules(String policyUuid, List rules);
}
public static interface ServiceAsync extends com.softlayer.api.ServiceAsync {
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Async version of {@link Service#addL7Rules}
*/
public Future addL7Rules(String policyUuid, List rules);
public Future> addL7Rules(String policyUuid, List rules, ResponseHandler callback);
/**
* Async version of {@link Service#deleteL7Rules}
*/
public Future deleteL7Rules(String policyUuid, List ruleUuids);
public Future> deleteL7Rules(String policyUuid, List ruleUuids, ResponseHandler callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#updateL7Rules}
*/
public Future updateL7Rules(String policyUuid, List rules);
public Future> updateL7Rules(String policyUuid, List rules, ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public Mask comparisonType() {
withLocalProperty("comparisonType");
return this;
}
public Mask createDate() {
withLocalProperty("createDate");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask invert() {
withLocalProperty("invert");
return this;
}
public Mask key() {
withLocalProperty("key");
return this;
}
public Mask modifyDate() {
withLocalProperty("modifyDate");
return this;
}
public Mask type() {
withLocalProperty("type");
return this;
}
public Mask uuid() {
withLocalProperty("uuid");
return this;
}
public Mask value() {
withLocalProperty("value");
return this;
}
}
}