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

com.blazebit.expression.azure.subscription.model.Operation Maven / Gradle / Ivy

/*
 * SubscriptionClient
 * All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization.
 *
 * The version of the OpenAPI document: 2022-12-01
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.blazebit.expression.azure.subscription.model;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.blazebit.expression.azure.subscription.model.OperationDisplay;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.blazebit.expression.azure.invoker.JSON;


/**
 * Details of a REST API operation, returned from the Resource Provider Operations API
 */
@JsonPropertyOrder({
  Operation.JSON_PROPERTY_NAME,
  Operation.JSON_PROPERTY_IS_DATA_ACTION,
  Operation.JSON_PROPERTY_DISPLAY,
  Operation.JSON_PROPERTY_ORIGIN,
  Operation.JSON_PROPERTY_ACTION_TYPE
})
@com.blazebit.domain.declarative.DomainType
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-27T17:30:38.203241700+01:00[Europe/Berlin]", comments = "Generator version: 7.5.0")
public class Operation {
  public static final String JSON_PROPERTY_NAME = "name";
  private String name;

  public static final String JSON_PROPERTY_IS_DATA_ACTION = "isDataAction";
  private Boolean isDataAction;

  public static final String JSON_PROPERTY_DISPLAY = "display";
  private OperationDisplay display;

  /**
   * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"
   */
  @com.blazebit.domain.declarative.DomainType
public enum OriginEnum {
    USER("user"),
    
    SYSTEM("system"),
    
    USER_SYSTEM("user,system");

    private String value;

    OriginEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static OriginEnum fromValue(String value) {
      for (OriginEnum b : OriginEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_ORIGIN = "origin";
  private OriginEnum origin;

  /**
   * Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.
   */
  @com.blazebit.domain.declarative.DomainType
public enum ActionTypeEnum {
    INTERNAL("Internal");

    private String value;

    ActionTypeEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static ActionTypeEnum fromValue(String value) {
      for (ActionTypeEnum b : ActionTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_ACTION_TYPE = "actionType";
  private ActionTypeEnum actionType;

  public Operation() { 
  }

  @JsonCreator
  public Operation(
    @JsonProperty(JSON_PROPERTY_IS_DATA_ACTION) Boolean isDataAction, 
    @JsonProperty(JSON_PROPERTY_ORIGIN) OriginEnum origin, 
    @JsonProperty(JSON_PROPERTY_ACTION_TYPE) ActionTypeEnum actionType
  ) {
    this();
    this.isDataAction = isDataAction;
    this.origin = origin;
    this.actionType = actionType;
  }

  public Operation name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Operation name: {provider}/{resource}/{operation}
   * @return name
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getName() {
    return name;
  }


  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setName(String name) {
    this.name = name;
  }


   /**
   * Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.
   * @return isDataAction
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_IS_DATA_ACTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getIsDataAction() {
    return isDataAction;
  }




  public Operation display(OperationDisplay display) {
    this.display = display;
    return this;
  }

   /**
   * Get display
   * @return display
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_DISPLAY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public OperationDisplay getDisplay() {
    return display;
  }


  @JsonProperty(JSON_PROPERTY_DISPLAY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDisplay(OperationDisplay display) {
    this.display = display;
  }


   /**
   * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"
   * @return origin
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ORIGIN)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public OriginEnum getOrigin() {
    return origin;
  }




   /**
   * Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.
   * @return actionType
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ACTION_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public ActionTypeEnum getActionType() {
    return actionType;
  }




  /**
   * Return true if this Operation object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Operation operation = (Operation) o;
    return Objects.equals(this.name, operation.name) &&
        Objects.equals(this.isDataAction, operation.isDataAction) &&
        Objects.equals(this.display, operation.display) &&
        Objects.equals(this.origin, operation.origin) &&
        Objects.equals(this.actionType, operation.actionType);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, isDataAction, display, origin, actionType);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Operation {\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    isDataAction: ").append(toIndentedString(isDataAction)).append("\n");
    sb.append("    display: ").append(toIndentedString(display)).append("\n");
    sb.append("    origin: ").append(toIndentedString(origin)).append("\n");
    sb.append("    actionType: ").append(toIndentedString(actionType)).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(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy