Skip to content

Commit df2dbd5

Browse files
committed
Add missing Javadoc for MonitoredResourceMapping
1 parent 1da6cec commit df2dbd5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MonitoredResourceMapping.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,40 @@
1919
import java.util.Set;
2020
import javax.annotation.concurrent.Immutable;
2121

22+
/**
23+
* This class holds the mapping between Google Cloud's monitored resource type and the labels for
24+
* identifying the given monitored resource type.
25+
*/
2226
@Immutable
2327
public final class MonitoredResourceMapping {
2428
private final String mrType;
2529
private final Set<String> mrLabels;
2630

31+
/**
32+
* Public constructor.
33+
*
34+
* @param mrType The monitored resource type for which the mapping is being specified.
35+
* @param mrLabels A set of labels which uniquely identify a given monitored resource.
36+
*/
2737
public MonitoredResourceMapping(String mrType, Set<String> mrLabels) {
2838
this.mrType = mrType;
2939
this.mrLabels = mrLabels;
3040
}
3141

42+
/**
43+
* Returns the set of labels used to identify the monitored resource represented in this mapping.
44+
*
45+
* @return Immutable set of labels that map to the specified monitored resource type.
46+
*/
3247
public Set<String> getMonitoredResourceLabels() {
3348
return Collections.unmodifiableSet(mrLabels);
3449
}
3550

51+
/**
52+
* The type of the monitored resource for which mapping is defined.
53+
*
54+
* @return The type of the monitored resource.
55+
*/
3656
public String getMonitoredResourceType() {
3757
return this.mrType;
3858
}

0 commit comments

Comments
 (0)