// resourceIssue is used to define a JIRA issue
resourceIssue is used to define a JIRA issue
// resourceIssue is used to define a JIRA issue
func resourceIssue() *schema.Resource {
	return &schema.Resource{
		Create: resourceIssueCreate,
		Read:   resourceIssueRead,
		Update: resourceIssueUpdate,
		Delete: resourceIssueDelete,
		Importer: &schema.ResourceImporter{
			State: resourceIssueImport,
		},
		Schema: map[string]*schema.Schema{
			"assignee": &schema.Schema{
				Type:             schema.TypeString,
				Optional:         true,
				DiffSuppressFunc: caseInsensitiveSuppressFunc,
			},
			"reporter": &schema.Schema{
				Type:     schema.TypeString,
				Optional: true,
				DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
					if new == "" {
						return true
					}
					return caseInsensitiveSuppressFunc(k, old, new, d)
				},
			},
			"fields": &schema.Schema{
				Type:     schema.TypeMap,
				Optional: true,
				Elem: &schema.Schema{
					Type:     schema.TypeString,
					Required: true,
				},
			},
			"issue_type": &schema.Schema{
				Type:     schema.TypeString,
				Required: true,
			},
			"description": &schema.Schema{
				Type:     schema.TypeString,
				Optional: true,
				Default:  "",
			},
			"labels": &schema.Schema{
				Type:     schema.TypeList,
				Optional: true,
				Elem:     &schema.Schema{Type: schema.TypeString},
			},
			"summary": &schema.Schema{
				Type:     schema.TypeString,
				Required: true,
			},
			"project_key": &schema.Schema{
				Type:     schema.TypeString,
				Required: true,
			},
			"state": &schema.Schema{
				Type:     schema.TypeString,
				Optional: true,
				DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
					if new == "" {
						return true
					}
					return old == new
				},
			},
			"state_transition": &schema.Schema{
				Type:     schema.TypeString,
				Optional: true,
			},
			"delete_transition": &schema.Schema{
				Type:     schema.TypeString,
				Optional: true,
			},
			"issue_key": &schema.Schema{
				Type:     schema.TypeString,
				Computed: true,
			},
		},
	}
}
func resourceIssue ( ) * schema . Resource { return & schema . Resource { Create : resourceIssueCreate , Read : resourceIssueRead , Update : resourceIssueUpdate , Delete : resourceIssueDelete , Importer : & schema . ResourceImporter { State : resourceIssueImport , } , Schema : map [ string ] * schema . Schema { " " : & schema . Schema { Type : schema . TypeString , Optional : true , DiffSuppressFunc : caseInsensitiveSuppressFunc , } , " " : & schema . Schema { Type : schema . TypeString , Optional : true , DiffSuppressFunc : func ( k , old , new string , d * schema . ResourceData ) bool { if new == " " { return true } return caseInsensitiveSuppressFunc ( k , old , new , d ) } , } , " " : & schema . Schema { Type : schema . TypeMap , Optional : true , Elem : & schema . Schema { Type : schema . TypeString , Required : true , } , } , " " : & schema . Schema { Type : schema . TypeString , Required : true , } , " " : & schema . Schema { Type : schema . TypeString , Optional : true , Default : " " , } , " " : & schema . Schema { Type : schema . TypeList , Optional : true , Elem : & schema . Schema { Type : schema . TypeString } , } , " " : & schema . Schema { Type : schema . TypeString , Required : true , } , " " : & schema . Schema { Type : schema . TypeString , Required : true , } , " " : & schema . Schema { Type : schema . TypeString , Optional : true , DiffSuppressFunc : func ( k , old , new string , d * schema . ResourceData ) bool { if new == " " { return true } return old == new } , } , " " : & schema . Schema { Type : schema . TypeString , Optional : true , } , " " : & schema . Schema { Type : schema . TypeString , Optional : true , } , " " : & schema . Schema { Type : schema . TypeString , Computed : true , } , } , } }
resourceIssue is used to define a JIRA issue
resourceIssue is used to define a JIRA issue
// Computed values