...

Source file src/github.com/Azure/azure-sdk-for-go/services/classic/management/affinitygroup/entities.go

Documentation: github.com/Azure/azure-sdk-for-go/services/classic/management/affinitygroup

     1  // +build go1.7
     2  
     3  package affinitygroup
     4  
     5  // Copyright (c) Microsoft Corporation. All rights reserved.
     6  // Licensed under the MIT License. See License.txt in the project root for license information.
     7  
     8  import (
     9  	"encoding/xml"
    10  )
    11  
    12  // CreateAffinityGroupParams respresents the set of parameters required for
    13  // creating an affinity group creation request to Azure.
    14  //
    15  // https://msdn.microsoft.com/en-us/library/azure/gg715317.aspx
    16  type CreateAffinityGroupParams struct {
    17  	XMLName     xml.Name `xml:"http://schemas.microsoft.com/windowsazure CreateAffinityGroup"`
    18  	Name        string
    19  	Label       string
    20  	Description string `xml:",omitempty"`
    21  	Location    string
    22  }
    23  
    24  // HostedService is a struct containing details about a hosted service that is
    25  // part of an affinity group on Azure.
    26  type HostedService struct {
    27  	URL         string `xml:"Url"`
    28  	ServiceName string
    29  }
    30  
    31  // StorageService is a struct containing details about a storage  service that is
    32  // part of an affinity group on Azure.
    33  type StorageService struct {
    34  	URL         string `xml:"Url"`
    35  	ServiceName string
    36  }
    37  
    38  // AffinityGroup respresents the properties of an affinity group on Azure.
    39  //
    40  // https://msdn.microsoft.com/en-us/library/azure/ee460789.aspx
    41  type AffinityGroup struct {
    42  	Name            string
    43  	Label           string
    44  	Description     string
    45  	Location        string
    46  	HostedServices  []HostedService
    47  	StorageServices []StorageService
    48  	Capabilities    []string
    49  }
    50  
    51  // ComputeCapabilities represents the sets of capabilities of an affinity group
    52  // obtained from an affinity group list call to Azure.
    53  type ComputeCapabilities struct {
    54  	VirtualMachineRoleSizes []string
    55  	WebWorkerRoleSizes      []string
    56  }
    57  
    58  // AffinityGroupListResponse represents the properties obtained for each
    59  // affinity group listed off Azure.
    60  //
    61  // https://msdn.microsoft.com/en-us/library/azure/ee460797.aspx
    62  type AffinityGroupListResponse struct {
    63  	Name                string
    64  	Label               string
    65  	Description         string
    66  	Location            string
    67  	Capabilities        []string
    68  	ComputeCapabilities ComputeCapabilities
    69  }
    70  
    71  // ListAffinityGroupsResponse contains all the affinity groups obtained from a
    72  // call to the Azure API to list all affinity groups.
    73  type ListAffinityGroupsResponse struct {
    74  	AffinityGroups []AffinityGroupListResponse `xml:"AffinityGroup"`
    75  }
    76  
    77  // UpdateAffinityGroupParams if the set of parameters required to update an
    78  // affinity group on Azure.
    79  //
    80  // https://msdn.microsoft.com/en-us/library/azure/gg715316.aspx
    81  type UpdateAffinityGroupParams struct {
    82  	XMLName     xml.Name `xml:"http://schemas.microsoft.com/windowsazure UpdateAffinityGroup"`
    83  	Label       string   `xml:",omitempty"`
    84  	Description string   `xml:",omitempty"`
    85  }
    86  

View as plain text