-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release Google.Cloud.ArtifactRegistry.V1 version 1.0.0-beta01 (#7345)
Changes in this release: Initial release.
- Loading branch information
Showing
25 changed files
with
4,994 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"distribution_name": "Google.Cloud.ArtifactRegistry.V1", | ||
"release_level": "beta", | ||
"client_documentation": "https://cloud.google.com/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/latest", | ||
"library_type": "GAPIC_AUTO" | ||
} |
571 changes: 571 additions & 0 deletions
571
...Registry.V1/Google.Cloud.ArtifactRegistry.V1.Snippets/ArtifactRegistryClientSnippets.g.cs
Large diffs are not rendered by default.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
...oogle.Cloud.ArtifactRegistry.V1.Snippets/Google.Cloud.ArtifactRegistry.V1.Snippets.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks> | ||
<TestTargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.1</TestTargetFrameworks> | ||
<IsPackable>false</IsPackable> | ||
<NoWarn>1701;1702;1705;xUnit2004;xUnit2013;AD0001</NoWarn> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Google.Cloud.ArtifactRegistry.V1\Google.Cloud.ArtifactRegistry.V1.csproj" /> | ||
<ProjectReference Include="..\..\..\tools\Google.Cloud.ClientTesting\Google.Cloud.ClientTesting.csproj" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" /> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="All" /> | ||
<PackageReference Include="Moq" Version="4.16.1" /> | ||
<PackageReference Include="System.Linq.Async" Version="5.0.0" /> | ||
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" /> | ||
<PackageReference Include="xunit" Version="2.4.1" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" /> | ||
<Analyzer Condition="Exists('..\..\..\tools\Google.Cloud.Tools.Analyzers\bin\$(Configuration)\netstandard1.3\publish\Google.Cloud.Tools.Analyzers.dll')" Include="..\..\..\tools\Google.Cloud.Tools.Analyzers\bin\$(Configuration)\netstandard1.3\publish\Google.Cloud.Tools.Analyzers.dll" /> | ||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" /> | ||
</ItemGroup> | ||
</Project> |
18 changes: 18 additions & 0 deletions
18
apis/Google.Cloud.ArtifactRegistry.V1/Google.Cloud.ArtifactRegistry.V1.Snippets/coverage.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<CoverageParams> | ||
<TargetExecutable>C:/Program Files/dotnet/dotnet.exe</TargetExecutable> | ||
<TargetArguments>test --no-build -c Release</TargetArguments> | ||
<Filters> | ||
<IncludeFilters> | ||
<FilterEntry> | ||
<ModuleMask>Google.Cloud.ArtifactRegistry.V1</ModuleMask> | ||
</FilterEntry> | ||
</IncludeFilters> | ||
</Filters> | ||
<AttributeFilters> | ||
<AttributeFilterEntry>System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute</AttributeFilterEntry> | ||
<AttributeFilterEntry>System.Diagnostics.DebuggerNonUserCodeAttribute</AttributeFilterEntry> | ||
</AttributeFilters> | ||
<TargetWorkingDir>.</TargetWorkingDir> | ||
<Output>../../../coverage/Google.Cloud.ArtifactRegistry.V1.Snippets.dvcr</Output> | ||
</CoverageParams> |
222 changes: 222 additions & 0 deletions
222
...rtifactRegistry.V1/Google.Cloud.ArtifactRegistry.V1.Tests/ArtifactRegistryClientTest.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,222 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
using gaxgrpc = Google.Api.Gax.Grpc; | ||
using wkt = Google.Protobuf.WellKnownTypes; | ||
using grpccore = Grpc.Core; | ||
using moq = Moq; | ||
using st = System.Threading; | ||
using stt = System.Threading.Tasks; | ||
using xunit = Xunit; | ||
|
||
namespace Google.Cloud.ArtifactRegistry.V1.Tests | ||
{ | ||
/// <summary>Generated unit tests.</summary> | ||
public sealed class GeneratedArtifactRegistryClientTest | ||
{ | ||
[xunit::FactAttribute] | ||
public void GetRepositoryRequestObject() | ||
{ | ||
moq::Mock<ArtifactRegistry.ArtifactRegistryClient> mockGrpcClient = new moq::Mock<ArtifactRegistry.ArtifactRegistryClient>(moq::MockBehavior.Strict); | ||
GetRepositoryRequest request = new GetRepositoryRequest | ||
{ | ||
RepositoryName = RepositoryName.FromProjectLocationRepository("[PROJECT]", "[LOCATION]", "[REPOSITORY]"), | ||
}; | ||
Repository expectedResponse = new Repository | ||
{ | ||
RepositoryName = RepositoryName.FromProjectLocationRepository("[PROJECT]", "[LOCATION]", "[REPOSITORY]"), | ||
Format = Repository.Types.Format.Yum, | ||
Description = "description2cf9da67", | ||
Labels = | ||
{ | ||
{ | ||
"key8a0b6e3c", | ||
"value60c16320" | ||
}, | ||
}, | ||
CreateTime = new wkt::Timestamp(), | ||
UpdateTime = new wkt::Timestamp(), | ||
KmsKeyName = "kms_key_name06bd122b", | ||
}; | ||
mockGrpcClient.Setup(x => x.GetRepository(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse); | ||
ArtifactRegistryClient client = new ArtifactRegistryClientImpl(mockGrpcClient.Object, null); | ||
Repository response = client.GetRepository(request); | ||
xunit::Assert.Same(expectedResponse, response); | ||
mockGrpcClient.VerifyAll(); | ||
} | ||
|
||
[xunit::FactAttribute] | ||
public async stt::Task GetRepositoryRequestObjectAsync() | ||
{ | ||
moq::Mock<ArtifactRegistry.ArtifactRegistryClient> mockGrpcClient = new moq::Mock<ArtifactRegistry.ArtifactRegistryClient>(moq::MockBehavior.Strict); | ||
GetRepositoryRequest request = new GetRepositoryRequest | ||
{ | ||
RepositoryName = RepositoryName.FromProjectLocationRepository("[PROJECT]", "[LOCATION]", "[REPOSITORY]"), | ||
}; | ||
Repository expectedResponse = new Repository | ||
{ | ||
RepositoryName = RepositoryName.FromProjectLocationRepository("[PROJECT]", "[LOCATION]", "[REPOSITORY]"), | ||
Format = Repository.Types.Format.Yum, | ||
Description = "description2cf9da67", | ||
Labels = | ||
{ | ||
{ | ||
"key8a0b6e3c", | ||
"value60c16320" | ||
}, | ||
}, | ||
CreateTime = new wkt::Timestamp(), | ||
UpdateTime = new wkt::Timestamp(), | ||
KmsKeyName = "kms_key_name06bd122b", | ||
}; | ||
mockGrpcClient.Setup(x => x.GetRepositoryAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Repository>(stt::Task.FromResult(expectedResponse), null, null, null, null)); | ||
ArtifactRegistryClient client = new ArtifactRegistryClientImpl(mockGrpcClient.Object, null); | ||
Repository responseCallSettings = await client.GetRepositoryAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); | ||
xunit::Assert.Same(expectedResponse, responseCallSettings); | ||
Repository responseCancellationToken = await client.GetRepositoryAsync(request, st::CancellationToken.None); | ||
xunit::Assert.Same(expectedResponse, responseCancellationToken); | ||
mockGrpcClient.VerifyAll(); | ||
} | ||
|
||
[xunit::FactAttribute] | ||
public void GetRepository() | ||
{ | ||
moq::Mock<ArtifactRegistry.ArtifactRegistryClient> mockGrpcClient = new moq::Mock<ArtifactRegistry.ArtifactRegistryClient>(moq::MockBehavior.Strict); | ||
GetRepositoryRequest request = new GetRepositoryRequest | ||
{ | ||
RepositoryName = RepositoryName.FromProjectLocationRepository("[PROJECT]", "[LOCATION]", "[REPOSITORY]"), | ||
}; | ||
Repository expectedResponse = new Repository | ||
{ | ||
RepositoryName = RepositoryName.FromProjectLocationRepository("[PROJECT]", "[LOCATION]", "[REPOSITORY]"), | ||
Format = Repository.Types.Format.Yum, | ||
Description = "description2cf9da67", | ||
Labels = | ||
{ | ||
{ | ||
"key8a0b6e3c", | ||
"value60c16320" | ||
}, | ||
}, | ||
CreateTime = new wkt::Timestamp(), | ||
UpdateTime = new wkt::Timestamp(), | ||
KmsKeyName = "kms_key_name06bd122b", | ||
}; | ||
mockGrpcClient.Setup(x => x.GetRepository(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse); | ||
ArtifactRegistryClient client = new ArtifactRegistryClientImpl(mockGrpcClient.Object, null); | ||
Repository response = client.GetRepository(request.Name); | ||
xunit::Assert.Same(expectedResponse, response); | ||
mockGrpcClient.VerifyAll(); | ||
} | ||
|
||
[xunit::FactAttribute] | ||
public async stt::Task GetRepositoryAsync() | ||
{ | ||
moq::Mock<ArtifactRegistry.ArtifactRegistryClient> mockGrpcClient = new moq::Mock<ArtifactRegistry.ArtifactRegistryClient>(moq::MockBehavior.Strict); | ||
GetRepositoryRequest request = new GetRepositoryRequest | ||
{ | ||
RepositoryName = RepositoryName.FromProjectLocationRepository("[PROJECT]", "[LOCATION]", "[REPOSITORY]"), | ||
}; | ||
Repository expectedResponse = new Repository | ||
{ | ||
RepositoryName = RepositoryName.FromProjectLocationRepository("[PROJECT]", "[LOCATION]", "[REPOSITORY]"), | ||
Format = Repository.Types.Format.Yum, | ||
Description = "description2cf9da67", | ||
Labels = | ||
{ | ||
{ | ||
"key8a0b6e3c", | ||
"value60c16320" | ||
}, | ||
}, | ||
CreateTime = new wkt::Timestamp(), | ||
UpdateTime = new wkt::Timestamp(), | ||
KmsKeyName = "kms_key_name06bd122b", | ||
}; | ||
mockGrpcClient.Setup(x => x.GetRepositoryAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Repository>(stt::Task.FromResult(expectedResponse), null, null, null, null)); | ||
ArtifactRegistryClient client = new ArtifactRegistryClientImpl(mockGrpcClient.Object, null); | ||
Repository responseCallSettings = await client.GetRepositoryAsync(request.Name, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); | ||
xunit::Assert.Same(expectedResponse, responseCallSettings); | ||
Repository responseCancellationToken = await client.GetRepositoryAsync(request.Name, st::CancellationToken.None); | ||
xunit::Assert.Same(expectedResponse, responseCancellationToken); | ||
mockGrpcClient.VerifyAll(); | ||
} | ||
|
||
[xunit::FactAttribute] | ||
public void GetRepositoryResourceNames() | ||
{ | ||
moq::Mock<ArtifactRegistry.ArtifactRegistryClient> mockGrpcClient = new moq::Mock<ArtifactRegistry.ArtifactRegistryClient>(moq::MockBehavior.Strict); | ||
GetRepositoryRequest request = new GetRepositoryRequest | ||
{ | ||
RepositoryName = RepositoryName.FromProjectLocationRepository("[PROJECT]", "[LOCATION]", "[REPOSITORY]"), | ||
}; | ||
Repository expectedResponse = new Repository | ||
{ | ||
RepositoryName = RepositoryName.FromProjectLocationRepository("[PROJECT]", "[LOCATION]", "[REPOSITORY]"), | ||
Format = Repository.Types.Format.Yum, | ||
Description = "description2cf9da67", | ||
Labels = | ||
{ | ||
{ | ||
"key8a0b6e3c", | ||
"value60c16320" | ||
}, | ||
}, | ||
CreateTime = new wkt::Timestamp(), | ||
UpdateTime = new wkt::Timestamp(), | ||
KmsKeyName = "kms_key_name06bd122b", | ||
}; | ||
mockGrpcClient.Setup(x => x.GetRepository(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse); | ||
ArtifactRegistryClient client = new ArtifactRegistryClientImpl(mockGrpcClient.Object, null); | ||
Repository response = client.GetRepository(request.RepositoryName); | ||
xunit::Assert.Same(expectedResponse, response); | ||
mockGrpcClient.VerifyAll(); | ||
} | ||
|
||
[xunit::FactAttribute] | ||
public async stt::Task GetRepositoryResourceNamesAsync() | ||
{ | ||
moq::Mock<ArtifactRegistry.ArtifactRegistryClient> mockGrpcClient = new moq::Mock<ArtifactRegistry.ArtifactRegistryClient>(moq::MockBehavior.Strict); | ||
GetRepositoryRequest request = new GetRepositoryRequest | ||
{ | ||
RepositoryName = RepositoryName.FromProjectLocationRepository("[PROJECT]", "[LOCATION]", "[REPOSITORY]"), | ||
}; | ||
Repository expectedResponse = new Repository | ||
{ | ||
RepositoryName = RepositoryName.FromProjectLocationRepository("[PROJECT]", "[LOCATION]", "[REPOSITORY]"), | ||
Format = Repository.Types.Format.Yum, | ||
Description = "description2cf9da67", | ||
Labels = | ||
{ | ||
{ | ||
"key8a0b6e3c", | ||
"value60c16320" | ||
}, | ||
}, | ||
CreateTime = new wkt::Timestamp(), | ||
UpdateTime = new wkt::Timestamp(), | ||
KmsKeyName = "kms_key_name06bd122b", | ||
}; | ||
mockGrpcClient.Setup(x => x.GetRepositoryAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Repository>(stt::Task.FromResult(expectedResponse), null, null, null, null)); | ||
ArtifactRegistryClient client = new ArtifactRegistryClientImpl(mockGrpcClient.Object, null); | ||
Repository responseCallSettings = await client.GetRepositoryAsync(request.RepositoryName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); | ||
xunit::Assert.Same(expectedResponse, responseCallSettings); | ||
Repository responseCancellationToken = await client.GetRepositoryAsync(request.RepositoryName, st::CancellationToken.None); | ||
xunit::Assert.Same(expectedResponse, responseCancellationToken); | ||
mockGrpcClient.VerifyAll(); | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...y.V1/Google.Cloud.ArtifactRegistry.V1.Tests/Google.Cloud.ArtifactRegistry.V1.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks> | ||
<TestTargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.1</TestTargetFrameworks> | ||
<IsPackable>false</IsPackable> | ||
<NoWarn>1701;1702;1705;xUnit2004;xUnit2013;AD0001</NoWarn> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Google.Cloud.ArtifactRegistry.V1\Google.Cloud.ArtifactRegistry.V1.csproj" /> | ||
<ProjectReference Include="..\..\..\tools\Google.Cloud.ClientTesting\Google.Cloud.ClientTesting.csproj" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" /> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="All" /> | ||
<PackageReference Include="Moq" Version="4.16.1" /> | ||
<PackageReference Include="System.Linq.Async" Version="5.0.0" /> | ||
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" /> | ||
<PackageReference Include="xunit" Version="2.4.1" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" /> | ||
<Analyzer Condition="Exists('..\..\..\tools\Google.Cloud.Tools.Analyzers\bin\$(Configuration)\netstandard1.3\publish\Google.Cloud.Tools.Analyzers.dll')" Include="..\..\..\tools\Google.Cloud.Tools.Analyzers\bin\$(Configuration)\netstandard1.3\publish\Google.Cloud.Tools.Analyzers.dll" /> | ||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.