/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.xray.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* A document specifying changes to a sampling rule's configuration. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SamplingRuleUpdate implements Serializable, Cloneable, StructuredPojo { /** ** The name of the sampling rule. Specify a rule by either name or ARN, but not both. *
*/ private String ruleName; /** ** The ARN of the sampling rule. Specify a rule by either name or ARN, but not both. *
*/ private String ruleARN; /** ** Matches the ARN of the Amazon Web Services resource on which the service runs. *
*/ private String resourceARN; /** ** The priority of the sampling rule. *
*/ private Integer priority; /** ** The percentage of matching requests to instrument, after the reservoir is exhausted. *
*/ private Double fixedRate; /** ** A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is * not used directly by services, but applies to all services using the rule collectively. *
*/ private Integer reservoirSize; /** ** Matches the hostname from a request URL. *
*/ private String host; /** *
* Matches the name
that the service uses to identify itself in segments.
*
* Matches the origin
that the service uses to identify its type in segments.
*
* Matches the HTTP method of a request. *
*/ private String hTTPMethod; /** ** Matches the path from a request URL. *
*/ private String uRLPath; /** ** Matches attributes derived from the request. *
*/ private java.util.Map* The name of the sampling rule. Specify a rule by either name or ARN, but not both. *
* * @param ruleName * The name of the sampling rule. Specify a rule by either name or ARN, but not both. */ public void setRuleName(String ruleName) { this.ruleName = ruleName; } /** ** The name of the sampling rule. Specify a rule by either name or ARN, but not both. *
* * @return The name of the sampling rule. Specify a rule by either name or ARN, but not both. */ public String getRuleName() { return this.ruleName; } /** ** The name of the sampling rule. Specify a rule by either name or ARN, but not both. *
* * @param ruleName * The name of the sampling rule. Specify a rule by either name or ARN, but not both. * @return Returns a reference to this object so that method calls can be chained together. */ public SamplingRuleUpdate withRuleName(String ruleName) { setRuleName(ruleName); return this; } /** ** The ARN of the sampling rule. Specify a rule by either name or ARN, but not both. *
* * @param ruleARN * The ARN of the sampling rule. Specify a rule by either name or ARN, but not both. */ public void setRuleARN(String ruleARN) { this.ruleARN = ruleARN; } /** ** The ARN of the sampling rule. Specify a rule by either name or ARN, but not both. *
* * @return The ARN of the sampling rule. Specify a rule by either name or ARN, but not both. */ public String getRuleARN() { return this.ruleARN; } /** ** The ARN of the sampling rule. Specify a rule by either name or ARN, but not both. *
* * @param ruleARN * The ARN of the sampling rule. Specify a rule by either name or ARN, but not both. * @return Returns a reference to this object so that method calls can be chained together. */ public SamplingRuleUpdate withRuleARN(String ruleARN) { setRuleARN(ruleARN); return this; } /** ** Matches the ARN of the Amazon Web Services resource on which the service runs. *
* * @param resourceARN * Matches the ARN of the Amazon Web Services resource on which the service runs. */ public void setResourceARN(String resourceARN) { this.resourceARN = resourceARN; } /** ** Matches the ARN of the Amazon Web Services resource on which the service runs. *
* * @return Matches the ARN of the Amazon Web Services resource on which the service runs. */ public String getResourceARN() { return this.resourceARN; } /** ** Matches the ARN of the Amazon Web Services resource on which the service runs. *
* * @param resourceARN * Matches the ARN of the Amazon Web Services resource on which the service runs. * @return Returns a reference to this object so that method calls can be chained together. */ public SamplingRuleUpdate withResourceARN(String resourceARN) { setResourceARN(resourceARN); return this; } /** ** The priority of the sampling rule. *
* * @param priority * The priority of the sampling rule. */ public void setPriority(Integer priority) { this.priority = priority; } /** ** The priority of the sampling rule. *
* * @return The priority of the sampling rule. */ public Integer getPriority() { return this.priority; } /** ** The priority of the sampling rule. *
* * @param priority * The priority of the sampling rule. * @return Returns a reference to this object so that method calls can be chained together. */ public SamplingRuleUpdate withPriority(Integer priority) { setPriority(priority); return this; } /** ** The percentage of matching requests to instrument, after the reservoir is exhausted. *
* * @param fixedRate * The percentage of matching requests to instrument, after the reservoir is exhausted. */ public void setFixedRate(Double fixedRate) { this.fixedRate = fixedRate; } /** ** The percentage of matching requests to instrument, after the reservoir is exhausted. *
* * @return The percentage of matching requests to instrument, after the reservoir is exhausted. */ public Double getFixedRate() { return this.fixedRate; } /** ** The percentage of matching requests to instrument, after the reservoir is exhausted. *
* * @param fixedRate * The percentage of matching requests to instrument, after the reservoir is exhausted. * @return Returns a reference to this object so that method calls can be chained together. */ public SamplingRuleUpdate withFixedRate(Double fixedRate) { setFixedRate(fixedRate); return this; } /** ** A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is * not used directly by services, but applies to all services using the rule collectively. *
* * @param reservoirSize * A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The * reservoir is not used directly by services, but applies to all services using the rule collectively. */ public void setReservoirSize(Integer reservoirSize) { this.reservoirSize = reservoirSize; } /** ** A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is * not used directly by services, but applies to all services using the rule collectively. *
* * @return A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The * reservoir is not used directly by services, but applies to all services using the rule collectively. */ public Integer getReservoirSize() { return this.reservoirSize; } /** ** A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is * not used directly by services, but applies to all services using the rule collectively. *
* * @param reservoirSize * A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The * reservoir is not used directly by services, but applies to all services using the rule collectively. * @return Returns a reference to this object so that method calls can be chained together. */ public SamplingRuleUpdate withReservoirSize(Integer reservoirSize) { setReservoirSize(reservoirSize); return this; } /** ** Matches the hostname from a request URL. *
* * @param host * Matches the hostname from a request URL. */ public void setHost(String host) { this.host = host; } /** ** Matches the hostname from a request URL. *
* * @return Matches the hostname from a request URL. */ public String getHost() { return this.host; } /** ** Matches the hostname from a request URL. *
* * @param host * Matches the hostname from a request URL. * @return Returns a reference to this object so that method calls can be chained together. */ public SamplingRuleUpdate withHost(String host) { setHost(host); return this; } /** *
* Matches the name
that the service uses to identify itself in segments.
*
name
that the service uses to identify itself in segments.
*/
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
/**
*
* Matches the name
that the service uses to identify itself in segments.
*
name
that the service uses to identify itself in segments.
*/
public String getServiceName() {
return this.serviceName;
}
/**
*
* Matches the name
that the service uses to identify itself in segments.
*
name
that the service uses to identify itself in segments.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SamplingRuleUpdate withServiceName(String serviceName) {
setServiceName(serviceName);
return this;
}
/**
*
* Matches the origin
that the service uses to identify its type in segments.
*
origin
that the service uses to identify its type in segments.
*/
public void setServiceType(String serviceType) {
this.serviceType = serviceType;
}
/**
*
* Matches the origin
that the service uses to identify its type in segments.
*
origin
that the service uses to identify its type in segments.
*/
public String getServiceType() {
return this.serviceType;
}
/**
*
* Matches the origin
that the service uses to identify its type in segments.
*
origin
that the service uses to identify its type in segments.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SamplingRuleUpdate withServiceType(String serviceType) {
setServiceType(serviceType);
return this;
}
/**
* * Matches the HTTP method of a request. *
* * @param hTTPMethod * Matches the HTTP method of a request. */ public void setHTTPMethod(String hTTPMethod) { this.hTTPMethod = hTTPMethod; } /** ** Matches the HTTP method of a request. *
* * @return Matches the HTTP method of a request. */ public String getHTTPMethod() { return this.hTTPMethod; } /** ** Matches the HTTP method of a request. *
* * @param hTTPMethod * Matches the HTTP method of a request. * @return Returns a reference to this object so that method calls can be chained together. */ public SamplingRuleUpdate withHTTPMethod(String hTTPMethod) { setHTTPMethod(hTTPMethod); return this; } /** ** Matches the path from a request URL. *
* * @param uRLPath * Matches the path from a request URL. */ public void setURLPath(String uRLPath) { this.uRLPath = uRLPath; } /** ** Matches the path from a request URL. *
* * @return Matches the path from a request URL. */ public String getURLPath() { return this.uRLPath; } /** ** Matches the path from a request URL. *
* * @param uRLPath * Matches the path from a request URL. * @return Returns a reference to this object so that method calls can be chained together. */ public SamplingRuleUpdate withURLPath(String uRLPath) { setURLPath(uRLPath); return this; } /** ** Matches attributes derived from the request. *
* * @return Matches attributes derived from the request. */ public java.util.Map* Matches attributes derived from the request. *
* * @param attributes * Matches attributes derived from the request. */ public void setAttributes(java.util.Map* Matches attributes derived from the request. *
* * @param attributes * Matches attributes derived from the request. * @return Returns a reference to this object so that method calls can be chained together. */ public SamplingRuleUpdate withAttributes(java.util.Map