public Builder mergeFrom(com.google.monitoring.v3.CreateNotificationChannelRequest other) { if (other == com.google.monitoring.v3.CreateNotificationChannelRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.hasNotificationChannel()) { mergeNotificationChannel(other.getNotificationChannel()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public com.google.monitoring.v3.CreateNotificationChannelRequest buildPartial() { com.google.monitoring.v3.CreateNotificationChannelRequest result = new com.google.monitoring.v3.CreateNotificationChannelRequest(this); result.name_ = name_; if (notificationChannelBuilder_ == null) { result.notificationChannel_ = notificationChannel_; } else { result.notificationChannel_ = notificationChannelBuilder_.build(); } onBuilt(); return result; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (notificationChannel_ != null) { output.writeMessage(2, getNotificationChannel()); } if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); } unknownFields.writeTo(output); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (hasNotificationChannel()) { hash = (37 * hash) + NOTIFICATION_CHANNEL_FIELD_NUMBER; hash = (53 * hash) + getNotificationChannel().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@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; }
/** * * * <pre> * The project on which to execute the request. The format is: * projects/[PROJECT_ID] * Note that this names the container into which the channel will be * written. This does not name the newly created channel. The resulting * channel's name will have a normalized version of this field as a prefix, * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. * </pre> * * <code>string name = 3;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
(CreateNotificationChannelRequest) actualRequests.get(0); Assert.assertEquals(name, ProjectName.parse(actualRequest.getName())); Assert.assertEquals(notificationChannel, actualRequest.getNotificationChannel()); Assert.assertTrue( channelProvider.isHeaderSent(
@java.lang.Override public com.google.monitoring.v3.CreateNotificationChannelRequest getDefaultInstanceForType() { return com.google.monitoring.v3.CreateNotificationChannelRequest.getDefaultInstance(); }
/** * * * <pre> * The definition of the `NotificationChannel` to create. * </pre> * * <code>.google.monitoring.v3.NotificationChannel notification_channel = 2;</code> */ public com.google.monitoring.v3.NotificationChannelOrBuilder getNotificationChannelOrBuilder() { return getNotificationChannel(); }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
@java.lang.Override public com.google.monitoring.v3.CreateNotificationChannelRequest build() { com.google.monitoring.v3.CreateNotificationChannelRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (notificationChannel_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNotificationChannel()); } if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
io.grpc.protobuf.ProtoUtils.marshaller( com.google.monitoring.v3.CreateNotificationChannelRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
CreateNotificationChannelRequest.newBuilder() .setName(name) .setNotificationChannel(notificationChannel)
io.grpc.protobuf.ProtoUtils.marshaller( com.google.monitoring.v3.CreateNotificationChannelRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
CreateNotificationChannelRequest.newBuilder() .setName(name == null ? null : name.toString()) .setNotificationChannel(notificationChannel)
CreateNotificationChannelRequest.newBuilder() .setName(name) .setNotificationChannel(notificationChannel)
CreateNotificationChannelRequest.newBuilder() .setName(name == null ? null : name.toString()) .setNotificationChannel(notificationChannel)