func (m *MachinesClient) List(ctx context.Context, orgID *identity.ID, state *string, name *string, teamID *identity.ID) ([]*apitypes.MachineSegment, error) {
	v := &url.Values{}
	if orgID != nil {
		v.Add("org_id", (*orgID).String())
	}
	if state != nil {
		v.Add("state", *state)
	}
	if teamID != nil {
		v.Add("team_id", (*teamID).String())
	}
	if name != nil {
		v.Add("name", *name)
	}

	req, reqID, err := m.client.NewRequest("GET", "/machines", v, nil, true)
	if err != nil {
		return nil, err
	}

	var results []*apitypes.MachineSegment
	_, err = m.client.Do(ctx, req, &results, &reqID, nil)
	if err != nil {
		return nil, err
	}

	return results, nil
}
// List machines in the given org and state
List machines in the given org and state
// List machines in the given org and state
func (m *MachinesClient) List(ctx context.Context, orgID *identity.ID, state *string, name *string, teamID *identity.ID) ([]*apitypes.MachineSegment, error) {
	v := &url.Values{}
	if orgID != nil {
		v.Add("org_id", (*orgID).String())
	}
	if state != nil {
		v.Add("state", *state)
	}
	if teamID != nil {
		v.Add("team_id", (*teamID).String())
	}
	if name != nil {
		v.Add("name", *name)
	}
	req, reqID, err := m.client.NewRequest("GET", "/machines", v, nil, true)
	if err != nil {
		return nil, err
	}
	var results []*apitypes.MachineSegment
	_, err = m.client.Do(ctx, req, &results, &reqID, nil)
	if err != nil {
		return nil, err
	}
	return results, nil
}
func ( m * MachinesClient ) List ( ctx context . Context , orgID * identity . ID , state * string , name * string , teamID * identity . ID ) ( [ ] * apitypes . MachineSegment , error ) { v := & url . Values { } if orgID != nil { v . Add ( " " , ( * orgID ) . String ( ) ) } if state != nil { v . Add ( " " , * state ) } if teamID != nil { v . Add ( " " , ( * teamID ) . String ( ) ) } if name != nil { v . Add ( " " , * name ) } req , reqID , err := m . client . NewRequest ( " " , " " , v , nil , true ) if err != nil { return nil , err } var results [ ] * apitypes . MachineSegment _ , err = m . client . Do ( ctx , req , & results , & reqID , nil ) if err != nil { return nil , err } return results , nil }
List machines in the given org and state
List machines in the given org and state