All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vmware.avi.sdk.model.HTTPHdrAction Maven / Gradle / Ivy

Go to download

Avi SDK is a java API which creates a session with controller and perform CRUD operations.

There is a newer version: 31.1.1.RELEASE
Show newest version
/*
 * Copyright 2021 VMware, Inc.
 * SPDX-License-Identifier: Apache License 2.0
 */

package com.vmware.avi.sdk.model;

import java.util.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * The HTTPHdrAction is a POJO class extends AviRestResource that used for creating
 * HTTPHdrAction.
 *
 * @version 1.0
 * @since 
 *
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class HTTPHdrAction  {
    @JsonProperty("action")
    private String action;

    @JsonProperty("cookie")
    private HTTPCookieData cookie;

    @JsonProperty("hdr")
    private HTTPHdrData hdr;

    @JsonProperty("hdr_index")
    private Integer hdrIndex;



    /**
     * This is the getter method this will return the attribute value.
     * Add  a new header with the new value is added irrespective of the existence of an http header of the given name.
     * Replace  a new header with the new value is added if no header of the given name exists, else existing headers with the given name are removed
     * and a new header with the new value is added.
     * Remove  all the headers of the given name are removed.
     * Enum options - HTTP_ADD_HDR, HTTP_REMOVE_HDR, HTTP_REPLACE_HDR.
     * Allowed in enterprise edition with any value, essentials edition(allowed values- http_remove_hdr,http_replace_hdr), basic edition(allowed values-
     * http_remove_hdr,http_replace_hdr), enterprise with cloud services edition.
     * Default value when not specified in API or module is interpreted by Avi Controller as null.
     * @return action
     */
    public String getAction() {
        return action;
    }

    /**
     * This is the setter method to the attribute.
     * Add  a new header with the new value is added irrespective of the existence of an http header of the given name.
     * Replace  a new header with the new value is added if no header of the given name exists, else existing headers with the given name are removed
     * and a new header with the new value is added.
     * Remove  all the headers of the given name are removed.
     * Enum options - HTTP_ADD_HDR, HTTP_REMOVE_HDR, HTTP_REPLACE_HDR.
     * Allowed in enterprise edition with any value, essentials edition(allowed values- http_remove_hdr,http_replace_hdr), basic edition(allowed values-
     * http_remove_hdr,http_replace_hdr), enterprise with cloud services edition.
     * Default value when not specified in API or module is interpreted by Avi Controller as null.
     * @param action set the action.
     */
    public void setAction(String  action) {
        this.action = action;
    }

    /**
     * This is the getter method this will return the attribute value.
     * Cookie information.
     * Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition.
     * Default value when not specified in API or module is interpreted by Avi Controller as null.
     * @return cookie
     */
    public HTTPCookieData getCookie() {
        return cookie;
    }

    /**
     * This is the setter method to the attribute.
     * Cookie information.
     * Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition.
     * Default value when not specified in API or module is interpreted by Avi Controller as null.
     * @param cookie set the cookie.
     */
    public void setCookie(HTTPCookieData cookie) {
        this.cookie = cookie;
    }

    /**
     * This is the getter method this will return the attribute value.
     * Http header information.
     * Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition.
     * Default value when not specified in API or module is interpreted by Avi Controller as null.
     * @return hdr
     */
    public HTTPHdrData getHdr() {
        return hdr;
    }

    /**
     * This is the setter method to the attribute.
     * Http header information.
     * Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition.
     * Default value when not specified in API or module is interpreted by Avi Controller as null.
     * @param hdr set the hdr.
     */
    public void setHdr(HTTPHdrData hdr) {
        this.hdr = hdr;
    }

    /**
     * This is the getter method this will return the attribute value.
     * Index to identify the header actions.
     * Field introduced in 22.1.1.
     * Allowed in enterprise edition with any value, essentials edition with any value, basic edition with any value, enterprise with cloud services
     * edition.
     * Default value when not specified in API or module is interpreted by Avi Controller as null.
     * @return hdrIndex
     */
    public Integer getHdrIndex() {
        return hdrIndex;
    }

    /**
     * This is the setter method to the attribute.
     * Index to identify the header actions.
     * Field introduced in 22.1.1.
     * Allowed in enterprise edition with any value, essentials edition with any value, basic edition with any value, enterprise with cloud services
     * edition.
     * Default value when not specified in API or module is interpreted by Avi Controller as null.
     * @param hdrIndex set the hdrIndex.
     */
    public void setHdrIndex(Integer  hdrIndex) {
        this.hdrIndex = hdrIndex;
    }


    @Override
    public boolean equals(java.lang.Object o) {
      if (this == o) {
          return true;
      }
      if (o == null || getClass() != o.getClass()) {
          return false;
      }
      HTTPHdrAction objHTTPHdrAction = (HTTPHdrAction) o;
      return   Objects.equals(this.action, objHTTPHdrAction.action)&&
  Objects.equals(this.hdr, objHTTPHdrAction.hdr)&&
  Objects.equals(this.cookie, objHTTPHdrAction.cookie)&&
  Objects.equals(this.hdrIndex, objHTTPHdrAction.hdrIndex);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class HTTPHdrAction {\n");
                  sb.append("    action: ").append(toIndentedString(action)).append("\n");
                        sb.append("    cookie: ").append(toIndentedString(cookie)).append("\n");
                        sb.append("    hdr: ").append(toIndentedString(hdr)).append("\n");
                        sb.append("    hdrIndex: ").append(toIndentedString(hdrIndex)).append("\n");
                  sb.append("}");
      return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(java.lang.Object o) {
      if (o == null) {
          return "null";
      }
      return o.toString().replace("\n", "\n    ");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy