Skip to content

Commit 62e7838

Browse files
authored
fix: Rename LogDestinationName.getId() to LogDestinationName.getDestinationId() (#797)
1 parent e303a9b commit 62e7838

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎google-cloud-logging/src/main/java/com/google/cloud/logging/LogDestinationName.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public LogName toLogName(String logId) {
110110
}
111111

112112
/** Returns ID value associated with {@code LogDestinationName} object */
113-
public String getId() {
113+
public String getDestinationId() {
114114
return getValue().toString();
115115
}
116116

‎google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,24 +117,24 @@ public void testWriteOptionWithDestination() {
117117
LogDestinationName resource = (LogDestinationName) writeOption.getValue();
118118
assertEquals(WriteOption.OptionType.LOG_DESTINATION, writeOption.getOptionType());
119119
assertEquals(LogDestinationName.DestinationType.PROJECT, resource.getDestinationType());
120-
assertEquals(PROJECT_NAME, resource.getId());
120+
assertEquals(PROJECT_NAME, resource.getDestinationId());
121121

122122
writeOption = WriteOption.destination(LogDestinationName.billingAccount(BILLING_NAME));
123123
resource = (LogDestinationName) writeOption.getValue();
124124
assertEquals(WriteOption.OptionType.LOG_DESTINATION, writeOption.getOptionType());
125125
assertEquals(LogDestinationName.DestinationType.BILLINGACCOUNT, resource.getDestinationType());
126-
assertEquals(BILLING_NAME, resource.getId());
126+
assertEquals(BILLING_NAME, resource.getDestinationId());
127127

128128
writeOption = WriteOption.destination(LogDestinationName.folder(FOLDER_NAME));
129129
resource = (LogDestinationName) writeOption.getValue();
130130
assertEquals(WriteOption.OptionType.LOG_DESTINATION, writeOption.getOptionType());
131131
assertEquals(LogDestinationName.DestinationType.FOLDER, resource.getDestinationType());
132-
assertEquals(FOLDER_NAME, resource.getId());
132+
assertEquals(FOLDER_NAME, resource.getDestinationId());
133133

134134
writeOption = WriteOption.destination(LogDestinationName.organization(ORGANIZATION_NAME));
135135
resource = (LogDestinationName) writeOption.getValue();
136136
assertEquals(WriteOption.OptionType.LOG_DESTINATION, writeOption.getOptionType());
137137
assertEquals(LogDestinationName.DestinationType.ORGANIZATION, resource.getDestinationType());
138-
assertEquals(ORGANIZATION_NAME, resource.getId());
138+
assertEquals(ORGANIZATION_NAME, resource.getDestinationId());
139139
}
140140
}

0 commit comments

Comments
 (0)