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

com.rockset.client.model.Privilege Maven / Gradle / Ivy

There is a newer version: 0.13.0
Show newest version
/*
 * REST API
 * Rockset's REST API allows for creating and managing all resources in Rockset. Each supported endpoint is documented below.  All requests must be authorized with a Rockset API key, which can be created in the [Rockset console](https://console.rockset.com). The API key must be provided as `ApiKey ` in the `Authorization` request header. For example: ``` Authorization: ApiKey aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT ```  All endpoints are only accessible via https.  Build something awesome!
 *
 * OpenAPI spec version: v1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.rockset.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Privilege
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-08-08T22:21:01.705Z")
public class Privilege {
  /**
   * The action allowed by this privilege.
   */
  @JsonAdapter(ActionEnum.Adapter.class)
  public enum ActionEnum {
    ALL_GLOBAL_ACTIONS("ALLGLOBALACTIONS"),
    
    GET_ORG_GLOBAL("GETORGGLOBAL"),
    
    GET_CURRENT_USER_GLOBAL("GETCURRENTUSERGLOBAL"),
    
    INVITE_USER_GLOBAL("INVITEUSERGLOBAL"),
    
    DELETE_USER_GLOBAL("DELETEUSERGLOBAL"),
    
    LIST_USERS_GLOBAL("LISTUSERSGLOBAL"),
    
    GET_BILLING_GLOBAL("GETBILLINGGLOBAL"),
    
    UPDATE_BILLING_GLOBAL("UPDATEBILLINGGLOBAL"),
    
    UPDATE_SETTINGS_GLOBAL("UPDATESETTINGSGLOBAL"),
    
    GET_METRICS_GLOBAL("GETMETRICSGLOBAL"),
    
    CREATE_VI_GLOBAL("CREATEVIGLOBAL"),
    
    UPDATE_VI_GLOBAL("UPDATEVIGLOBAL"),
    
    LIST_VI_GLOBAL("LISTVIGLOBAL"),
    
    CREATE_WS_GLOBAL("CREATEWSGLOBAL"),
    
    LIST_WS_GLOBAL("LISTWSGLOBAL"),
    
    CREATE_INTEGRATION_GLOBAL("CREATEINTEGRATIONGLOBAL"),
    
    DELETE_INTEGRATION_GLOBAL("DELETEINTEGRATIONGLOBAL"),
    
    LIST_INTEGRATIONS_GLOBAL("LISTINTEGRATIONSGLOBAL"),
    
    UPDATE_RESOURCE_OWNER_GLOBAL("UPDATERESOURCEOWNERGLOBAL"),
    
    CREATE_API_KEY_GLOBAL("CREATEAPIKEYGLOBAL"),
    
    CREATE_ROLE_GLOBAL("CREATEROLEGLOBAL"),
    
    UPDATE_ROLE_GLOBAL("UPDATEROLEGLOBAL"),
    
    DELETE_ROLE_GLOBAL("DELETEROLEGLOBAL"),
    
    LIST_ROLES_GLOBAL("LISTROLESGLOBAL"),
    
    GRANT_REVOKE_ROLE_GLOBAL("GRANTREVOKEROLEGLOBAL"),
    
    CREATE_QUERY_LOGS_COLLECTION_GLOBAL("CREATEQUERYLOGSCOLLECTIONGLOBAL"),
    
    ALL_INTEGRATION_ACTIONS("ALLINTEGRATIONACTIONS"),
    
    CREATE_COLLECTION_INTEGRATION("CREATECOLLECTIONINTEGRATION"),
    
    ALL_WORKSPACE_ACTIONS("ALLWORKSPACEACTIONS"),
    
    DELETE_WS("DELETEWS"),
    
    QUERY_DATA_WS("QUERYDATAWS"),
    
    WRITE_DATA_WS("WRITEDATAWS"),
    
    CREATE_COLLECTION_WS("CREATECOLLECTIONWS"),
    
    DELETE_COLLECTION_WS("DELETECOLLECTIONWS"),
    
    CREATE_ALIAS_WS("CREATEALIASWS"),
    
    DELETE_ALIAS_WS("DELETEALIASWS"),
    
    LIST_RESOURCES_WS("LISTRESOURCESWS"),
    
    CREATE_QUERY_LAMBDA_WS("CREATEQUERYLAMBDAWS"),
    
    DELETE_QUERY_LAMBDA_WS("DELETEQUERYLAMBDAWS"),
    
    EXECUTE_QUERY_LAMBDA_WS("EXECUTEQUERYLAMBDAWS"),
    
    CREATE_SCHEDULED_LAMBDA_WS("CREATESCHEDULEDLAMBDAWS"),
    
    DELETE_SCHEDULED_LAMBDA_WS("DELETESCHEDULEDLAMBDAWS"),
    
    CREATE_VIEW_WS("CREATEVIEWWS"),
    
    DELETE_VIEW_WS("DELETEVIEWWS"),
    
    ALL_VI_ACTIONS("ALLVIACTIONS"),
    
    QUERY_VI("QUERYVI"),
    
    UPDATE_VI("UPDATEVI"),
    
    SUSPEND_RESUME_VI("SUSPENDRESUMEVI"),
    
    DELETE_VI("DELETEVI"),
    
    CREATE_SIMILARITY_INDEX_WS("CREATESIMILARITYINDEXWS"),
    
    DELETE_SIMILARITY_INDEX_WS("DELETESIMILARITYINDEXWS");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    @com.fasterxml.jackson.annotation.JsonCreator
    public static ActionEnum fromValue(String text) {
      for (ActionEnum b : ActionEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final ActionEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public ActionEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return ActionEnum.fromValue(String.valueOf(value));
      }
    }
  }

  @SerializedName("action")
  private ActionEnum action = null;

  @SerializedName("cluster")
  private String cluster = null;

  @SerializedName("resource_name")
  private String resourceName = null;

  public Privilege action(ActionEnum action) {
    this.action = action;
    return this;
  }

   /**
   * The action allowed by this privilege.
   * @return action
  **/

