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

com.influxdb.client.domain.TelegrafPluginRequest 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.TelegrafPluginRequestPlugins;
import com.influxdb.client.domain.TelegrafRequestMetadata;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * TelegrafPluginRequest
 */

public class TelegrafPluginRequest {
  public static final String SERIALIZED_NAME_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private String name;

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;

  public static final String SERIALIZED_NAME_PLUGINS = "plugins";
  @SerializedName(SERIALIZED_NAME_PLUGINS)
  private List plugins = new ArrayList<>();

  public static final String SERIALIZED_NAME_METADATA = "metadata";
  @SerializedName(SERIALIZED_NAME_METADATA)
  private TelegrafRequestMetadata metadata = null;

  public static final String SERIALIZED_NAME_CONFIG = "config";
  @SerializedName(SERIALIZED_NAME_CONFIG)
  private String config;

  public static final String SERIALIZED_NAME_ORG_I_D = "orgID";
  @SerializedName(SERIALIZED_NAME_ORG_I_D)
  private String orgID;

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

   /**
   * Get name
   * @return name
  **/
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public TelegrafPluginRequest description(String description) {
    this.description = description;
    return this;
  }

   /**
   * Get description
   * @return description
  **/
  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public TelegrafPluginRequest plugins(List plugins) {
    this.plugins = plugins;
    return this;
  }

  public TelegrafPluginRequest addPluginsItem(TelegrafPluginRequestPlugins pluginsItem) {
    if (this.plugins == null) {
      this.plugins = new ArrayList<>();
    }
    this.plugins.add(pluginsItem);
    return this;
  }

   /**
   * Get plugins
   * @return plugins
  **/
  public List getPlugins() {
    return plugins;
  }

  public void setPlugins(List plugins) {
    this.plugins = plugins;
  }

  public TelegrafPluginRequest metadata(TelegrafRequestMetadata metadata) {
    this.metadata = metadata;
    return this;
  }

   /**
   * Get metadata
   * @return metadata
  **/
  public TelegrafRequestMetadata getMetadata() {
    return metadata;
  }

  public void setMetadata(TelegrafRequestMetadata metadata) {
    this.metadata = metadata;
  }

  public TelegrafPluginRequest config(String config) {
    this.config = config;
    return this;
  }

   /**
   * Get config
   * @return config
  **/
  public String getConfig() {
    return config;
  }

  public void setConfig(String config) {
    this.config = config;
  }

  public TelegrafPluginRequest orgID(String orgID) {
    this.orgID = orgID;
    return this;
  }

   /**
   * Get orgID
   * @return orgID
  **/
  public String getOrgID() {
    return orgID;
  }

  public void setOrgID(String orgID) {
    this.orgID = orgID;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TelegrafPluginRequest telegrafPluginRequest = (TelegrafPluginRequest) o;
    return Objects.equals(this.name, telegrafPluginRequest.name) &&
        Objects.equals(this.description, telegrafPluginRequest.description) &&
        Objects.equals(this.plugins, telegrafPluginRequest.plugins) &&
        Objects.equals(this.metadata, telegrafPluginRequest.metadata) &&
        Objects.equals(this.config, telegrafPluginRequest.config) &&
        Objects.equals(this.orgID, telegrafPluginRequest.orgID);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, description, plugins, metadata, config, orgID);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TelegrafPluginRequest {\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    plugins: ").append(toIndentedString(plugins)).append("\n");
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
    sb.append("    config: ").append(toIndentedString(config)).append("\n");
    sb.append("    orgID: ").append(toIndentedString(orgID)).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