@java.lang.Override public com.google.monitoring.v3.NotificationChannel getDefaultInstanceForType() { return com.google.monitoring.v3.NotificationChannel.getDefaultInstance(); }
@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; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * * * <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; } /**
/** * * * <pre> * The type of the notification channel. This field matches the * value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field. * </pre> * * <code>string type = 1;</code> */ public Builder clearType() { type_ = getDefaultInstance().getType(); onChanged(); return this; } /**
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; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getTypeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); } if (!getDisplayNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); } if (!getDescriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetUserLabels(), UserLabelsDefaultEntryHolder.defaultEntry, 8); if (verificationStatus_ != com.google.monitoring.v3.NotificationChannel.VerificationStatus .VERIFICATION_STATUS_UNSPECIFIED.getNumber()) { output.writeEnum(9, verificationStatus_); } if (enabled_ != null) { output.writeMessage(11, getEnabled()); } unknownFields.writeTo(output); }
/** * * * <pre> * An optional human-readable description of this notification channel. This * description may provide additional details, beyond the display * name, for the channel. This may not exceeed 1024 Unicode characters. * </pre> * * <code>string description = 4;</code> */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /**
/** * * * <pre> * An optional human-readable name for this notification channel. It is * recommended that you specify a non-empty and unique name in order to * make it easier to identify the channels in your project, though this is * not enforced. The display name is limited to 512 Unicode characters. * </pre> * * <code>string display_name = 3;</code> */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); onChanged(); return this; } /**
NotificationChannel updatedChannel = client.updateNotificationChannel(NOTIFICATION_CHANNEL_UPDATE_MASK, channel); newChannelNames.put(channel.getName(), updatedChannel.getName()); channelUpdated = true; } catch (Exception e) { ProjectName.of(projectId), channel .toBuilder() .clearName() .clearVerificationStatus() .build()); newChannelNames.put(channel.getName(), newChannel.getName());
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.monitoring.v3.CreateNotificationChannelRequest)) { return super.equals(obj); } com.google.monitoring.v3.CreateNotificationChannelRequest other = (com.google.monitoring.v3.CreateNotificationChannelRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && (hasNotificationChannel() == other.hasNotificationChannel()); if (hasNotificationChannel()) { result = result && getNotificationChannel().equals(other.getNotificationChannel()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.monitoring.v3.NotificationChannel.getDescriptor().getEnumTypes().get(0); }
@java.lang.Override public com.google.monitoring.v3.NotificationChannel buildPartial() { com.google.monitoring.v3.NotificationChannel result = new com.google.monitoring.v3.NotificationChannel(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.type_ = type_; result.name_ = name_; result.displayName_ = displayName_; result.description_ = description_; result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); result.userLabels_ = internalGetUserLabels(); result.userLabels_.makeImmutable(); result.verificationStatus_ = verificationStatus_; if (enabledBuilder_ == null) { result.enabled_ = enabled_; } else { result.enabled_ = enabledBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
if (!getTypeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); if (!getDisplayNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); if (!getDescriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = LabelsDefaultEntryHolder.defaultEntry size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, labels__); if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_); internalGetUserLabels().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> userLabels__ = UserLabelsDefaultEntryHolder.defaultEntry size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getEnabled());
public static Builder newBuilder(com.google.monitoring.v3.NotificationChannel prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.monitoring.v3.UpdateNotificationChannelRequest)) { return super.equals(obj); } com.google.monitoring.v3.UpdateNotificationChannelRequest other = (com.google.monitoring.v3.UpdateNotificationChannelRequest) obj; boolean result = true; result = result && (hasUpdateMask() == other.hasUpdateMask()); if (hasUpdateMask()) { result = result && getUpdateMask().equals(other.getUpdateMask()); } result = result && (hasNotificationChannel() == other.hasNotificationChannel()); if (hasNotificationChannel()) { result = result && getNotificationChannel().equals(other.getNotificationChannel()); } result = result && unknownFields.equals(other.unknownFields); return result; }
hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; 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(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); if (!internalGetUserLabels().getMap().isEmpty()) { hash = (37 * hash) + USER_LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetUserLabels().hashCode(); if (hasEnabled()) { hash = (37 * hash) + ENABLED_FIELD_NUMBER; hash = (53 * hash) + getEnabled().hashCode();