# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

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

__all__ = ['GitHubRepositoryArgs', 'GitHubRepository']

@pulumi.input_type
class GitHubRepositoryArgs:
    def __init__(__self__, *,
                 repository_name: pulumi.Input[str],
                 repository_owner: pulumi.Input[str],
                 code: Optional[pulumi.Input['GitHubRepositoryCodeArgs']] = None,
                 connection_arn: Optional[pulumi.Input[str]] = None,
                 enable_issues: Optional[pulumi.Input[bool]] = None,
                 is_private: Optional[pulumi.Input[bool]] = None,
                 repository_access_token: Optional[pulumi.Input[str]] = None,
                 repository_description: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a GitHubRepository resource.
        """
        pulumi.set(__self__, "repository_name", repository_name)
        pulumi.set(__self__, "repository_owner", repository_owner)
        if code is not None:
            pulumi.set(__self__, "code", code)
        if connection_arn is not None:
            pulumi.set(__self__, "connection_arn", connection_arn)
        if enable_issues is not None:
            pulumi.set(__self__, "enable_issues", enable_issues)
        if is_private is not None:
            pulumi.set(__self__, "is_private", is_private)
        if repository_access_token is not None:
            pulumi.set(__self__, "repository_access_token", repository_access_token)
        if repository_description is not None:
            pulumi.set(__self__, "repository_description", repository_description)

    @property
    @pulumi.getter(name="repositoryName")
    def repository_name(self) -> pulumi.Input[str]:
        return pulumi.get(self, "repository_name")

    @repository_name.setter
    def repository_name(self, value: pulumi.Input[str]):
        pulumi.set(self, "repository_name", value)

    @property
    @pulumi.getter(name="repositoryOwner")
    def repository_owner(self) -> pulumi.Input[str]:
        return pulumi.get(self, "repository_owner")

    @repository_owner.setter
    def repository_owner(self, value: pulumi.Input[str]):
        pulumi.set(self, "repository_owner", value)

    @property
    @pulumi.getter
    def code(self) -> Optional[pulumi.Input['GitHubRepositoryCodeArgs']]:
        return pulumi.get(self, "code")

    @code.setter
    def code(self, value: Optional[pulumi.Input['GitHubRepositoryCodeArgs']]):
        pulumi.set(self, "code", value)

    @property
    @pulumi.getter(name="connectionArn")
    def connection_arn(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "connection_arn")

    @connection_arn.setter
    def connection_arn(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "connection_arn", value)

    @property
    @pulumi.getter(name="enableIssues")
    def enable_issues(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "enable_issues")

    @enable_issues.setter
    def enable_issues(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "enable_issues", value)

    @property
    @pulumi.getter(name="isPrivate")
    def is_private(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "is_private")

    @is_private.setter
    def is_private(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "is_private", value)

    @property
    @pulumi.getter(name="repositoryAccessToken")
    def repository_access_token(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "repository_access_token")

    @repository_access_token.setter
    def repository_access_token(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "repository_access_token", value)

    @property
    @pulumi.getter(name="repositoryDescription")
    def repository_description(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "repository_description")

    @repository_description.setter
    def repository_description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "repository_description", value)


warnings.warn("""GitHubRepository is not yet supported by AWS Native, so its creation will currently fail. Please use the classic AWS provider, if possible.""", DeprecationWarning)


class GitHubRepository(pulumi.CustomResource):
    warnings.warn("""GitHubRepository is not yet supported by AWS Native, so its creation will currently fail. Please use the classic AWS provider, if possible.""", DeprecationWarning)

    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 code: Optional[pulumi.Input[pulumi.InputType['GitHubRepositoryCodeArgs']]] = None,
                 connection_arn: Optional[pulumi.Input[str]] = None,
                 enable_issues: Optional[pulumi.Input[bool]] = None,
                 is_private: Optional[pulumi.Input[bool]] = None,
                 repository_access_token: Optional[pulumi.Input[str]] = None,
                 repository_description: Optional[pulumi.Input[str]] = None,
                 repository_name: Optional[pulumi.Input[str]] = None,
                 repository_owner: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Resource Type definition for AWS::CodeStar::GitHubRepository

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: GitHubRepositoryArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Resource Type definition for AWS::CodeStar::GitHubRepository

        :param str resource_name: The name of the resource.
        :param GitHubRepositoryArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(GitHubRepositoryArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 code: Optional[pulumi.Input[pulumi.InputType['GitHubRepositoryCodeArgs']]] = None,
                 connection_arn: Optional[pulumi.Input[str]] = None,
                 enable_issues: Optional[pulumi.Input[bool]] = None,
                 is_private: Optional[pulumi.Input[bool]] = None,
                 repository_access_token: Optional[pulumi.Input[str]] = None,
                 repository_description: Optional[pulumi.Input[str]] = None,
                 repository_name: Optional[pulumi.Input[str]] = None,
                 repository_owner: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        pulumi.log.warn("""GitHubRepository is deprecated: GitHubRepository is not yet supported by AWS Native, so its creation will currently fail. Please use the classic AWS provider, if possible.""")
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = GitHubRepositoryArgs.__new__(GitHubRepositoryArgs)

            __props__.__dict__["code"] = code
            __props__.__dict__["connection_arn"] = connection_arn
            __props__.__dict__["enable_issues"] = enable_issues
            __props__.__dict__["is_private"] = is_private
            __props__.__dict__["repository_access_token"] = repository_access_token
            __props__.__dict__["repository_description"] = repository_description
            if repository_name is None and not opts.urn:
                raise TypeError("Missing required property 'repository_name'")
            __props__.__dict__["repository_name"] = repository_name
            if repository_owner is None and not opts.urn:
                raise TypeError("Missing required property 'repository_owner'")
            __props__.__dict__["repository_owner"] = repository_owner
        super(GitHubRepository, __self__).__init__(
            'aws-native:codestar:GitHubRepository',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None) -> 'GitHubRepository':
        """
        Get an existing GitHubRepository resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = GitHubRepositoryArgs.__new__(GitHubRepositoryArgs)

        __props__.__dict__["code"] = None
        __props__.__dict__["connection_arn"] = None
        __props__.__dict__["enable_issues"] = None
        __props__.__dict__["is_private"] = None
        __props__.__dict__["repository_access_token"] = None
        __props__.__dict__["repository_description"] = None
        __props__.__dict__["repository_name"] = None
        __props__.__dict__["repository_owner"] = None
        return GitHubRepository(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def code(self) -> pulumi.Output[Optional['outputs.GitHubRepositoryCode']]:
        return pulumi.get(self, "code")

    @property
    @pulumi.getter(name="connectionArn")
    def connection_arn(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "connection_arn")

    @property
    @pulumi.getter(name="enableIssues")
    def enable_issues(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "enable_issues")

    @property
    @pulumi.getter(name="isPrivate")
    def is_private(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "is_private")

    @property
    @pulumi.getter(name="repositoryAccessToken")
    def repository_access_token(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "repository_access_token")

    @property
    @pulumi.getter(name="repositoryDescription")
    def repository_description(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "repository_description")

    @property
    @pulumi.getter(name="repositoryName")
    def repository_name(self) -> pulumi.Output[str]:
        return pulumi.get(self, "repository_name")

    @property
    @pulumi.getter(name="repositoryOwner")
    def repository_owner(self) -> pulumi.Output[str]:
        return pulumi.get(self, "repository_owner")

