Skip to content

Commit

Permalink
#46: Updated swagger to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
bednar committed Aug 21, 2019
1 parent 3bd2c0a commit cd4a5df
Show file tree
Hide file tree
Showing 35 changed files with 2,063 additions and 881 deletions.
27 changes: 0 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,32 +72,5 @@ jobs:
script: ./scripts/deploy-snapshot.sh
skip_cleanup: true

- stage: GitHub release
if: tag IS present AND repo = influxdata/influxdb-client-java AND type IN (push)
jdk: openjdk8
script:
- echo "GitHub Release"
- OWNER="$(echo "$TRAVIS_REPO_SLUG" | cut -f1 -d/)"
- REPO="$(echo "$TRAVIS_REPO_SLUG" | cut -f2 -d/)"
- mvn -B -U -DskipTests clean package
- mkdir release
- cp ./pom.xml release/
- cp ./client-core/target/*.jar release/
- cp ./client-test/target/*.jar release/
- cp ./client-reactive/target/*.jar release/
- cp ./client-scala/target/*.jar release/
- cp ./client-legacy/target/*.jar release/
- cp ./client-kotlin/target/*.jar release/
- cp ./client/target/*.jar release/
- cp ./spring/target/*.jar release/
- cp ./flux-dsl/target/*.jar release/
- echo "Installing ghr"
- curl -L https://github.com/tcnksm/ghr/releases/download/v0.12.1/ghr_v0.12.1_linux_386.tar.gz > ghr.tar.gz
- mkdir -p "$HOME/bin"
- export PATH="$HOME/bin:$PATH"
- tar xvzf ./ghr.tar.gz --strip 1 -C "$HOME/bin"
- rm ./ghr.tar.gz
- ghr -t "$GITHUB_TOKEN" -u "$OWNER" -r "$REPO" --replace "$TRAVIS_TAG" release/

after_failure:
- cat target/surefire-reports/*.txt
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
### Bugs
1. [#48](https://github.com/influxdata/influxdb-client-java/issues/48): The org parameter takes either the ID or Name interchangeably

### API
1. [#46](https://github.com/influxdata/influxdb-client-java/issues/46): Updated swagger to latest version

## 1.0.0.M2 [2019-08-01]

### Breaking Changes
Expand Down
22 changes: 11 additions & 11 deletions client/src/generated/java/com/influxdb/client/domain/CheckBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public class CheckBase {
@SerializedName(SERIALIZED_NAME_ORG_I_D)
private String orgID;

public static final String SERIALIZED_NAME_AUTHORIZATION_I_D = "authorizationID";
@SerializedName(SERIALIZED_NAME_AUTHORIZATION_I_D)
private String authorizationID;
public static final String SERIALIZED_NAME_OWNER_I_D = "ownerID";
@SerializedName(SERIALIZED_NAME_OWNER_I_D)
private String ownerID;

public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
@SerializedName(SERIALIZED_NAME_CREATED_AT)
Expand Down Expand Up @@ -142,12 +142,12 @@ public void setOrgID(String orgID) {
}

/**
* The ID of the authorization used to create this check.
* @return authorizationID
* The ID of creator used to create this check.
* @return ownerID
**/
@ApiModelProperty(value = "The ID of the authorization used to create this check.")
public String getAuthorizationID() {
return authorizationID;
@ApiModelProperty(value = "The ID of creator used to create this check.")
public String getOwnerID() {
return ownerID;
}

/**
Expand Down Expand Up @@ -359,7 +359,7 @@ public boolean equals(java.lang.Object o) {
return Objects.equals(this.id, checkBase.id) &&
Objects.equals(this.name, checkBase.name) &&
Objects.equals(this.orgID, checkBase.orgID) &&
Objects.equals(this.authorizationID, checkBase.authorizationID) &&
Objects.equals(this.ownerID, checkBase.ownerID) &&
Objects.equals(this.createdAt, checkBase.createdAt) &&
Objects.equals(this.updatedAt, checkBase.updatedAt) &&
Objects.equals(this.query, checkBase.query) &&
Expand All @@ -375,7 +375,7 @@ public boolean equals(java.lang.Object o) {

@Override
public int hashCode() {
return Objects.hash(id, name, orgID, authorizationID, createdAt, updatedAt, query, status, every, offset, cron, tags, description, statusMessageTemplate, labels);
return Objects.hash(id, name, orgID, ownerID, createdAt, updatedAt, query, status, every, offset, cron, tags, description, statusMessageTemplate, labels);
}


Expand All @@ -386,7 +386,7 @@ public String toString() {
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" orgID: ").append(toIndentedString(orgID)).append("\n");
sb.append(" authorizationID: ").append(toIndentedString(authorizationID)).append("\n");
sb.append(" ownerID: ").append(toIndentedString(ownerID)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append(" query: ").append(toIndentedString(query)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public class DocumentMeta {
@SerializedName(SERIALIZED_NAME_TYPE)
private String type;

public static final String SERIALIZED_NAME_TEMPLATE_I_D = "templateID";
@SerializedName(SERIALIZED_NAME_TEMPLATE_I_D)
private String templateID;

public static final String SERIALIZED_NAME_DESCRIPTION = "description";
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
private String description;
Expand Down Expand Up @@ -90,6 +94,24 @@ public void setType(String type) {
this.type = type;
}

public DocumentMeta templateID(String templateID) {
this.templateID = templateID;
return this;
}

/**
* Get templateID
* @return templateID
**/
@ApiModelProperty(value = "")
public String getTemplateID() {
return templateID;
}

public void setTemplateID(String templateID) {
this.templateID = templateID;
}

public DocumentMeta description(String description) {
this.description = description;
return this;
Expand Down Expand Up @@ -156,6 +178,7 @@ public boolean equals(java.lang.Object o) {
DocumentMeta documentMeta = (DocumentMeta) o;
return Objects.equals(this.name, documentMeta.name) &&
Objects.equals(this.type, documentMeta.type) &&
Objects.equals(this.templateID, documentMeta.templateID) &&
Objects.equals(this.description, documentMeta.description) &&
Objects.equals(this.version, documentMeta.version) &&
Objects.equals(this.createdAt, documentMeta.createdAt) &&
Expand All @@ -164,7 +187,7 @@ public boolean equals(java.lang.Object o) {

@Override
public int hashCode() {
return Objects.hash(name, type, description, version, createdAt, updatedAt);
return Objects.hash(name, type, templateID, description, version, createdAt, updatedAt);
}


Expand All @@ -174,6 +197,7 @@ public String toString() {
sb.append("class DocumentMeta {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" templateID: ").append(toIndentedString(templateID)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
/*
* Influx API Service
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: 0.1.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.CheckStatusLevel;
import com.influxdb.client.domain.ThresholdBase;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;

/**
* GreaterThreshold
*/

public class GreaterThreshold extends Threshold {
/**
* Gets or Sets type
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
GREATER("greater");

private String value;

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

public String getValue() {
return value;
}

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

public static TypeEnum fromValue(String text) {
for (TypeEnum b : TypeEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}

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

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

public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private TypeEnum type = TypeEnum.GREATER;

public static final String SERIALIZED_NAME_VALUE = "value";
@SerializedName(SERIALIZED_NAME_VALUE)
private Float value;

/**
* Get type
* @return type
**/
@ApiModelProperty(required = true, value = "")
public TypeEnum getType() {
return type;
}

public GreaterThreshold value(Float value) {
this.value = value;
return this;
}

/**
* Get value
* @return value
**/
@ApiModelProperty(required = true, value = "")
public Float getValue() {
return value;
}

public void setValue(Float value) {
this.value = value;
}


@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GreaterThreshold greaterThreshold = (GreaterThreshold) o;
return Objects.equals(this.type, greaterThreshold.type) &&
Objects.equals(this.value, greaterThreshold.value) &&
super.equals(o);
}

@Override
public int hashCode() {
return Objects.hash(type, value, super.hashCode());
}


@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GreaterThreshold {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).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 ");
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Influx API Service
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: 0.1.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.influxdb.client.domain.HTTPNotificationRuleBase;
import com.influxdb.client.domain.Label;
import com.influxdb.client.domain.NotificationRuleBase;
import com.influxdb.client.domain.StatusRule;
import com.influxdb.client.domain.TagRule;
import com.influxdb.client.domain.TaskStatusType;
import java.time.OffsetDateTime;
import java.util.List;

/**
* HTTPNotificationRule
*/

public class HTTPNotificationRule extends NotificationRule {

@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return super.equals(o);
}

@Override
public int hashCode() {
return Objects.hash(super.hashCode());
}


@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HTTPNotificationRule {\n");
sb.append(" ").append(toIndentedString(super.toString())).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 ");
}

}

Loading

0 comments on commit cd4a5df

Please sign in to comment.