Skip to content

Commit

Permalink
Add "detached" bool to Subscription
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 314795690

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Jun 4 13:43:59 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 86285bbd54fbf9708838219e3422aa47fb8fc0b0
Source-Link: googleapis/googleapis@86285bb
  • Loading branch information
yoshi-automation authored and jskeet committed Jun 5, 2020
1 parent 4389faa commit ac924f2
Show file tree
Hide file tree
Showing 4 changed files with 233 additions and 180 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public void CreateSubscriptionRequestObject()
Filter = "",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
// Make the request
Subscription response = subscriberServiceApiClient.CreateSubscription(request);
Expand Down Expand Up @@ -77,6 +78,7 @@ public async Task CreateSubscriptionRequestObjectAsync()
Filter = "",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
// Make the request
Subscription response = await subscriberServiceApiClient.CreateSubscriptionAsync(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public void CreateSubscriptionRequestObject()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
Subscription expectedResponse = new Subscription
{
Expand All @@ -72,6 +73,7 @@ public void CreateSubscriptionRequestObject()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.CreateSubscription(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -104,6 +106,7 @@ public void CreateSubscriptionRequestObject()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
Subscription expectedResponse = new Subscription
{
Expand All @@ -125,6 +128,7 @@ public void CreateSubscriptionRequestObject()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.CreateSubscriptionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Subscription>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -166,6 +170,7 @@ public void CreateSubscription()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.CreateSubscription(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -205,6 +210,7 @@ public void CreateSubscription()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.CreateSubscriptionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Subscription>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -246,6 +252,7 @@ public void CreateSubscriptionResourceNames()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.CreateSubscription(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -285,6 +292,7 @@ public void CreateSubscriptionResourceNames()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.CreateSubscriptionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Subscription>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -323,6 +331,7 @@ public void GetSubscriptionRequestObject()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.GetSubscription(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -359,6 +368,7 @@ public void GetSubscriptionRequestObject()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.GetSubscriptionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Subscription>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -397,6 +407,7 @@ public void GetSubscription()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.GetSubscription(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -433,6 +444,7 @@ public void GetSubscription()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.GetSubscriptionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Subscription>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -471,6 +483,7 @@ public void GetSubscriptionResourceNames()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.GetSubscription(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -507,6 +520,7 @@ public void GetSubscriptionResourceNames()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.GetSubscriptionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Subscription>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -546,6 +560,7 @@ public void UpdateSubscriptionRequestObject()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.UpdateSubscription(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -583,6 +598,7 @@ public void UpdateSubscriptionRequestObject()
Filter = "filtere47ac9b2",
DeadLetterPolicy = new DeadLetterPolicy(),
RetryPolicy = new RetryPolicy(),
Detached = false,
};
mockGrpcClient.Setup(x => x.UpdateSubscriptionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Subscription>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SubscriberServiceApiClient client = new SubscriberServiceApiClientImpl(mockGrpcClient.Object, null);
Expand Down

0 comments on commit ac924f2

Please sign in to comment.