Skip to content

Commit

Permalink
Release Google.Cloud.ArtifactRegistry.V1 version 1.0.0-beta01 (#7345)
Browse files Browse the repository at this point in the history
Changes in this release:

Initial release.
  • Loading branch information
jskeet committed Oct 14, 2021
1 parent 9197893 commit bf0d7d0
Show file tree
Hide file tree
Showing 25 changed files with 4,994 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"apis/Google.Cloud.AIPlatform.V1/Google.Cloud.AIPlatform.V1/**",
"apis/Google.Cloud.ApigeeConnect.V1/Google.Cloud.ApigeeConnect.V1/**",
"apis/Google.Cloud.AppEngine.V1/Google.Cloud.AppEngine.V1/**",
"apis/Google.Cloud.ArtifactRegistry.V1/Google.Cloud.ArtifactRegistry.V1/**",
"apis/Google.Cloud.ArtifactRegistry.V1Beta2/Google.Cloud.ArtifactRegistry.V1Beta2/**",
"apis/Google.Cloud.Asset.V1/Google.Cloud.Asset.V1/**",
"apis/Google.Cloud.AssuredWorkloads.V1/Google.Cloud.AssuredWorkloads.V1/**",
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Each package name links to the documentation for that package.
| [Google.Cloud.AIPlatform.V1](https://cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1/latest) | [![NuGet](https://img.shields.io/nuget/v/Google.Cloud.AIPlatform.V1)](https://nuget.org/packages/Google.Cloud.AIPlatform.V1) | [Cloud AI Platform](https://cloud.google.com/ai-platform/docs/) |
| [Google.Cloud.ApigeeConnect.V1](https://cloud.google.com/dotnet/docs/reference/Google.Cloud.ApigeeConnect.V1/latest) | [![NuGet](https://img.shields.io/nuget/v/Google.Cloud.ApigeeConnect.V1)](https://nuget.org/packages/Google.Cloud.ApigeeConnect.V1) | [Apigee Connect](https://cloud.google.com/apigee/docs/hybrid/v1.4/apigee-connect) |
| [Google.Cloud.AppEngine.V1](https://cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest) | [![NuGet](https://img.shields.io/nuget/v/Google.Cloud.AppEngine.V1)](https://nuget.org/packages/Google.Cloud.AppEngine.V1) | [App Engine Audit Data](https://cloud.google.com/appengine) |
| [Google.Cloud.ArtifactRegistry.V1Beta2](https://cloud.google.com/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1Beta2/latest) | [![NuGet](https://img.shields.io/nuget/v/Google.Cloud.ArtifactRegistry.V1Beta2)](https://nuget.org/packages/Google.Cloud.ArtifactRegistry.V1Beta2) | [Artifact Registry](https://cloud.google.com/artifact-registry) |
| [Google.Cloud.ArtifactRegistry.V1](https://cloud.google.com/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1/latest) | [![NuGet](https://img.shields.io/nuget/v/Google.Cloud.ArtifactRegistry.V1)](https://nuget.org/packages/Google.Cloud.ArtifactRegistry.V1) | [Artifact Registry (V1 API)](https://cloud.google.com/artifact-registry) |
| [Google.Cloud.ArtifactRegistry.V1Beta2](https://cloud.google.com/dotnet/docs/reference/Google.Cloud.ArtifactRegistry.V1Beta2/latest) | [![NuGet](https://img.shields.io/nuget/v/Google.Cloud.ArtifactRegistry.V1Beta2)](https://nuget.org/packages/Google.Cloud.ArtifactRegistry.V1Beta2) | [Artifact Registry (V1Beta2 API)](https://cloud.google.com/artifact-registry) |
| [Google.Cloud.Asset.V1](https://cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest) | [![NuGet](https://img.shields.io/nuget/v/Google.Cloud.Asset.V1)](https://nuget.org/packages/Google.Cloud.Asset.V1) | [Google Cloud Asset Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) |
| [Google.Cloud.AssuredWorkloads.V1](https://cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1/latest) | [![NuGet](https://img.shields.io/nuget/v/Google.Cloud.AssuredWorkloads.V1)](https://nuget.org/packages/Google.Cloud.AssuredWorkloads.V1) | [Assured Workloads (V1 API)](https://cloud.google.com/assured-workloads/docs) |
| [Google.Cloud.AssuredWorkloads.V1Beta1](https://cloud.google.com/dotnet/docs/reference/Google.Cloud.AssuredWorkloads.V1Beta1/latest) | [![NuGet](https://img.shields.io/nuget/v/Google.Cloud.AssuredWorkloads.V1Beta1)](https://nuget.org/packages/Google.Cloud.AssuredWorkloads.V1Beta1) | [Assured Workloads (V1Beta1 API)](https://cloud.google.com/assured-workloads/docs) |
Expand Down
6 changes: 6 additions & 0 deletions apis/Google.Cloud.ArtifactRegistry.V1/.repo-metadata.json
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"
}

Large diffs are not rendered by default.

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>
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>
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();
}
}
}
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>
Loading

0 comments on commit bf0d7d0

Please sign in to comment.