com.softlayer.api.service.product.item.Rule 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.product.item;
import com.softlayer.api.annotation.ApiProperty;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.product.Package;
import com.softlayer.api.service.product.item.rule.Resource;
import com.softlayer.api.service.product.item.rule.Type;
import com.softlayer.api.service.product.item.rule.resource.Item;
import com.softlayer.api.service.product.item.rule.resource.Location;
import com.softlayer.api.service.product.item.rule.resource.Permission;
import com.softlayer.api.service.product.item.rule.resource.item.Category;
import java.util.ArrayList;
import java.util.List;
/**
* The item rule data type represents a rule that must be followed when the item assigned to the rule is ordered. The type and operation applied to the resources of the rule will affect how the rule is checked during ordering.
*
* @see SoftLayer_Product_Item_Rule
*/
@ApiType("SoftLayer_Product_Item_Rule")
public class Rule extends Entity {
/**
* The product item that a rule applies to.
*/
@ApiProperty
protected com.softlayer.api.service.product.Item item;
public com.softlayer.api.service.product.Item getItem() {
return item;
}
public void setItem(com.softlayer.api.service.product.Item item) {
this.item = item;
}
@ApiProperty
protected List itemCategoryResources;
public List getItemCategoryResources() {
if (itemCategoryResources == null) {
itemCategoryResources = new ArrayList();
}
return itemCategoryResources;
}
@ApiProperty
protected List- itemResources;
public List
- getItemResources() {
if (itemResources == null) {
itemResources = new ArrayList
- ();
}
return itemResources;
}
@ApiProperty
protected List
locationResources;
public List getLocationResources() {
if (locationResources == null) {
locationResources = new ArrayList();
}
return locationResources;
}
/**
* The package that a rule is applicable to when ordering. If no package exists, the rule applies to any package.
*/
@ApiProperty("package")
protected Package rulePackage;
public Package getRulePackage() {
return rulePackage;
}
public void setRulePackage(Package rulePackage) {
this.rulePackage = rulePackage;
}
@ApiProperty
protected List permissionResources;
public List getPermissionResources() {
if (permissionResources == null) {
permissionResources = new ArrayList();
}
return permissionResources;
}
/**
* Resources for this rule that are validated when ordering.
*/
@ApiProperty
protected List resources;
public List getResources() {
if (resources == null) {
resources = new ArrayList();
}
return resources;
}
/**
* The type a rule is. The type affects how the rule is validated when ordering.
*/
@ApiProperty
protected Type type;
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
/**
* The unique identifier of the item that the rule applies to.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long itemId;
public Long getItemId() {
return itemId;
}
public void setItemId(Long itemId) {
itemIdSpecified = true;
this.itemId = itemId;
}
protected boolean itemIdSpecified;
public boolean isItemIdSpecified() {
return itemIdSpecified;
}
public void unsetItemId() {
itemId = null;
itemIdSpecified = false;
}
/**
* An optional message shown for when the rule is found to be invalid when ordering.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
messageSpecified = true;
this.message = message;
}
protected boolean messageSpecified;
public boolean isMessageSpecified() {
return messageSpecified;
}
public void unsetMessage() {
message = null;
messageSpecified = false;
}
@ApiProperty(canBeNullOrNotSet = true)
protected String operation;
public String getOperation() {
return operation;
}
public void setOperation(String operation) {
operationSpecified = true;
this.operation = operation;
}
protected boolean operationSpecified;
public boolean isOperationSpecified() {
return operationSpecified;
}
public void unsetOperation() {
operation = null;
operationSpecified = false;
}
/**
* The unique identifier of the service offering that is associated with the rule.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long packageId;
public Long getPackageId() {
return packageId;
}
public void setPackageId(Long packageId) {
packageIdSpecified = true;
this.packageId = packageId;
}
protected boolean packageIdSpecified;
public boolean isPackageIdSpecified() {
return packageIdSpecified;
}
public void unsetPackageId() {
packageId = null;
packageIdSpecified = false;
}
/**
* The unique identifier of the type of resource rule.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long typeId;
public Long getTypeId() {
return typeId;
}
public void setTypeId(Long typeId) {
typeIdSpecified = true;
this.typeId = typeId;
}
protected boolean typeIdSpecified;
public boolean isTypeIdSpecified() {
return typeIdSpecified;
}
public void unsetTypeId() {
typeId = null;
typeIdSpecified = false;
}
/**
* A count of
*/
@ApiProperty
protected Long itemCategoryResourceCount;
public Long getItemCategoryResourceCount() {
return itemCategoryResourceCount;
}
public void setItemCategoryResourceCount(Long itemCategoryResourceCount) {
this.itemCategoryResourceCount = itemCategoryResourceCount;
}
/**
* A count of
*/
@ApiProperty
protected Long itemResourceCount;
public Long getItemResourceCount() {
return itemResourceCount;
}
public void setItemResourceCount(Long itemResourceCount) {
this.itemResourceCount = itemResourceCount;
}
/**
* A count of
*/
@ApiProperty
protected Long locationResourceCount;
public Long getLocationResourceCount() {
return locationResourceCount;
}
public void setLocationResourceCount(Long locationResourceCount) {
this.locationResourceCount = locationResourceCount;
}
/**
* A count of
*/
@ApiProperty
protected Long permissionResourceCount;
public Long getPermissionResourceCount() {
return permissionResourceCount;
}
public void setPermissionResourceCount(Long permissionResourceCount) {
this.permissionResourceCount = permissionResourceCount;
}
/**
* A count of resources for this rule that are validated when ordering.
*/
@ApiProperty
protected Long resourceCount;
public Long getResourceCount() {
return resourceCount;
}
public void setResourceCount(Long resourceCount) {
this.resourceCount = resourceCount;
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.product.Item.Mask item() {
return withSubMask("item", com.softlayer.api.service.product.Item.Mask.class);
}
public com.softlayer.api.service.product.item.rule.resource.item.Category.Mask itemCategoryResources() {
return withSubMask("itemCategoryResources", com.softlayer.api.service.product.item.rule.resource.item.Category.Mask.class);
}
public com.softlayer.api.service.product.item.rule.resource.Item.Mask itemResources() {
return withSubMask("itemResources", com.softlayer.api.service.product.item.rule.resource.Item.Mask.class);
}
public com.softlayer.api.service.product.item.rule.resource.Location.Mask locationResources() {
return withSubMask("locationResources", com.softlayer.api.service.product.item.rule.resource.Location.Mask.class);
}
public com.softlayer.api.service.product.Package.Mask rulePackage() {
return withSubMask("package", com.softlayer.api.service.product.Package.Mask.class);
}
public com.softlayer.api.service.product.item.rule.resource.Permission.Mask permissionResources() {
return withSubMask("permissionResources", com.softlayer.api.service.product.item.rule.resource.Permission.Mask.class);
}
public com.softlayer.api.service.product.item.rule.Resource.Mask resources() {
return withSubMask("resources", com.softlayer.api.service.product.item.rule.Resource.Mask.class);
}
public com.softlayer.api.service.product.item.rule.Type.Mask type() {
return withSubMask("type", com.softlayer.api.service.product.item.rule.Type.Mask.class);
}
public Mask itemId() {
withLocalProperty("itemId");
return this;
}
public Mask message() {
withLocalProperty("message");
return this;
}
public Mask operation() {
withLocalProperty("operation");
return this;
}
public Mask packageId() {
withLocalProperty("packageId");
return this;
}
public Mask typeId() {
withLocalProperty("typeId");
return this;
}
public Mask itemCategoryResourceCount() {
withLocalProperty("itemCategoryResourceCount");
return this;
}
public Mask itemResourceCount() {
withLocalProperty("itemResourceCount");
return this;
}
public Mask locationResourceCount() {
withLocalProperty("locationResourceCount");
return this;
}
public Mask permissionResourceCount() {
withLocalProperty("permissionResourceCount");
return this;
}
public Mask resourceCount() {
withLocalProperty("resourceCount");
return this;
}
}
}