com.azure.communication.jobrouter.models.WorkerWeightedAllocation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-communication-jobrouter Show documentation
Show all versions of azure-communication-jobrouter Show documentation
This package contains a Java SDK for JobRouter Azure Communication Service.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.communication.jobrouter.models;
import com.azure.core.annotation.Generated;
import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Contains the weight percentage and worker selectors to be applied if selected for weighted distributions. */
@Immutable
public final class WorkerWeightedAllocation {
/*
* The percentage of this weight, expressed as a fraction of 1.
*/
@Generated
@JsonProperty(value = "weight")
private double weight;
/*
* A collection of worker selectors that will be applied if this allocation is
* selected.
*/
@Generated
@JsonProperty(value = "workerSelectors")
private List workerSelectors;
/**
* Creates an instance of WorkerWeightedAllocation class.
*
* @param weight the weight value to set.
* @param workerSelectors the workerSelectors value to set.
*/
@Generated
@JsonCreator
public WorkerWeightedAllocation(@JsonProperty(value = "weight") double weight,
@JsonProperty(value = "workerSelectors") List workerSelectors) {
this.weight = weight;
this.workerSelectors = workerSelectors;
}
/**
* Get the weight property: The percentage of this weight, expressed as a fraction of 1.
*
* @return the weight value.
*/
@Generated
public double getWeight() {
return this.weight;
}
/**
* Get the workerSelectors property: A collection of worker selectors that will be applied if this allocation is
* selected.
*
* @return the workerSelectors value.
*/
@Generated
public List getWorkerSelectors() {
return this.workerSelectors;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy