PageRenderTime 24ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/aws-java-sdk-fms/src/main/java/com/amazonaws/services/fms/model/EC2DeleteRouteAction.java

https://github.com/aws/aws-sdk-java
Java | 362 lines | 135 code | 40 blank | 187 comment | 56 complexity | 4d147828563e95e1ddebf9b14958ca59 MD5 | raw file
  1. /*
  2. * Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
  5. * the License. A copy of the License is located at
  6. *
  7. * http://aws.amazon.com/apache2.0
  8. *
  9. * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  10. * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
  11. * and limitations under the License.
  12. */
  13. package com.amazonaws.services.fms.model;
  14. import java.io.Serializable;
  15. import javax.annotation.Generated;
  16. import com.amazonaws.protocol.StructuredPojo;
  17. import com.amazonaws.protocol.ProtocolMarshaller;
  18. /**
  19. * <p>
  20. * Information about the DeleteRoute action in Amazon EC2.
  21. * </p>
  22. *
  23. * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/EC2DeleteRouteAction" target="_top">AWS API
  24. * Documentation</a>
  25. */
  26. @Generated("com.amazonaws:aws-java-sdk-code-generator")
  27. public class EC2DeleteRouteAction implements Serializable, Cloneable, StructuredPojo {
  28. /**
  29. * <p>
  30. * A description of the DeleteRoute action.
  31. * </p>
  32. */
  33. private String description;
  34. /**
  35. * <p>
  36. * Information about the IPv4 CIDR range for the route. The value you specify must match the CIDR for the route
  37. * exactly.
  38. * </p>
  39. */
  40. private String destinationCidrBlock;
  41. /**
  42. * <p>
  43. * Information about the ID of the prefix list for the route.
  44. * </p>
  45. */
  46. private String destinationPrefixListId;
  47. /**
  48. * <p>
  49. * Information about the IPv6 CIDR range for the route. The value you specify must match the CIDR for the route
  50. * exactly.
  51. * </p>
  52. */
  53. private String destinationIpv6CidrBlock;
  54. /**
  55. * <p>
  56. * Information about the ID of the route table.
  57. * </p>
  58. */
  59. private ActionTarget routeTableId;
  60. /**
  61. * <p>
  62. * A description of the DeleteRoute action.
  63. * </p>
  64. *
  65. * @param description
  66. * A description of the DeleteRoute action.
  67. */
  68. public void setDescription(String description) {
  69. this.description = description;
  70. }
  71. /**
  72. * <p>
  73. * A description of the DeleteRoute action.
  74. * </p>
  75. *
  76. * @return A description of the DeleteRoute action.
  77. */
  78. public String getDescription() {
  79. return this.description;
  80. }
  81. /**
  82. * <p>
  83. * A description of the DeleteRoute action.
  84. * </p>
  85. *
  86. * @param description
  87. * A description of the DeleteRoute action.
  88. * @return Returns a reference to this object so that method calls can be chained together.
  89. */
  90. public EC2DeleteRouteAction withDescription(String description) {
  91. setDescription(description);
  92. return this;
  93. }
  94. /**
  95. * <p>
  96. * Information about the IPv4 CIDR range for the route. The value you specify must match the CIDR for the route
  97. * exactly.
  98. * </p>
  99. *
  100. * @param destinationCidrBlock
  101. * Information about the IPv4 CIDR range for the route. The value you specify must match the CIDR for the
  102. * route exactly.
  103. */
  104. public void setDestinationCidrBlock(String destinationCidrBlock) {
  105. this.destinationCidrBlock = destinationCidrBlock;
  106. }
  107. /**
  108. * <p>
  109. * Information about the IPv4 CIDR range for the route. The value you specify must match the CIDR for the route
  110. * exactly.
  111. * </p>
  112. *
  113. * @return Information about the IPv4 CIDR range for the route. The value you specify must match the CIDR for the
  114. * route exactly.
  115. */
  116. public String getDestinationCidrBlock() {
  117. return this.destinationCidrBlock;
  118. }
  119. /**
  120. * <p>
  121. * Information about the IPv4 CIDR range for the route. The value you specify must match the CIDR for the route
  122. * exactly.
  123. * </p>
  124. *
  125. * @param destinationCidrBlock
  126. * Information about the IPv4 CIDR range for the route. The value you specify must match the CIDR for the
  127. * route exactly.
  128. * @return Returns a reference to this object so that method calls can be chained together.
  129. */
  130. public EC2DeleteRouteAction withDestinationCidrBlock(String destinationCidrBlock) {
  131. setDestinationCidrBlock(destinationCidrBlock);
  132. return this;
  133. }
  134. /**
  135. * <p>
  136. * Information about the ID of the prefix list for the route.
  137. * </p>
  138. *
  139. * @param destinationPrefixListId
  140. * Information about the ID of the prefix list for the route.
  141. */
  142. public void setDestinationPrefixListId(String destinationPrefixListId) {
  143. this.destinationPrefixListId = destinationPrefixListId;
  144. }
  145. /**
  146. * <p>
  147. * Information about the ID of the prefix list for the route.
  148. * </p>
  149. *
  150. * @return Information about the ID of the prefix list for the route.
  151. */
  152. public String getDestinationPrefixListId() {
  153. return this.destinationPrefixListId;
  154. }
  155. /**
  156. * <p>
  157. * Information about the ID of the prefix list for the route.
  158. * </p>
  159. *
  160. * @param destinationPrefixListId
  161. * Information about the ID of the prefix list for the route.
  162. * @return Returns a reference to this object so that method calls can be chained together.
  163. */
  164. public EC2DeleteRouteAction withDestinationPrefixListId(String destinationPrefixListId) {
  165. setDestinationPrefixListId(destinationPrefixListId);
  166. return this;
  167. }
  168. /**
  169. * <p>
  170. * Information about the IPv6 CIDR range for the route. The value you specify must match the CIDR for the route
  171. * exactly.
  172. * </p>
  173. *
  174. * @param destinationIpv6CidrBlock
  175. * Information about the IPv6 CIDR range for the route. The value you specify must match the CIDR for the
  176. * route exactly.
  177. */
  178. public void setDestinationIpv6CidrBlock(String destinationIpv6CidrBlock) {
  179. this.destinationIpv6CidrBlock = destinationIpv6CidrBlock;
  180. }
  181. /**
  182. * <p>
  183. * Information about the IPv6 CIDR range for the route. The value you specify must match the CIDR for the route
  184. * exactly.
  185. * </p>
  186. *
  187. * @return Information about the IPv6 CIDR range for the route. The value you specify must match the CIDR for the
  188. * route exactly.
  189. */
  190. public String getDestinationIpv6CidrBlock() {
  191. return this.destinationIpv6CidrBlock;
  192. }
  193. /**
  194. * <p>
  195. * Information about the IPv6 CIDR range for the route. The value you specify must match the CIDR for the route
  196. * exactly.
  197. * </p>
  198. *
  199. * @param destinationIpv6CidrBlock
  200. * Information about the IPv6 CIDR range for the route. The value you specify must match the CIDR for the
  201. * route exactly.
  202. * @return Returns a reference to this object so that method calls can be chained together.
  203. */
  204. public EC2DeleteRouteAction withDestinationIpv6CidrBlock(String destinationIpv6CidrBlock) {
  205. setDestinationIpv6CidrBlock(destinationIpv6CidrBlock);
  206. return this;
  207. }
  208. /**
  209. * <p>
  210. * Information about the ID of the route table.
  211. * </p>
  212. *
  213. * @param routeTableId
  214. * Information about the ID of the route table.
  215. */
  216. public void setRouteTableId(ActionTarget routeTableId) {
  217. this.routeTableId = routeTableId;
  218. }
  219. /**
  220. * <p>
  221. * Information about the ID of the route table.
  222. * </p>
  223. *
  224. * @return Information about the ID of the route table.
  225. */
  226. public ActionTarget getRouteTableId() {
  227. return this.routeTableId;
  228. }
  229. /**
  230. * <p>
  231. * Information about the ID of the route table.
  232. * </p>
  233. *
  234. * @param routeTableId
  235. * Information about the ID of the route table.
  236. * @return Returns a reference to this object so that method calls can be chained together.
  237. */
  238. public EC2DeleteRouteAction withRouteTableId(ActionTarget routeTableId) {
  239. setRouteTableId(routeTableId);
  240. return this;
  241. }
  242. /**
  243. * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
  244. * redacted from this string using a placeholder value.
  245. *
  246. * @return A string representation of this object.
  247. *
  248. * @see java.lang.Object#toString()
  249. */
  250. @Override
  251. public String toString() {
  252. StringBuilder sb = new StringBuilder();
  253. sb.append("{");
  254. if (getDescription() != null)
  255. sb.append("Description: ").append(getDescription()).append(",");
  256. if (getDestinationCidrBlock() != null)
  257. sb.append("DestinationCidrBlock: ").append(getDestinationCidrBlock()).append(",");
  258. if (getDestinationPrefixListId() != null)
  259. sb.append("DestinationPrefixListId: ").append(getDestinationPrefixListId()).append(",");
  260. if (getDestinationIpv6CidrBlock() != null)
  261. sb.append("DestinationIpv6CidrBlock: ").append(getDestinationIpv6CidrBlock()).append(",");
  262. if (getRouteTableId() != null)
  263. sb.append("RouteTableId: ").append(getRouteTableId());
  264. sb.append("}");
  265. return sb.toString();
  266. }
  267. @Override
  268. public boolean equals(Object obj) {
  269. if (this == obj)
  270. return true;
  271. if (obj == null)
  272. return false;
  273. if (obj instanceof EC2DeleteRouteAction == false)
  274. return false;
  275. EC2DeleteRouteAction other = (EC2DeleteRouteAction) obj;
  276. if (other.getDescription() == null ^ this.getDescription() == null)
  277. return false;
  278. if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
  279. return false;
  280. if (other.getDestinationCidrBlock() == null ^ this.getDestinationCidrBlock() == null)
  281. return false;
  282. if (other.getDestinationCidrBlock() != null && other.getDestinationCidrBlock().equals(this.getDestinationCidrBlock()) == false)
  283. return false;
  284. if (other.getDestinationPrefixListId() == null ^ this.getDestinationPrefixListId() == null)
  285. return false;
  286. if (other.getDestinationPrefixListId() != null && other.getDestinationPrefixListId().equals(this.getDestinationPrefixListId()) == false)
  287. return false;
  288. if (other.getDestinationIpv6CidrBlock() == null ^ this.getDestinationIpv6CidrBlock() == null)
  289. return false;
  290. if (other.getDestinationIpv6CidrBlock() != null && other.getDestinationIpv6CidrBlock().equals(this.getDestinationIpv6CidrBlock()) == false)
  291. return false;
  292. if (other.getRouteTableId() == null ^ this.getRouteTableId() == null)
  293. return false;
  294. if (other.getRouteTableId() != null && other.getRouteTableId().equals(this.getRouteTableId()) == false)
  295. return false;
  296. return true;
  297. }
  298. @Override
  299. public int hashCode() {
  300. final int prime = 31;
  301. int hashCode = 1;
  302. hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
  303. hashCode = prime * hashCode + ((getDestinationCidrBlock() == null) ? 0 : getDestinationCidrBlock().hashCode());
  304. hashCode = prime * hashCode + ((getDestinationPrefixListId() == null) ? 0 : getDestinationPrefixListId().hashCode());
  305. hashCode = prime * hashCode + ((getDestinationIpv6CidrBlock() == null) ? 0 : getDestinationIpv6CidrBlock().hashCode());
  306. hashCode = prime * hashCode + ((getRouteTableId() == null) ? 0 : getRouteTableId().hashCode());
  307. return hashCode;
  308. }
  309. @Override
  310. public EC2DeleteRouteAction clone() {
  311. try {
  312. return (EC2DeleteRouteAction) super.clone();
  313. } catch (CloneNotSupportedException e) {
  314. throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
  315. }
  316. }
  317. @com.amazonaws.annotation.SdkInternalApi
  318. @Override
  319. public void marshall(ProtocolMarshaller protocolMarshaller) {
  320. com.amazonaws.services.fms.model.transform.EC2DeleteRouteActionMarshaller.getInstance().marshall(this, protocolMarshaller);
  321. }
  322. }