@JsonProperty("action")
@ApiModelProperty(example = "CREATE_COLLECTION_WS", value = "The action allowed by this privilege.")
  public ActionEnum getAction() {
    return action;
  }

  public void setAction(ActionEnum action) {
    this.action = action;
  }

  public Privilege cluster(String cluster) {
    this.cluster = cluster;
    return this;
  }

   /**
   * Cluster ID (`usw2a1` for us-west-2, `use1a1` for us-east-1, `euc1a1` for eu-central-1) for which the action is allowed. Defaults to '*All*' if not specified.
   * @return cluster
  **/

@JsonProperty("cluster")
@ApiModelProperty(example = "*ALL*", value = "Cluster ID (`usw2a1` for us-west-2, `use1a1` for us-east-1, `euc1a1` for eu-central-1) for which the action is allowed. Defaults to '*All*' if not specified.")
  public String getCluster() {
    return cluster;
  }

  public void setCluster(String cluster) {
    this.cluster = cluster;
  }

  public Privilege resourceName(String resourceName) {
    this.resourceName = resourceName;
    return this;
  }

   /**
   * The resources on which the action is allowed. Defaults to '*All*' if not specified.
   * @return resourceName
  **/

@JsonProperty("resource_name")
@ApiModelProperty(example = "commons", value = "The resources on which the action is allowed. Defaults to '*All*' if not specified.")
  public String getResourceName() {
    return resourceName;
  }

  public void setResourceName(String resourceName) {
    this.resourceName = resourceName;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Privilege privilege = (Privilege) o;
    return Objects.equals(this.action, privilege.action) &&
        Objects.equals(this.cluster, privilege.cluster) &&
        Objects.equals(this.resourceName, privilege.resourceName);
  }

  @Override
  public int hashCode() {
    return Objects.hash(action, cluster, resourceName);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Privilege {\n");
    
    sb.append("    action: ").append(toIndentedString(action)).append("\n");
    sb.append("    cluster: ").append(toIndentedString(cluster)).append("\n");
    sb.append("    resourceName: ").append(toIndentedString(resourceName)).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 - 2024 Weber Informatics LLC | Privacy Policy