com.pulumi.digitalocean.outputs.GetDropletsSort Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of digitalocean Show documentation
Show all versions of digitalocean Show documentation
A Pulumi package for creating and managing DigitalOcean cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.digitalocean.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class GetDropletsSort {
/**
* @return The sort direction. This may be either `asc` or `desc`.
*
*/
private @Nullable String direction;
/**
* @return Sort the Droplets by this key. This may be one of `backups`, `created_at`, `disk`, `id`,
* `image`, `ipv4_address`, `ipv4_address_private`, `ipv6`, `ipv6_address`, `ipv6_address_private`, `locked`,
* `memory`, `monitoring`, `name`, `price_hourly`, `price_monthly`, `private_networking`, `region`, `size`,
* `status`, `urn`, `vcpus`, or `vpc_uuid`.
*
*/
private String key;
private GetDropletsSort() {}
/**
* @return The sort direction. This may be either `asc` or `desc`.
*
*/
public Optional direction() {
return Optional.ofNullable(this.direction);
}
/**
* @return Sort the Droplets by this key. This may be one of `backups`, `created_at`, `disk`, `id`,
* `image`, `ipv4_address`, `ipv4_address_private`, `ipv6`, `ipv6_address`, `ipv6_address_private`, `locked`,
* `memory`, `monitoring`, `name`, `price_hourly`, `price_monthly`, `private_networking`, `region`, `size`,
* `status`, `urn`, `vcpus`, or `vpc_uuid`.
*
*/
public String key() {
return this.key;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetDropletsSort defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String direction;
private String key;
public Builder() {}
public Builder(GetDropletsSort defaults) {
Objects.requireNonNull(defaults);
this.direction = defaults.direction;
this.key = defaults.key;
}
@CustomType.Setter
public Builder direction(@Nullable String direction) {
this.direction = direction;
return this;
}
@CustomType.Setter
public Builder key(String key) {
if (key == null) {
throw new MissingRequiredPropertyException("GetDropletsSort", "key");
}
this.key = key;
return this;
}
public GetDropletsSort build() {
final var _resultValue = new GetDropletsSort();
_resultValue.direction = direction;
_resultValue.key = key;
return _resultValue;
}
}
}