# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs

__all__ = [
    'GetContainerRepositoryResult',
    'AwaitableGetContainerRepositoryResult',
    'get_container_repository',
    'get_container_repository_output',
]

@pulumi.output_type
class GetContainerRepositoryResult:
    """
    A collection of values returned by getContainerRepository.
    """
    def __init__(__self__, billable_size_in_gbs=None, compartment_id=None, created_by=None, display_name=None, id=None, image_count=None, is_immutable=None, is_public=None, layer_count=None, layers_size_in_bytes=None, readmes=None, repository_id=None, state=None, time_created=None, time_last_pushed=None):
        if billable_size_in_gbs and not isinstance(billable_size_in_gbs, str):
            raise TypeError("Expected argument 'billable_size_in_gbs' to be a str")
        pulumi.set(__self__, "billable_size_in_gbs", billable_size_in_gbs)
        if compartment_id and not isinstance(compartment_id, str):
            raise TypeError("Expected argument 'compartment_id' to be a str")
        pulumi.set(__self__, "compartment_id", compartment_id)
        if created_by and not isinstance(created_by, str):
            raise TypeError("Expected argument 'created_by' to be a str")
        pulumi.set(__self__, "created_by", created_by)
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        pulumi.set(__self__, "display_name", display_name)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if image_count and not isinstance(image_count, int):
            raise TypeError("Expected argument 'image_count' to be a int")
        pulumi.set(__self__, "image_count", image_count)
        if is_immutable and not isinstance(is_immutable, bool):
            raise TypeError("Expected argument 'is_immutable' to be a bool")
        pulumi.set(__self__, "is_immutable", is_immutable)
        if is_public and not isinstance(is_public, bool):
            raise TypeError("Expected argument 'is_public' to be a bool")
        pulumi.set(__self__, "is_public", is_public)
        if layer_count and not isinstance(layer_count, int):
            raise TypeError("Expected argument 'layer_count' to be a int")
        pulumi.set(__self__, "layer_count", layer_count)
        if layers_size_in_bytes and not isinstance(layers_size_in_bytes, str):
            raise TypeError("Expected argument 'layers_size_in_bytes' to be a str")
        pulumi.set(__self__, "layers_size_in_bytes", layers_size_in_bytes)
        if readmes and not isinstance(readmes, list):
            raise TypeError("Expected argument 'readmes' to be a list")
        pulumi.set(__self__, "readmes", readmes)
        if repository_id and not isinstance(repository_id, str):
            raise TypeError("Expected argument 'repository_id' to be a str")
        pulumi.set(__self__, "repository_id", repository_id)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)
        if time_created and not isinstance(time_created, str):
            raise TypeError("Expected argument 'time_created' to be a str")
        pulumi.set(__self__, "time_created", time_created)
        if time_last_pushed and not isinstance(time_last_pushed, str):
            raise TypeError("Expected argument 'time_last_pushed' to be a str")
        pulumi.set(__self__, "time_last_pushed", time_last_pushed)

    @property
    @pulumi.getter(name="billableSizeInGbs")
    def billable_size_in_gbs(self) -> str:
        """
        Total storage size in GBs that will be charged.
        """
        return pulumi.get(self, "billable_size_in_gbs")

    @property
    @pulumi.getter(name="compartmentId")
    def compartment_id(self) -> str:
        """
        The OCID of the compartment in which the container repository exists.
        """
        return pulumi.get(self, "compartment_id")

    @property
    @pulumi.getter(name="createdBy")
    def created_by(self) -> str:
        """
        The id of the user or principal that created the resource.
        """
        return pulumi.get(self, "created_by")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> str:
        """
        The container repository name.
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container repository.  Example: `ocid1.containerrepo.oc1..exampleuniqueID`
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="imageCount")
    def image_count(self) -> int:
        """
        Total number of images.
        """
        return pulumi.get(self, "image_count")

    @property
    @pulumi.getter(name="isImmutable")
    def is_immutable(self) -> bool:
        """
        Whether the repository is immutable. Images cannot be overwritten in an immutable repository.
        """
        return pulumi.get(self, "is_immutable")

    @property
    @pulumi.getter(name="isPublic")
    def is_public(self) -> bool:
        """
        Whether the repository is public. A public repository allows unauthenticated access.
        """
        return pulumi.get(self, "is_public")

    @property
    @pulumi.getter(name="layerCount")
    def layer_count(self) -> int:
        """
        Total number of layers.
        """
        return pulumi.get(self, "layer_count")

    @property
    @pulumi.getter(name="layersSizeInBytes")
    def layers_size_in_bytes(self) -> str:
        """
        Total storage in bytes consumed by layers.
        """
        return pulumi.get(self, "layers_size_in_bytes")

    @property
    @pulumi.getter
    def readmes(self) -> Sequence['outputs.GetContainerRepositoryReadmeResult']:
        """
        Container repository readme.
        """
        return pulumi.get(self, "readmes")

    @property
    @pulumi.getter(name="repositoryId")
    def repository_id(self) -> str:
        return pulumi.get(self, "repository_id")

    @property
    @pulumi.getter
    def state(self) -> str:
        """
        The current state of the container repository.
        """
        return pulumi.get(self, "state")

    @property
    @pulumi.getter(name="timeCreated")
    def time_created(self) -> str:
        """
        An RFC 3339 timestamp indicating when the repository was created.
        """
        return pulumi.get(self, "time_created")

    @property
    @pulumi.getter(name="timeLastPushed")
    def time_last_pushed(self) -> str:
        """
        An RFC 3339 timestamp indicating when an image was last pushed to the repository.
        """
        return pulumi.get(self, "time_last_pushed")


class AwaitableGetContainerRepositoryResult(GetContainerRepositoryResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetContainerRepositoryResult(
            billable_size_in_gbs=self.billable_size_in_gbs,
            compartment_id=self.compartment_id,
            created_by=self.created_by,
            display_name=self.display_name,
            id=self.id,
            image_count=self.image_count,
            is_immutable=self.is_immutable,
            is_public=self.is_public,
            layer_count=self.layer_count,
            layers_size_in_bytes=self.layers_size_in_bytes,
            readmes=self.readmes,
            repository_id=self.repository_id,
            state=self.state,
            time_created=self.time_created,
            time_last_pushed=self.time_last_pushed)


def get_container_repository(repository_id: Optional[str] = None,
                             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetContainerRepositoryResult:
    """
    This data source provides details about a specific Container Repository resource in Oracle Cloud Infrastructure Artifacts service.

    Get container repository.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_container_repository = oci.Artifacts.get_container_repository(repository_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str repository_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container repository.  Example: `ocid1.containerrepo.oc1..exampleuniqueID`
    """
    __args__ = dict()
    __args__['repositoryId'] = repository_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:Artifacts/getContainerRepository:getContainerRepository', __args__, opts=opts, typ=GetContainerRepositoryResult).value

    return AwaitableGetContainerRepositoryResult(
        billable_size_in_gbs=__ret__.billable_size_in_gbs,
        compartment_id=__ret__.compartment_id,
        created_by=__ret__.created_by,
        display_name=__ret__.display_name,
        id=__ret__.id,
        image_count=__ret__.image_count,
        is_immutable=__ret__.is_immutable,
        is_public=__ret__.is_public,
        layer_count=__ret__.layer_count,
        layers_size_in_bytes=__ret__.layers_size_in_bytes,
        readmes=__ret__.readmes,
        repository_id=__ret__.repository_id,
        state=__ret__.state,
        time_created=__ret__.time_created,
        time_last_pushed=__ret__.time_last_pushed)


@_utilities.lift_output_func(get_container_repository)
def get_container_repository_output(repository_id: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetContainerRepositoryResult]:
    """
    This data source provides details about a specific Container Repository resource in Oracle Cloud Infrastructure Artifacts service.

    Get container repository.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_container_repository = oci.Artifacts.get_container_repository(repository_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str repository_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the container repository.  Example: `ocid1.containerrepo.oc1..exampleuniqueID`
    """
    ...
