public Builder mergeFrom(com.google.monitoring.v3.UpdateNotificationChannelRequest other) { if (other == com.google.monitoring.v3.UpdateNotificationChannelRequest.getDefaultInstance()) return this; if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } 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 void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } if (notificationChannel_ != null) { output.writeMessage(3, getNotificationChannel()); } unknownFields.writeTo(output); }
@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; }
@java.lang.Override public com.google.monitoring.v3.UpdateNotificationChannelRequest getDefaultInstanceForType() { return com.google.monitoring.v3.UpdateNotificationChannelRequest.getDefaultInstance(); }
/** * * * <pre> * The fields to update. * </pre> * * <code>.google.protobuf.FieldMask update_mask = 2;</code> */ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); }
/** * * * <pre> * A description of the changes to be applied to the specified * notification channel. The description must provide a definition for * fields to be updated; the names of these fields should also be * included in the `update_mask`. * </pre> * * <code>.google.monitoring.v3.NotificationChannel notification_channel = 3;</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.UpdateNotificationChannelRequest buildPartial() { com.google.monitoring.v3.UpdateNotificationChannelRequest result = new com.google.monitoring.v3.UpdateNotificationChannelRequest(this); if (updateMaskBuilder_ == null) { result.updateMask_ = updateMask_; } else { result.updateMask_ = updateMaskBuilder_.build(); } if (notificationChannelBuilder_ == null) { result.notificationChannel_ = notificationChannel_; } else { result.notificationChannel_ = notificationChannelBuilder_.build(); } onBuilt(); return result; }
@java.lang.Override public com.google.monitoring.v3.UpdateNotificationChannelRequest build() { com.google.monitoring.v3.UpdateNotificationChannelRequest 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 (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } if (notificationChannel_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNotificationChannel()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
io.grpc.protobuf.ProtoUtils.marshaller( com.google.monitoring.v3.UpdateNotificationChannelRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasUpdateMask()) { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } if (hasNotificationChannel()) { hash = (37 * hash) + NOTIFICATION_CHANNEL_FIELD_NUMBER; hash = (53 * hash) + getNotificationChannel().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
(UpdateNotificationChannelRequest) actualRequests.get(0); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertEquals(notificationChannel, actualRequest.getNotificationChannel()); Assert.assertTrue( channelProvider.isHeaderSent(
/** * Updates a notification channel. Fields not specified in the field mask remain unchanged. * * <p>Sample code: * * <pre><code> * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { * FieldMask updateMask = FieldMask.newBuilder().build(); * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build(); * NotificationChannel response = notificationChannelServiceClient.updateNotificationChannel(updateMask, notificationChannel); * } * </code></pre> * * @param updateMask The fields to update. * @param notificationChannel A description of the changes to be applied to the specified * notification channel. The description must provide a definition for fields to be updated; * the names of these fields should also be included in the `update_mask`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final NotificationChannel updateNotificationChannel( FieldMask updateMask, NotificationChannel notificationChannel) { UpdateNotificationChannelRequest request = UpdateNotificationChannelRequest.newBuilder() .setUpdateMask(updateMask) .setNotificationChannel(notificationChannel) .build(); return updateNotificationChannel(request); }
io.grpc.protobuf.ProtoUtils.marshaller( com.google.monitoring.v3.UpdateNotificationChannelRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
/** * Updates a notification channel. Fields not specified in the field mask remain unchanged. * * <p>Sample code: * * <pre><code> * try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { * FieldMask updateMask = FieldMask.newBuilder().build(); * NotificationChannel notificationChannel = NotificationChannel.newBuilder().build(); * NotificationChannel response = notificationChannelServiceClient.updateNotificationChannel(updateMask, notificationChannel); * } * </code></pre> * * @param updateMask The fields to update. * @param notificationChannel A description of the changes to be applied to the specified * notification channel. The description must provide a definition for fields to be updated; * the names of these fields should also be included in the `update_mask`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final NotificationChannel updateNotificationChannel( FieldMask updateMask, NotificationChannel notificationChannel) { UpdateNotificationChannelRequest request = UpdateNotificationChannelRequest.newBuilder() .setUpdateMask(updateMask) .setNotificationChannel(notificationChannel) .build(); return updateNotificationChannel(request); }