/** * * * <pre> * The full REST resource name for this channel. The syntax is: * projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] * The `[CHANNEL_ID]` is automatically assigned by the server on creation. * </pre> * * <code>string name = 6;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.monitoring.v3.NotificationChannel)) { return super.equals(obj); } com.google.monitoring.v3.NotificationChannel other = (com.google.monitoring.v3.NotificationChannel) obj; boolean result = true; result = result && getType().equals(other.getType()); result = result && getName().equals(other.getName()); result = result && getDisplayName().equals(other.getDisplayName()); result = result && getDescription().equals(other.getDescription()); result = result && internalGetLabels().equals(other.internalGetLabels()); result = result && internalGetUserLabels().equals(other.internalGetUserLabels()); result = result && verificationStatus_ == other.verificationStatus_; result = result && (hasEnabled() == other.hasEnabled()); if (hasEnabled()) { result = result && getEnabled().equals(other.getEnabled()); } result = result && unknownFields.equals(other.unknownFields); return result; }
hash = (53 * hash) + getType().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode();
public Builder mergeFrom(com.google.monitoring.v3.NotificationChannel other) { if (other == com.google.monitoring.v3.NotificationChannel.getDefaultInstance()) return this; if (!other.getType().isEmpty()) { type_ = other.type_; onChanged(); } if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); internalGetMutableUserLabels().mergeFrom(other.internalGetUserLabels()); if (other.verificationStatus_ != 0) { setVerificationStatusValue(other.getVerificationStatusValue()); } if (other.hasEnabled()) { mergeEnabled(other.getEnabled()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
NotificationChannel updatedChannel = client.updateNotificationChannel(NOTIFICATION_CHANNEL_UPDATE_MASK, channel); newChannelNames.put(channel.getName(), updatedChannel.getName()); channelUpdated = true; } catch (Exception e) { .clearVerificationStatus() .build()); newChannelNames.put(channel.getName(), newChannel.getName());