Skip to content

Commit

Permalink
feat: Automated regeneration of ArtifactRegistry client (googleapis#1…
Browse files Browse the repository at this point in the history
…2238)

Auto-created at 2024-09-28 13:16:48 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Sep 28, 2024
1 parent 99b3ab1 commit 43c88f7
Show file tree
Hide file tree
Showing 12 changed files with 1,999 additions and 536 deletions.
2 changes: 1 addition & 1 deletion clients/artifact_registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_artifact_registry, "~> 0.20"}]
[{:google_api_artifact_registry, "~> 0.21"}]
end
```

Expand Down
2,194 changes: 1,661 additions & 533 deletions clients/artifact_registry/lib/google_api/artifact_registry/v1/api/projects.ex

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.ArtifactRegistry.V1 do
API client metadata for GoogleApi.ArtifactRegistry.V1.
"""

@discovery_revision "20240903"
@discovery_revision "20240923"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright 2019 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
#
# http://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.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ArtifactRegistry.V1.Model.Attachment do
@moduledoc """
An Attachment refers to additional metadata that can be attached to artifacts in ArtifactRegistry. An attachment consists of one or more files.
## Attributes
* `annotations` (*type:* `map()`, *default:* `nil`) - Optional. User annotations. These attributes can only be set and used by the user, and not by Artifact Registry. See https://google.aip.dev/128#annotations for more details such as format and size limitations. Client specified annotations.
* `attachmentNamespace` (*type:* `String.t`, *default:* `nil`) - The namespace this attachment belongs to. E.g. If an Attachment is created by artifact analysis, namespace is set to artifactanalysis.googleapis.com.
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the attachment was created.
* `files` (*type:* `list(String.t)`, *default:* `nil`) - Required. The files that blong to this Attachment. If the file ID part contains slashes, they are escaped. E.g. "projects/p1/locations/us-central1/repositories/repo1/files/sha:".
* `name` (*type:* `String.t`, *default:* `nil`) - The name of the attachment. E.g. "projects/p1/locations/us/repositories/repo/attachments/sbom".
* `ociVersionName` (*type:* `String.t`, *default:* `nil`) - Output only. The name of the OCI version that this attachment created. Only populated for Docker attachments. E.g. "projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1".
* `target` (*type:* `String.t`, *default:* `nil`) - Required. The target the attachment is for, can be a Version, Package or Repository. E.g. "projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1".
* `type` (*type:* `String.t`, *default:* `nil`) - Type of Attachment. E.g. application/vnd.spdx+jsonn
* `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the attachment was last updated.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:annotations => map() | nil,
:attachmentNamespace => String.t() | nil,
:createTime => DateTime.t() | nil,
:files => list(String.t()) | nil,
:name => String.t() | nil,
:ociVersionName => String.t() | nil,
:target => String.t() | nil,
:type => String.t() | nil,
:updateTime => DateTime.t() | nil
}

field(:annotations, type: :map)
field(:attachmentNamespace)
field(:createTime, as: DateTime)
field(:files, type: :list)
field(:name)
field(:ociVersionName)
field(:target)
field(:type)
field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.ArtifactRegistry.V1.Model.Attachment do
def decode(value, options) do
GoogleApi.ArtifactRegistry.V1.Model.Attachment.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.ArtifactRegistry.V1.Model.Attachment do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ defmodule GoogleApi.ArtifactRegistry.V1.Model.GoogleDevtoolsArtifactregistryV1Fi
## Attributes
* `annotations` (*type:* `map()`, *default:* `nil`) - Optional. Client specified annotations.
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the File was created.
* `fetchTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote.
* `hashes` (*type:* `list(GoogleApi.ArtifactRegistry.V1.Model.Hash.t)`, *default:* `nil`) - The hashes of the file content.
Expand All @@ -33,6 +34,7 @@ defmodule GoogleApi.ArtifactRegistry.V1.Model.GoogleDevtoolsArtifactregistryV1Fi
use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:annotations => map() | nil,
:createTime => DateTime.t() | nil,
:fetchTime => DateTime.t() | nil,
:hashes => list(GoogleApi.ArtifactRegistry.V1.Model.Hash.t()) | nil,
Expand All @@ -42,6 +44,7 @@ defmodule GoogleApi.ArtifactRegistry.V1.Model.GoogleDevtoolsArtifactregistryV1Fi
:updateTime => DateTime.t() | nil
}

field(:annotations, type: :map)
field(:createTime, as: DateTime)
field(:fetchTime, as: DateTime)
field(:hashes, as: GoogleApi.ArtifactRegistry.V1.Model.Hash, type: :list)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright 2019 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
#
# http://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.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ArtifactRegistry.V1.Model.GoogleDevtoolsArtifactregistryV1Rule do
@moduledoc """
A Rule applies to repository or package level. It defines the deny or allow action of the operation when the conditions in the rule are met.
## Attributes
* `action` (*type:* `String.t`, *default:* `nil`) - The action this rule makes.
* `condition` (*type:* `GoogleApi.ArtifactRegistry.V1.Model.Expr.t`, *default:* `nil`) - Optional. The condition of the rule in CEL expression. If not provided, the rule matches all the objects.
* `name` (*type:* `String.t`, *default:* `nil`) - The name of the rule, for example: "projects/p1/locations/us-central1/repositories/repo1/rules/rule1".
* `operation` (*type:* `String.t`, *default:* `nil`) -
* `packageId` (*type:* `String.t`, *default:* `nil`) - The package ID the rule applies to. If empty, this rule applies to all the packages inside the repository.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:action => String.t() | nil,
:condition => GoogleApi.ArtifactRegistry.V1.Model.Expr.t() | nil,
:name => String.t() | nil,
:operation => String.t() | nil,
:packageId => String.t() | nil
}

field(:action)
field(:condition, as: GoogleApi.ArtifactRegistry.V1.Model.Expr)
field(:name)
field(:operation)
field(:packageId)
end

defimpl Poison.Decoder,
for: GoogleApi.ArtifactRegistry.V1.Model.GoogleDevtoolsArtifactregistryV1Rule do
def decode(value, options) do
GoogleApi.ArtifactRegistry.V1.Model.GoogleDevtoolsArtifactregistryV1Rule.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for: GoogleApi.ArtifactRegistry.V1.Model.GoogleDevtoolsArtifactregistryV1Rule do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2019 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
#
# http://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.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ArtifactRegistry.V1.Model.ListAttachmentsResponse do
@moduledoc """
The response from listing attachments.
## Attributes
* `attachments` (*type:* `list(GoogleApi.ArtifactRegistry.V1.Model.Attachment.t)`, *default:* `nil`) - The Attachments returned.
* `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The token to retrieve the next page of attachments, or empty if there are no more attachments to return.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:attachments => list(GoogleApi.ArtifactRegistry.V1.Model.Attachment.t()) | nil,
:nextPageToken => String.t() | nil
}

