github.com/swisscom/cloudfoundry-cli@v7.1.0+incompatible/cf/models/security_group.go (about)

     1  package models
     2  
     3  // represents just the attributes for an security group
     4  type SecurityGroupFields struct {
     5  	Name     string
     6  	GUID     string
     7  	SpaceURL string `json:"spaces_url,omitempty"`
     8  	Rules    []map[string]interface{}
     9  }
    10  
    11  // represents the JSON that we send up to CC when the user creates / updates a record
    12  type SecurityGroupParams struct {
    13  	Name  string                   `json:"name,omitempty"`
    14  	GUID  string                   `json:"guid,omitempty"`
    15  	Rules []map[string]interface{} `json:"rules"`
    16  }
    17  
    18  // represents a fully instantiated model returned by the CC (e.g.: with its attributes and the fields for its child objects)
    19  type SecurityGroup struct {
    20  	SecurityGroupFields
    21  	Spaces []Space
    22  }