Class BetaTelemetryDestinationWorkspaces
-
- All Implemented Interfaces:
public final class BetaTelemetryDestinationWorkspacesWhich of the organization's workspaces a telemetry destination covers.
Several destinations can cover the same workspace. Each of them receives the workspace's spans while it is enabled.
The workspace list of an
includeorexcludedestination isn't part of the destination object. List the destination's workspaces to read it. Add or remove one workspace at a time, or replace the whole list with an update. A list holds at most 1,000 workspaces.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaTelemetryDestinationWorkspaces.VisitorAn interface that defines how to map each variant of BetaTelemetryDestinationWorkspaces to a value of type T.
public final classBetaTelemetryDestinationWorkspaces.Type
-
Method Summary
Modifier and Type Method Description final Optional<BetaTelemetryDestinationWorkspacesAll>all()The destination covers every workspace of the organization, including the default workspace, archived workspaces, and workspaces created later. final Optional<BetaTelemetryDestinationWorkspacesInclude>include()The destination covers the workspaces on its list, and no others. final Optional<BetaTelemetryDestinationWorkspacesExclude>exclude()The destination covers every workspace of the organization except the workspaces on its list. final Optional<JsonValue>_json()final BetaTelemetryDestinationWorkspaces.Typetype()final BooleanisAll()final BooleanisInclude()final BooleanisExclude()final BetaTelemetryDestinationWorkspacesAllasAll()The destination covers every workspace of the organization, including the default workspace, archived workspaces, and workspaces created later. final BetaTelemetryDestinationWorkspacesIncludeasInclude()The destination covers the workspaces on its list, and no others. final BetaTelemetryDestinationWorkspacesExcludeasExclude()The destination covers every workspace of the organization except the workspaces on its list. final <T extends Any> Taccept(BetaTelemetryDestinationWorkspaces.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaTelemetryDestinationWorkspacesvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaTelemetryDestinationWorkspacesofAll(BetaTelemetryDestinationWorkspacesAll all)The destination covers every workspace of the organization, including the default workspace, archived workspaces, and workspaces created later. final static BetaTelemetryDestinationWorkspacesofInclude(BetaTelemetryDestinationWorkspacesInclude include)The destination covers the workspaces on its list, and no others. final static BetaTelemetryDestinationWorkspacesofExclude(BetaTelemetryDestinationWorkspacesExclude exclude)The destination covers every workspace of the organization except the workspaces on its list. -
-
Method Detail
-
all
final Optional<BetaTelemetryDestinationWorkspacesAll> all()
The destination covers every workspace of the organization, including the default workspace, archived workspaces, and workspaces created later. It doesn't have a list.
-
include
final Optional<BetaTelemetryDestinationWorkspacesInclude> include()
The destination covers the workspaces on its list, and no others.
-
exclude
final Optional<BetaTelemetryDestinationWorkspacesExclude> exclude()
The destination covers every workspace of the organization except the workspaces on its list. A workspace created later is covered until it is added to the list.
-
type
final BetaTelemetryDestinationWorkspaces.Type type()
-
asAll
final BetaTelemetryDestinationWorkspacesAll asAll()
The destination covers every workspace of the organization, including the default workspace, archived workspaces, and workspaces created later. It doesn't have a list.
-
asInclude
final BetaTelemetryDestinationWorkspacesInclude asInclude()
The destination covers the workspaces on its list, and no others.
-
asExclude
final BetaTelemetryDestinationWorkspacesExclude asExclude()
The destination covers every workspace of the organization except the workspaces on its list. A workspace created later is covered until it is added to the list.
-
accept
final <T extends Any> T accept(BetaTelemetryDestinationWorkspaces.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.anthropic.core.JsonValue; import java.util.Optional; Optional<String> result = betaTelemetryDestinationWorkspaces.accept(new BetaTelemetryDestinationWorkspaces.Visitor<Optional<String>>() { @Override public Optional<String> visitAll(BetaTelemetryDestinationWorkspacesAll all) { return Optional.of(all.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaTelemetryDestinationWorkspaces validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofAll
final static BetaTelemetryDestinationWorkspaces ofAll(BetaTelemetryDestinationWorkspacesAll all)
The destination covers every workspace of the organization, including the default workspace, archived workspaces, and workspaces created later. It doesn't have a list.
-
ofInclude
final static BetaTelemetryDestinationWorkspaces ofInclude(BetaTelemetryDestinationWorkspacesInclude include)
The destination covers the workspaces on its list, and no others.
-
ofExclude
final static BetaTelemetryDestinationWorkspaces ofExclude(BetaTelemetryDestinationWorkspacesExclude exclude)
The destination covers every workspace of the organization except the workspaces on its list. A workspace created later is covered until it is added to the list.
-
-
-
-