com.databricks.sdk.service.sql.QueryPostContent Maven / Gradle / Ivy
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package com.databricks.sdk.service.sql;
import com.databricks.sdk.support.Generated;
import com.databricks.sdk.support.ToStringer;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collection;
import java.util.Objects;
@Generated
public class QueryPostContent {
/**
* Data source ID maps to the ID of the data source used by the resource and is distinct from the
* warehouse ID. [Learn more]
*
* [Learn more]: https://docs.databricks.com/api/workspace/datasources/list
*/
@JsonProperty("data_source_id")
private String dataSourceId;
/**
* General description that conveys additional information about this query such as usage notes.
*/
@JsonProperty("description")
private String description;
/** The title of this query that appears in list views, widget headings, and on the query page. */
@JsonProperty("name")
private String name;
/**
* Exclusively used for storing a list parameter definitions. A parameter is an object with
* `title`, `name`, `type`, and `value` properties. The `value` field here is the default value.
* It can be overridden at runtime.
*/
@JsonProperty("options")
private Object options;
/** The identifier of the workspace folder containing the object. */
@JsonProperty("parent")
private String parent;
/** The text of the query to be run. */
@JsonProperty("query")
private String query;
/**
* Sets the **Run as** role for the object. Must be set to one of `"viewer"` (signifying "run as
* viewer" behavior) or `"owner"` (signifying "run as owner" behavior)
*/
@JsonProperty("run_as_role")
private RunAsRole runAsRole;
/** */
@JsonProperty("tags")
private Collection tags;
public QueryPostContent setDataSourceId(String dataSourceId) {
this.dataSourceId = dataSourceId;
return this;
}
public String getDataSourceId() {
return dataSourceId;
}
public QueryPostContent setDescription(String description) {
this.description = description;
return this;
}
public String getDescription() {
return description;
}
public QueryPostContent setName(String name) {
this.name = name;
return this;
}
public String getName() {
return name;
}
public QueryPostContent setOptions(Object options) {
this.options = options;
return this;
}
public Object getOptions() {
return options;
}
public QueryPostContent setParent(String parent) {
this.parent = parent;
return this;
}
public String getParent() {
return parent;
}
public QueryPostContent setQuery(String query) {
this.query = query;
return this;
}
public String getQuery() {
return query;
}
public QueryPostContent setRunAsRole(RunAsRole runAsRole) {
this.runAsRole = runAsRole;
return this;
}
public RunAsRole getRunAsRole() {
return runAsRole;
}
public QueryPostContent setTags(Collection tags) {
this.tags = tags;
return this;
}
public Collection getTags() {
return tags;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
QueryPostContent that = (QueryPostContent) o;
return Objects.equals(dataSourceId, that.dataSourceId)
&& Objects.equals(description, that.description)
&& Objects.equals(name, that.name)
&& Objects.equals(options, that.options)
&& Objects.equals(parent, that.parent)
&& Objects.equals(query, that.query)
&& Objects.equals(runAsRole, that.runAsRole)
&& Objects.equals(tags, that.tags);
}
@Override
public int hashCode() {
return Objects.hash(dataSourceId, description, name, options, parent, query, runAsRole, tags);
}
@Override
public String toString() {
return new ToStringer(QueryPostContent.class)
.add("dataSourceId", dataSourceId)
.add("description", description)
.add("name", name)
.add("options", options)
.add("parent", parent)
.add("query", query)
.add("runAsRole", runAsRole)
.add("tags", tags)
.toString();
}
}