Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ The official Java library for accessing ModelArk on Volcengine and BytePlus. It
<dependency>
<groupId>com.volcengine</groupId>
<artifactId>ark-runtime</artifactId>
<version>0.14.0</version>
<version>0.15.0</version>
</dependency>
```

### Gradle

```groovy
implementation 'com.volcengine:ark-runtime:0.14.0'
implementation 'com.volcengine:ark-runtime:0.15.0'
```

## Choose Volcengine or BytePlus
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.14.0
0.15.0
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.volcengine</groupId>
<artifactId>ark-runtime</artifactId>
<version>0.14.0</version>
<version>0.15.0</version>
<packaging>jar</packaging>

<name>ark-runtime</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
FileObject.JSON_PROPERTY_EXPIRE_AT,
FileObject.JSON_PROPERTY_STATUS,
FileObject.JSON_PROPERTY_DOWNLOAD_URL,
FileObject.JSON_PROPERTY_TOS,
FileObject.JSON_PROPERTY_ERROR,
FileObject.JSON_PROPERTY_PREPROCESS_CONFIGS
})
Expand Down Expand Up @@ -125,6 +126,10 @@ public static ObjectEnum fromValue(String value) {
@javax.annotation.Nullable
private String downloadUrl;

public static final String JSON_PROPERTY_TOS = "tos";
@javax.annotation.Nullable
private TosLocation tos;

public static final String JSON_PROPERTY_ERROR = "error";
@javax.annotation.Nullable
private FileError error;
Expand Down Expand Up @@ -436,6 +441,31 @@ public void setDownloadUrl(@javax.annotation.Nullable String downloadUrl) {
this.downloadUrl = downloadUrl;
}

public FileObject tos(@javax.annotation.Nullable TosLocation tos) {

this.tos = tos;
return this;
}

/**
* Stored object location. Only returned for files in user-owned TOS buckets.
* @return tos
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_TOS, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public TosLocation getTos() {
return tos;
}


@JsonProperty(value = JSON_PROPERTY_TOS, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTos(@javax.annotation.Nullable TosLocation tos) {
this.tos = tos;
}

public FileObject error(@javax.annotation.Nullable FileError error) {

this.error = error;
Expand Down Expand Up @@ -508,13 +538,14 @@ public boolean equals(Object o) {
Objects.equals(this.expireAt, fileObject.expireAt) &&
Objects.equals(this.status, fileObject.status) &&
Objects.equals(this.downloadUrl, fileObject.downloadUrl) &&
Objects.equals(this.tos, fileObject.tos) &&
Objects.equals(this.error, fileObject.error) &&
Objects.equals(this.preprocessConfigs, fileObject.preprocessConfigs);
}

@Override
public int hashCode() {
return Objects.hash(_object, id, purpose, model, description, filename, bytes, mimeType, createdAt, expireAt, status, downloadUrl, error, preprocessConfigs);
return Objects.hash(_object, id, purpose, model, description, filename, bytes, mimeType, createdAt, expireAt, status, downloadUrl, tos, error, preprocessConfigs);
}

@Override
Expand All @@ -533,6 +564,7 @@ public String toString() {
sb.append(" expireAt: ").append(toIndentedString(expireAt)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" downloadUrl: ").append(toIndentedString(downloadUrl)).append("\n");
sb.append(" tos: ").append(toIndentedString(tos)).append("\n");
sb.append(" error: ").append(toIndentedString(error)).append("\n");
sb.append(" preprocessConfigs: ").append(toIndentedString(preprocessConfigs)).append("\n");
sb.append("}");
Expand Down Expand Up @@ -607,6 +639,10 @@ public FileObject.Builder downloadUrl(String downloadUrl) {
this.instance.downloadUrl = downloadUrl;
return this;
}
public FileObject.Builder tos(TosLocation tos) {
this.instance.tos = tos;
return this;
}
public FileObject.Builder error(FileError error) {
this.instance.error = error;
return this;
Expand Down Expand Up @@ -661,6 +697,7 @@ public FileObject.Builder toBuilder() {
.expireAt(getExpireAt())
.status(getStatus())
.downloadUrl(getDownloadUrl())
.tos(getTos())
.error(getError())
.preprocessConfigs(getPreprocessConfigs());
}
Expand Down
190 changes: 190 additions & 0 deletions src/main/java/com/volcengine/ark/runtime/models/file/TosLocation.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
// Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
// SPDX-License-Identifier: Apache-2.0

/*
* Ark File API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 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.volcengine.ark.runtime.models.file;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.Objects;

/**
* Location of a file stored in a user-owned TOS bucket.
*/
@JsonPropertyOrder({
TosLocation.JSON_PROPERTY_BUCKET,
TosLocation.JSON_PROPERTY_OBJECT_KEY
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0")
public class TosLocation {
public static final String JSON_PROPERTY_BUCKET = "bucket";
@javax.annotation.Nonnull
private String bucket;

public static final String JSON_PROPERTY_OBJECT_KEY = "object_key";
@javax.annotation.Nonnull
private String objectKey;

public TosLocation() {
}

public TosLocation bucket(@javax.annotation.Nonnull String bucket) {

this.bucket = bucket;
return this;
}

/**
* TOS bucket name.
* @return bucket
*/
@javax.annotation.Nonnull
@JsonProperty(value = JSON_PROPERTY_BUCKET, required = true)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

public String getBucket() {
return bucket;
}


@JsonProperty(value = JSON_PROPERTY_BUCKET, required = true)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setBucket(@javax.annotation.Nonnull String bucket) {
this.bucket = bucket;
}

public TosLocation objectKey(@javax.annotation.Nonnull String objectKey) {

this.objectKey = objectKey;
return this;
}

/**
* Full stored object key, including the upload prefix.
* @return objectKey
*/
@javax.annotation.Nonnull
@JsonProperty(value = JSON_PROPERTY_OBJECT_KEY, required = true)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

public String getObjectKey() {
return objectKey;
}


@JsonProperty(value = JSON_PROPERTY_OBJECT_KEY, required = true)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setObjectKey(@javax.annotation.Nonnull String objectKey) {
this.objectKey = objectKey;
}


@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TosLocation tosLocation = (TosLocation) o;
return Objects.equals(this.bucket, tosLocation.bucket) &&
Objects.equals(this.objectKey, tosLocation.objectKey);
}

@Override
public int hashCode() {
return Objects.hash(bucket, objectKey);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TosLocation {\n");
sb.append(" bucket: ").append(toIndentedString(bucket)).append("\n");
sb.append(" objectKey: ").append(toIndentedString(objectKey)).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(Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}

public static class Builder {

private TosLocation instance;

public Builder() {
this(new TosLocation());
}

protected Builder(TosLocation instance) {
this.instance = instance;
}

public TosLocation.Builder bucket(String bucket) {
this.instance.bucket = bucket;
return this;
}
public TosLocation.Builder objectKey(String objectKey) {
this.instance.objectKey = objectKey;
return this;
}


/**
* returns a built TosLocation instance.
*
* The builder is not reusable.
*/
public TosLocation build() {
try {
return this.instance;
} finally {
// ensure that this.instance is not reused
this.instance = null;
}
}

@Override
public String toString() {
return getClass() + "=(" + instance + ")";
}
}

/**
* Create a builder with no initialized field.
*/
public static TosLocation.Builder builder() {
return new TosLocation.Builder();
}

/**
* Create a builder with a shallow copy of this instance.
*/
public TosLocation.Builder toBuilder() {
return new TosLocation.Builder()
.bucket(getBucket())
.objectKey(getObjectKey());
}


}
Loading