# 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 pulumi
import pulumi.runtime

class EndpointGroup(pulumi.CustomResource):
    """
    Manages a V2 Neutron Endpoint Group resource within OpenStack.
    """
    def __init__(__self__, __name__, __opts__=None, description=None, endpoints=None, name=None, region=None, tenant_id=None, type=None, value_specs=None):
        """Create a EndpointGroup resource with the given unique name, props, and options."""
        if not __name__:
            raise TypeError('Missing resource name argument (for URN creation)')
        if not isinstance(__name__, basestring):
            raise TypeError('Expected resource name to be a string')
        if __opts__ and not isinstance(__opts__, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')

        __props__ = dict()

        if description and not isinstance(description, basestring):
            raise TypeError('Expected property description to be a basestring')
        __self__.description = description
        """
        The human-readable description for the group.
        Changing this updates the description of the existing group.
        """
        __props__['description'] = description

        if endpoints and not isinstance(endpoints, list):
            raise TypeError('Expected property endpoints to be a list')
        __self__.endpoints = endpoints
        """
        List of endpoints of the same type, for the endpoint group. The values will depend on the type.
        Changing this creates a new group.
        """
        __props__['endpoints'] = endpoints

        if name and not isinstance(name, basestring):
            raise TypeError('Expected property name to be a basestring')
        __self__.name = name
        """
        The name of the group. Changing this updates the name of
        the existing group.
        """
        __props__['name'] = name

        if region and not isinstance(region, basestring):
            raise TypeError('Expected property region to be a basestring')
        __self__.region = region
        """
        The region in which to obtain the V2 Networking client.
        A Networking client is needed to create an endpoint group. If omitted, the
        `region` argument of the provider is used. Changing this creates a new
        group.
        """
        __props__['region'] = region

        if tenant_id and not isinstance(tenant_id, basestring):
            raise TypeError('Expected property tenant_id to be a basestring')
        __self__.tenant_id = tenant_id
        """
        The owner of the group. Required if admin wants to
        create an endpoint group for another project. Changing this creates a new group.
        """
        __props__['tenantId'] = tenant_id

        if type and not isinstance(type, basestring):
            raise TypeError('Expected property type to be a basestring')
        __self__.type = type
        """
        The type of the endpoints in the group. A valid value is subnet, cidr, network, router, or vlan.
        Changing this creates a new group.
        """
        __props__['type'] = type

        if value_specs and not isinstance(value_specs, dict):
            raise TypeError('Expected property value_specs to be a dict')
        __self__.value_specs = value_specs
        """
        Map of additional options.
        """
        __props__['valueSpecs'] = value_specs

        super(EndpointGroup, __self__).__init__(
            'openstack:vpnaas/endpointGroup:EndpointGroup',
            __name__,
            __props__,
            __opts__)

    def set_outputs(self, outs):
        if 'description' in outs:
            self.description = outs['description']
        if 'endpoints' in outs:
            self.endpoints = outs['endpoints']
        if 'name' in outs:
            self.name = outs['name']
        if 'region' in outs:
            self.region = outs['region']
        if 'tenantId' in outs:
            self.tenant_id = outs['tenantId']
        if 'type' in outs:
            self.type = outs['type']
        if 'valueSpecs' in outs:
            self.value_specs = outs['valueSpecs']