field(:attachments, as: GoogleApi.ArtifactRegistry.V1.Model.Attachment, type: :list)
field(:nextPageToken)
end

defimpl Poison.Decoder, for: GoogleApi.ArtifactRegistry.V1.Model.ListAttachmentsResponse do
def decode(value, options) do
GoogleApi.ArtifactRegistry.V1.Model.ListAttachmentsResponse.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.ArtifactRegistry.V1.Model.ListAttachmentsResponse do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright 2019 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
#
# http://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.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ArtifactRegistry.V1.Model.ListRulesResponse do
@moduledoc """
The response from listing rules.
## Attributes
* `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The token to retrieve the next page of rules, or empty if there are no more rules to return.
* `rules` (*type:* `list(GoogleApi.ArtifactRegistry.V1.Model.GoogleDevtoolsArtifactregistryV1Rule.t)`, *default:* `nil`) - The rules returned.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:nextPageToken => String.t() | nil,
:rules =>
list(GoogleApi.ArtifactRegistry.V1.Model.GoogleDevtoolsArtifactregistryV1Rule.t())
| nil
}

field(:nextPageToken)

field(:rules,
as: GoogleApi.ArtifactRegistry.V1.Model.GoogleDevtoolsArtifactregistryV1Rule,
type: :list
)
end

defimpl Poison.Decoder, for: GoogleApi.ArtifactRegistry.V1.Model.ListRulesResponse do
def decode(value, options) do
GoogleApi.ArtifactRegistry.V1.Model.ListRulesResponse.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.ArtifactRegistry.V1.Model.ListRulesResponse do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2019 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
#
# http://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.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ArtifactRegistry.V1.Model.UploadFileMediaResponse do
@moduledoc """
The response to upload a generic artifact.
## Attributes
* `operation` (*type:* `GoogleApi.ArtifactRegistry.V1.Model.Operation.t`, *default:* `nil`) - Operation that will be returned to the user.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:operation => GoogleApi.ArtifactRegistry.V1.Model.Operation.t() | nil
}

field(:operation, as: GoogleApi.ArtifactRegistry.V1.Model.Operation)
end

defimpl Poison.Decoder, for: GoogleApi.ArtifactRegistry.V1.Model.UploadFileMediaResponse do
def decode(value, options) do
GoogleApi.ArtifactRegistry.V1.Model.UploadFileMediaResponse.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.ArtifactRegistry.V1.Model.UploadFileMediaResponse do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2019 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
#
# http://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.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ArtifactRegistry.V1.Model.UploadFileRequest do
@moduledoc """
The request to upload a file.
## Attributes
* `fileId` (*type:* `String.t`, *default:* `nil`) - Optional. The ID of the file. If left empty will default to sha256 digest of the content uploaded.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:fileId => String.t() | nil
}

field(:fileId)
end

defimpl Poison.Decoder, for: GoogleApi.ArtifactRegistry.V1.Model.UploadFileRequest do
def decode(value, options) do
GoogleApi.ArtifactRegistry.V1.Model.UploadFileRequest.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.ArtifactRegistry.V1.Model.UploadFileRequest do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Loading

0 comments on commit 43c88f7

Please sign in to comment.