github.com/IBM-Cloud/bluemix-go@v0.0.0-20240423071914-9e96525baef4/models/resource_service_instance.go (about)

     1  package models
     2  
     3  import (
     4  	"time"
     5  
     6  	"github.com/IBM-Cloud/bluemix-go/crn"
     7  )
     8  
     9  type MetadataType struct {
    10  	ID        string     `json:"id"`
    11  	Guid      string     `json:"guid"`
    12  	Url       string     `json:"url"`
    13  	CreatedAt *time.Time `json:"created_at"`
    14  	UpdatedAt *time.Time `json:"updated_at"`
    15  	DeletedAt *time.Time `json:"deleted_at"`
    16  }
    17  type ServiceInstance struct {
    18  	*MetadataType
    19  	Name                string `json:"name"`
    20  	RegionID            string `json:"region_id"`
    21  	AccountID           string `json:"account_id"`
    22  	ServicePlanID       string `json:"resource_plan_id"`
    23  	ServicePlanName     string
    24  	ResourceGroupID     string `json:"resource_group_id"`
    25  	ResourceGroupName   string
    26  	Crn                 crn.CRN                `json:"crn,omitempty"`
    27  	Tags                []string               `json:"tags,omitempty"`
    28  	Parameters          map[string]interface{} `json:"parameters,omitempty"`
    29  	Extensions          map[string]interface{} `json:"extensions,omitempty"`
    30  	CreateTime          int64                  `json:"create_time"`
    31  	State               string                 `json:"state"`
    32  	Type                string                 `json:"type"`
    33  	ServiceID           string                 `json:"resource_id"`
    34  	ServiceName         string
    35  	DashboardUrl        *string            `json:"dashboard_url"`
    36  	LastOperation       *LastOperationType `json:"last_operation"`
    37  	AccountUrl          string             `json:"account_url"`
    38  	ResourcePlanUrl     string             `json:"resource_plan_url"`
    39  	ResourceBindingsUrl string             `json:"resource_bindings_url"`
    40  	ResourceAliasesUrl  string             `json:"resource_aliases_url"`
    41  	SiblingsUrl         string             `json:"siblings_url"`
    42  	TargetCrn           crn.CRN            `json:"target_crn"`
    43  }
    44  
    45  type LastOperationType struct {
    46  	Type        string     `json:"type"`
    47  	State       string     `json:"state"`
    48  	Description *string    `json:"description"`
    49  	UpdatedAt   *time.Time `json:"updated_at"`
    50  }
    51  
    52  type ServiceInstanceV2 struct {
    53  	ServiceInstance
    54  	ScheduledReclaimAt interface{}       `json:"scheduled_reclaim_at"`
    55  	RestoredAt         interface{}       `json:"restored_at"`
    56  	ScheduledReclaimBy string            `json:"scheduled_reclaim_by"`
    57  	RestoredBy         string            `json:"restored_by"`
    58  	ResourcePlanID     string            `json:"resource_plan_id"`
    59  	ResourceGroupCrn   string            `json:"resource_group_crn"`
    60  	AllowCleanup       bool              `json:"allow_cleanup"`
    61  	ResourceKeysURL    string            `json:"resource_keys_url"`
    62  	PlanHistory        []PlanHistoryData `json:"plan_history"`
    63  }
    64  
    65  type PlanHistoryData struct {
    66  	ResourcePlanID string    `json:"resource_plan_id"`
    67  	StartDate      time.Time `json:"start_date"`
    68  	RequestorID    string    `json:"requestor_id"`
    69  	Migrated       bool      `json:"migrated"`
    70  	ControlledBy   string    `json:"controlled_by"`
    71  	Locked         bool      `json:"locked"`
    72  }