|
| 1 | +package com.vmware.avi.vro.model; |
| 2 | + |
| 3 | +import java.util.*; |
| 4 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 5 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 6 | +import com.fasterxml.jackson.annotation.JsonInclude; |
| 7 | +import com.fasterxml.jackson.annotation.JsonInclude.Include; |
| 8 | +import com.vmware.o11n.plugin.sdk.annotation.VsoFinder; |
| 9 | +import com.vmware.o11n.plugin.sdk.annotation.VsoMethod; |
| 10 | +import com.vmware.o11n.plugin.sdk.annotation.VsoObject; |
| 11 | +import com.vmware.avi.vro.Constants; |
| 12 | +import org.springframework.stereotype.Service; |
| 13 | + |
| 14 | +/** |
| 15 | + * The IpAdvertisementProfile is a POJO class extends AviRestResource that used for creating |
| 16 | + * IpAdvertisementProfile. |
| 17 | + * |
| 18 | + * @version 1.0 |
| 19 | + * @since |
| 20 | + * |
| 21 | + */ |
| 22 | +@VsoObject(create = false, name = "IpAdvertisementProfile") |
| 23 | +@VsoFinder(name = Constants.FINDER_VRO_IPADVERTISEMENTPROFILE) |
| 24 | +@JsonIgnoreProperties(ignoreUnknown = true) |
| 25 | +@Service |
| 26 | +public class IpAdvertisementProfile extends AviRestResource { |
| 27 | + @JsonProperty("default_periodicity") |
| 28 | + @JsonInclude(Include.NON_NULL) |
| 29 | + private Integer defaultPeriodicity = 10; |
| 30 | + |
| 31 | + @JsonProperty("ip_types") |
| 32 | + @JsonInclude(Include.NON_NULL) |
| 33 | + private List<IpAddrTypeConfig> ipTypes; |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + /** |
| 38 | + * This is the getter method this will return the attribute value. |
| 39 | + * Default periodicity for periodic ip advertisement (gratarp/na) in minutes. |
| 40 | + * Used when a per-type periodicity is not specified. |
| 41 | + * Allowed values are 5-30. |
| 42 | + * Field introduced in 32.2.1. |
| 43 | + * Unit is min. |
| 44 | + * Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition. |
| 45 | + * Default value when not specified in API or module is interpreted by Avi Controller as 10. |
| 46 | + * @return defaultPeriodicity |
| 47 | + */ |
| 48 | + @VsoMethod |
| 49 | + public Integer getDefaultPeriodicity() { |
| 50 | + return defaultPeriodicity; |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * This is the setter method to the attribute. |
| 55 | + * Default periodicity for periodic ip advertisement (gratarp/na) in minutes. |
| 56 | + * Used when a per-type periodicity is not specified. |
| 57 | + * Allowed values are 5-30. |
| 58 | + * Field introduced in 32.2.1. |
| 59 | + * Unit is min. |
| 60 | + * Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition. |
| 61 | + * Default value when not specified in API or module is interpreted by Avi Controller as 10. |
| 62 | + * @param defaultPeriodicity set the defaultPeriodicity. |
| 63 | + */ |
| 64 | + @VsoMethod |
| 65 | + public void setDefaultPeriodicity(Integer defaultPeriodicity) { |
| 66 | + this.defaultPeriodicity = defaultPeriodicity; |
| 67 | + } |
| 68 | + |
| 69 | + /** |
| 70 | + * This is the getter method this will return the attribute value. |
| 71 | + * List of ip address types for which periodic ip advertisement (gratarp/na) is enabled. |
| 72 | + * Supported ip_type values are vip_ip, snat_ip, floating_intf_ip, and primary_intf_ip. |
| 73 | + * Applied uniformly to all vrfs in this serviceenginegroup. |
| 74 | + * Field introduced in 32.2.1. |
| 75 | + * Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition. |
| 76 | + * Default value when not specified in API or module is interpreted by Avi Controller as null. |
| 77 | + * @return ipTypes |
| 78 | + */ |
| 79 | + @VsoMethod |
| 80 | + public List<IpAddrTypeConfig> getIpTypes() { |
| 81 | + return ipTypes; |
| 82 | + } |
| 83 | + |
| 84 | + /** |
| 85 | + * This is the setter method. this will set the ipTypes |
| 86 | + * List of ip address types for which periodic ip advertisement (gratarp/na) is enabled. |
| 87 | + * Supported ip_type values are vip_ip, snat_ip, floating_intf_ip, and primary_intf_ip. |
| 88 | + * Applied uniformly to all vrfs in this serviceenginegroup. |
| 89 | + * Field introduced in 32.2.1. |
| 90 | + * Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition. |
| 91 | + * Default value when not specified in API or module is interpreted by Avi Controller as null. |
| 92 | + * @return ipTypes |
| 93 | + */ |
| 94 | + @VsoMethod |
| 95 | + public void setIpTypes(List<IpAddrTypeConfig> ipTypes) { |
| 96 | + this.ipTypes = ipTypes; |
| 97 | + } |
| 98 | + |
| 99 | + /** |
| 100 | + * This is the setter method this will set the ipTypes |
| 101 | + * List of ip address types for which periodic ip advertisement (gratarp/na) is enabled. |
| 102 | + * Supported ip_type values are vip_ip, snat_ip, floating_intf_ip, and primary_intf_ip. |
| 103 | + * Applied uniformly to all vrfs in this serviceenginegroup. |
| 104 | + * Field introduced in 32.2.1. |
| 105 | + * Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition. |
| 106 | + * Default value when not specified in API or module is interpreted by Avi Controller as null. |
| 107 | + * @return ipTypes |
| 108 | + */ |
| 109 | + @VsoMethod |
| 110 | + public IpAdvertisementProfile addIpTypesItem(IpAddrTypeConfig ipTypesItem) { |
| 111 | + if (this.ipTypes == null) { |
| 112 | + this.ipTypes = new ArrayList<IpAddrTypeConfig>(); |
| 113 | + } |
| 114 | + this.ipTypes.add(ipTypesItem); |
| 115 | + return this; |
| 116 | + } |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | +@Override |
| 122 | +public boolean equals(java.lang.Object o) { |
| 123 | + if (this == o) { |
| 124 | + return true; |
| 125 | + } |
| 126 | + if (o == null || getClass() != o.getClass()) { |
| 127 | + return false; |
| 128 | + } |
| 129 | + IpAdvertisementProfile objIpAdvertisementProfile = (IpAdvertisementProfile) o; |
| 130 | + return Objects.equals(this.defaultPeriodicity, objIpAdvertisementProfile.defaultPeriodicity)&& |
| 131 | + Objects.equals(this.ipTypes, objIpAdvertisementProfile.ipTypes); |
| 132 | +} |
| 133 | + |
| 134 | +@Override |
| 135 | +public String toString() { |
| 136 | + StringBuilder sb = new StringBuilder(); |
| 137 | + sb.append("class IpAdvertisementProfile {\n"); |
| 138 | + sb.append(" defaultPeriodicity: ").append(toIndentedString(defaultPeriodicity)).append("\n"); |
| 139 | + sb.append(" ipTypes: ").append(toIndentedString(ipTypes)).append("\n"); |
| 140 | + sb.append("}"); |
| 141 | + return sb.toString(); |
| 142 | +} |
| 143 | + |
| 144 | +/** |
| 145 | +* Convert the given object to string with each line indented by 4 spaces |
| 146 | +* (except the first line). |
| 147 | +*/ |
| 148 | +private String toIndentedString(java.lang.Object o) { |
| 149 | + if (o == null) { |
| 150 | + return "null"; |
| 151 | + } |
| 152 | + return o.toString().replace("\n", "\n "); |
| 153 | +} |
| 154 | +} |
| 155 | + |
0 commit comments