
com.influxdb.client.domain.ObjectExpression Maven / Gradle / Ivy
/*
* InfluxDB OSS API Service
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
*
* OpenAPI spec version: 2.0.0
*
*
* 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.influxdb.client.domain;
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 com.influxdb.client.domain.Property;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* Allows the declaration of an anonymous object within a declaration
*/
public class ObjectExpression extends Expression {
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private String type;
public static final String SERIALIZED_NAME_PROPERTIES = "properties";
@SerializedName(SERIALIZED_NAME_PROPERTIES)
private List properties = new ArrayList<>();
public ObjectExpression type(String type) {
this.type = type;
return this;
}
/**
* Type of AST node
* @return type
**/
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public ObjectExpression properties(List properties) {
this.properties = properties;
return this;
}
public ObjectExpression addPropertiesItem(Property propertiesItem) {
if (this.properties == null) {
this.properties = new ArrayList<>();
}
this.properties.add(propertiesItem);
return this;
}
/**
* Object properties
* @return properties
**/
public List getProperties() {
return properties;
}
public void setProperties(List properties) {
this.properties = properties;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ObjectExpression objectExpression = (ObjectExpression) o;
return Objects.equals(this.type, objectExpression.type) &&
Objects.equals(this.properties, objectExpression.properties) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(type, properties, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ObjectExpression {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).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