io.opentelemetry.contrib.awsxray.GetSamplingRulesResponse Maven / Gradle / Ivy
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.contrib.awsxray;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.auto.value.AutoValue;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
@AutoValue
abstract class GetSamplingRulesResponse {
@JsonCreator
static GetSamplingRulesResponse create(
@JsonProperty("NextToken") String nextToken,
@JsonProperty("SamplingRuleRecords") List samplingRules) {
return new AutoValue_GetSamplingRulesResponse(nextToken, samplingRules);
}
@Nullable
abstract String getNextToken();
abstract List getSamplingRules();
@AutoValue
abstract static class SamplingRuleRecord {
@JsonCreator
static SamplingRuleRecord create(
@JsonProperty("CreatedAt") String createdAt,
@JsonProperty("ModifiedAt") String modifiedAt,
@JsonProperty("SamplingRule") SamplingRule rule) {
return new AutoValue_GetSamplingRulesResponse_SamplingRuleRecord(createdAt, modifiedAt, rule);
}
abstract String getCreatedAt();
abstract String getModifiedAt();
abstract SamplingRule getRule();
}
@AutoValue
abstract static class SamplingRule {
@JsonCreator
static SamplingRule create(
@JsonProperty("Attributes") Map attributes,
@JsonProperty("FixedRate") double fixedRate,
@JsonProperty("Host") String host,
@JsonProperty("HTTPMethod") String httpMethod,
@JsonProperty("Priority") int priority,
@JsonProperty("ReservoirSize") int reservoirSize,
@JsonProperty("ResourceARN") String resourceArn,
@JsonProperty("RuleARN") @Nullable String ruleArn,
@JsonProperty("RuleName") @Nullable String ruleName,
@JsonProperty("ServiceName") String serviceName,
@JsonProperty("ServiceType") String serviceType,
@JsonProperty("URLPath") String urlPath,
@JsonProperty("Version") int version) {
return new AutoValue_GetSamplingRulesResponse_SamplingRule(
attributes,
fixedRate,
host,
httpMethod,
priority,
reservoirSize,
resourceArn,
ruleArn,
ruleName,
serviceName,
serviceType,
urlPath,
version);
}
abstract Map getAttributes();
abstract double getFixedRate();
abstract String getHost();
abstract String getHttpMethod();
abstract int getPriority();
abstract int getReservoirSize();
abstract String getResourceArn();
@Nullable
abstract String getRuleArn();
@Nullable
abstract String getRuleName();
abstract String getServiceName();
abstract String getServiceType();
abstract String getUrlPath();
abstract int getVersion();
}
}